www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2833] New: DMD returns -1073741819 on Intel Quadcore

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2833

           Summary: DMD returns -1073741819 on Intel Quadcore
           Product: D
           Version: 2.027
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: webmaster aj-productions.de


With the introduction of asynchronous compilation since DMD 2.027, DMD returns
-1073741819 when compiling a trivial hello world application on my Intel(R)
Core(TM)2 Quad CPU:

hello.d:
int main(char[][] args)
{
    return 0;
}

dmd.exe  -g -debug    -IC:\dmd\src\phobos  -c hello.d -ofobj\debug\hello.obj
echo %errorlevel%
dmd.exe bin\debug\test2.exe  obj\debug\hello.obj   phobos.lib -v
echo %errorlevel%

The first call to DMD echos 0, while the second call echos -1073741819. So it
seems to be primarily related to linking.



To narrow down the cause, I tested this on two machines; also in safe mode to
examine the possible side effect of background processes. This is what happend:

Original machine: vista, Intel(R) Core(TM)2 Quad CPU
-vista normal mode: returns -1073741819
-vista safe mode: returns 0, but OS reports crash

Other machine: xp, Intel(R) Core(TM)2 Dual CPU
-xp normal mode: returns 0 success [*]
-xp safe mode: returns 0, success [*]

[*] = The compiler crashed once, but that was probably related to corrupted OBJ
files due to the switch of compiler versions. I assume that it's working on the
Dual core machine now.

Note: I have been given access to a version of DMD.exe (2.028) with
asynchronous processing disabled. In this case, DMD.exe also returns 0 on a
Quadcore machine.

Conclusion:
Right now, it looks like this issue is related to Intel Quad core CPUs in
connection with the new async compilation feature. AMD CPUs as well as
XP+Quadcore configurations are untested yet, so its not clear whether its an
OS-, CPU manufacturer-, or #-of-cores issue. The role of windows safe mode is
also not quite clear yet.


-- 
Apr 12 2009
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2833





------- Comment #1 from jarrett.billingsley gmail.com  2009-04-12 18:50 -------
Did you consider that it might not be because you're using an Intel(TM)
Co(R)re(SM) 2(all rights reserved) Quad(WTF it's completely unnecessary to put
all these corporate trademark tags in a bug report ;) ) and more because one
system is Vista and the other is XP?

I've tested on my XP installs on my laptop (Pentium M) and my desktop (Core 2,
but in 32-bit mode) and it gives 0 for both.


-- 
Apr 12 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2833


unknown simplemachines.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |unknown simplemachines.org




------- Comment #2 from unknown simplemachines.org  2009-04-12 19:04 -------
(In reply to comment #1)
 Did you consider that it might not be because you're using an Intel(TM)
 Co(R)re(SM) 2(all rights reserved) Quad(WTF it's completely unnecessary to put
 all these corporate trademark tags in a bug report ;) ) and more because one
 system is Vista and the other is XP?

Well, it seems isolated to quad core. I have tested on the Core 2 Duo I use, and it works fine. I'm running Vista. I just don't have a quad available to me. I'm not sure that safe mode has anything to do with anything, but it's telling that this is only reproducible when the async code is #define'd on, and only on a quad core machine. Keep in mind, on Windows, the return code of dmd.exe is the return code from link.exe. For this reason, it's unclear to me what could be happening. The problem is not in link.exe. -[Unknown] --
Apr 12 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2833





------- Comment #3 from 2korden gmail.com  2009-04-12 19:28 -------
FWIW, I have Windows 7 and Core 2 Duo. DMD always returns 0.


-- 
Apr 12 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2833





------- Comment #4 from shro8822 vandals.uidaho.edu  2009-04-12 22:36 -------

IIRC oplink is threaded and might have CPU count detection so it might have a
bug for >2 cores. It's old enough that it might never have been tested on 4
cores.


-- 
Apr 12 2009
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2833





------- Comment #5 from webmaster aj-productions.de  2009-04-13 03:40 -------
(In reply to comment #1)
 (WTF it's completely unnecessary to put
 all these corporate trademark tags in a bug report ;)

I was just giving the full CPU name string from the genuine(TM) Windows Control panel. (In reply to comment #4)
 IIRC oplink is threaded and might have CPU count detection so it might have a
 bug for >2 cores. It's old enough that it might never have been tested on 4
 cores.

When I link using "link.exe" instead of "dmd.exe", it returns 0, so the origin of the problem is in "dmd.exe". dmd.exe -g -debug -IC:\dmd\src\phobos -c hello.d -ofobj\debug\hello.obj echo %errorlevel% link.exe obj\debug\hello.obj echo %errorlevel% (both return 0) --
Apr 13 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2833


Andreas Jung <webmaster aj-productions.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #6 from Andreas Jung <webmaster aj-productions.de>  2009-07-06
12:40:27 PDT ---
Looks like resolved in DMD 2.031.

Probably related to Issue 3114.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 06 2009