www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DMD Deadlocks

reply Benjamin Thaut <code benjamin-thaut.de> writes:
Hi,

I somehow hit a bug where dmd deadlocks within Mem::Free if I use 
-inline. With previous bugs I was able to reduce my code using DustMite 
but with this one it is hard because dmd gives no output and just 
freezes. Any ideas how I could reduce my code?

Callstack:
kernel32.dll!_WaitForSingleObject 8()  + 0x12 Bytes	
dmd.exe!__WaitSemaphore()  + 0x1c Bytes	C++
dmd.exe!Mem::free(void *)()  Zeile 95 + 0x8 Bytes	C++
dmd.exe!Array::~Array()()  Zeile 59 + 0x10 Bytes	C++
dmd.exe!main()  Zeile 1431 + 0x26 Bytes	C++


Kind Regards
Benjamin Thaut
Mar 19 2012
next sibling parent reply Sean Kelly <sean invisibleduck.org> writes:
On Mar 19, 2012, at 10:58 AM, Benjamin Thaut wrote:
=20
 I somehow hit a bug where dmd deadlocks within Mem::Free if I use =
-inline. With previous bugs I was able to reduce my code using DustMite = but with this one it is hard because dmd gives no output and just = freezes. Any ideas how I could reduce my code?
=20
 Callstack:
 kernel32.dll!_WaitForSingleObject 8()  + 0x12 Bytes=09
 dmd.exe!__WaitSemaphore()  + 0x1c Bytes	C++
 dmd.exe!Mem::free(void *)()  Zeile 95 + 0x8 Bytes	C++
 dmd.exe!Array::~Array()()  Zeile 59 + 0x10 Bytes	C++
 dmd.exe!main()  Zeile 1431 + 0x26 Bytes	C++
What are the callstacks of the other threads?=
Mar 19 2012
parent reply Benjamin Thaut <code benjamin-thaut.de> writes:
Am 19.03.2012 19:08, schrieb Sean Kelly:
 On Mar 19, 2012, at 10:58 AM, Benjamin Thaut wrote:
 I somehow hit a bug where dmd deadlocks within Mem::Free if I use -inline.
With previous bugs I was able to reduce my code using DustMite but with this
one it is hard because dmd gives no output and just freezes. Any ideas how I
could reduce my code?

 Callstack:
 kernel32.dll!_WaitForSingleObject 8()  + 0x12 Bytes	
 dmd.exe!__WaitSemaphore()  + 0x1c Bytes	C++
 dmd.exe!Mem::free(void *)()  Zeile 95 + 0x8 Bytes	C++
 dmd.exe!Array::~Array()()  Zeile 59 + 0x10 Bytes	C++
 dmd.exe!main()  Zeile 1431 + 0x26 Bytes	C++
What are the callstacks of the other threads?
The funny thing is: There are no other threads. I always thought that dmd is single threaded. Or am I mistaken there? I can provide a full package with all sources if that would help. Kind Regards Benjamin Thaut
Mar 19 2012
parent Sean Kelly <sean invisibleduck.org> writes:
On Mar 19, 2012, at 12:21 PM, Benjamin Thaut <code benjamin-thaut.de> wrote:=


 Am 19.03.2012 19:08, schrieb Sean Kelly:
=20
 On Mar 19, 2012, at 10:58 AM, Benjamin Thaut wrote:
=20
 I somehow hit a bug where dmd deadlocks within Mem::Free if I use -inlin=
e. With previous bugs I was able to reduce my code using DustMite but with t= his one it is hard because dmd gives no output and just freezes. Any ideas h= ow I could reduce my code?
=20
 Callstack:
 kernel32.dll!_WaitForSingleObject 8()  + 0x12 Bytes   =20
 dmd.exe!__WaitSemaphore()  + 0x1c Bytes    C++
 dmd.exe!Mem::free(void *)()  Zeile 95 + 0x8 Bytes    C++
 dmd.exe!Array::~Array()()  Zeile 59 + 0x10 Bytes    C++
 dmd.exe!main()  Zeile 1431 + 0x26 Bytes    C++
=20 What are the callstacks of the other threads?
=20 The funny thing is: There are no other threads. I always thought that dmd is single threaded. Or am I mistaken there?
I think DMD will spawn a thread per module, or something like that. It would= be weird for a thread to crash while holding the allocator lock though, unl= ess there's memory corruption involved.=20=
Mar 19 2012
prev sibling parent Trass3r <un known.com> writes:
 I somehow hit a bug where dmd deadlocks within Mem::Free if I use  
 -inline. With previous bugs I was able to reduce my code using DustMite  
 but with this one it is hard because dmd gives no output and just  
 freezes. Any ideas how I could reduce my code?
You could play with DustMite + timeout.
Mar 19 2012