Thread overview | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
October 07, 2012 [Issue 8774] New: 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8774 Summary: 2.059 worked 2.060 does not: Unable to join thread Product: D Version: D2 Platform: x86_64 OS/Version: Linux Status: NEW Severity: regression Priority: P2 Component: druntime AssignedTo: nobody@puremagic.com ReportedBy: russel@winder.org.uk --- Comment #0 from Russel Winder <russel@winder.org.uk> 2012-10-07 04:22:54 PDT --- The attached code compiles and runs fine under DMD 2.059 installed on Debian Unstable via the distributed deb file. Under 2.060 it compiles but at runtime gives: core.thread.ThreadException@src/core/thread.d(780): Unable to join thread ---------------- /tmp/.rdmd-1000/rdmd-pi_d_threadsGlobalState_array_declarative.d-C963C499401209E276E9BB7F98EEB447/pi_d_threadsGlobalState_array_declarative(void pi_d_threadsGlobalState_array_declarative.execute(immutable(int))+0x129) [0x44dac5] /tmp/.rdmd-1000/rdmd-pi_d_threadsGlobalState_array_declarative.d-C963C499401209E276E9BB7F98EEB447/pi_d_threadsGlobalState_array_declarative(_Dmain+0x28) [0x44db8c] /tmp/.rdmd-1000/rdmd-pi_d_threadsGlobalState_array_declarative.d-C963C499401209E276E9BB7F98EEB447/pi_d_threadsGlobalState_array_declarative(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x1c) [0x45b34c] /tmp/.rdmd-1000/rdmd-pi_d_threadsGlobalState_array_declarative.d-C963C499401209E276E9BB7F98EEB447/pi_d_threadsGlobalState_array_declarative(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x2a) [0x45acc6] /tmp/.rdmd-1000/rdmd-pi_d_threadsGlobalState_array_declarative.d-C963C499401209E276E9BB7F98EEB447/pi_d_threadsGlobalState_array_declarative(extern (C) int rt.dmain2.main(int, char**).void runAll()+0x3b) [0x45b393] /tmp/.rdmd-1000/rdmd-pi_d_threadsGlobalState_array_declarative.d-C963C499401209E276E9BB7F98EEB447/pi_d_threadsGlobalState_array_declarative(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x2a) [0x45acc6] /tmp/.rdmd-1000/rdmd-pi_d_threadsGlobalState_array_declarative.d-C963C499401209E276E9BB7F98EEB447/pi_d_threadsGlobalState_array_declarative(main+0xd1) [0x45ac51] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7fe18bb3aead] -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 07, 2012 [Issue 8774] 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | http://d.puremagic.com/issues/show_bug.cgi?id=8774 --- Comment #1 from Russel Winder <russel@winder.org.uk> 2012-10-07 04:24:24 PDT --- Created an attachment (id=1146) . -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 07, 2012 [Issue 8774] 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | http://d.puremagic.com/issues/show_bug.cgi?id=8774 Russel Winder <russel@winder.org.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1146|. |pi_d_threadsGlobalState_arr description| |ay_declarative.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 07, 2012 [Issue 8774] 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | http://d.puremagic.com/issues/show_bug.cgi?id=8774 Alex Rønne Petersen <alex@lycus.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alex@lycus.org --- Comment #2 from Alex Rønne Petersen <alex@lycus.org> 2012-10-07 13:56:30 CEST --- pi_d_threadsGlobalState_array_declarative.d(13): Error: module output_d is in file 'output_d.d' which cannot be read import path[0] = . import path[1] = /usr/include/dmd/phobos import path[2] = /usr/include/dmd/druntime/import Failed: 'dmd' '-v' '-o-' 'pi_d_threadsGlobalState_array_declarative.d' '-I.' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 07, 2012 [Issue 8774] 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | http://d.puremagic.com/issues/show_bug.cgi?id=8774 --- Comment #3 from Russel Winder <russel@winder.org.uk> 2012-10-07 05:00:53 PDT --- Created an attachment (id=1148) output_d.d -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 07, 2012 [Issue 8774] 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | http://d.puremagic.com/issues/show_bug.cgi?id=8774 --- Comment #4 from Alex Rønne Petersen <alex@lycus.org> 2012-10-07 14:19:57 CEST --- What's happening is that pthread_join() is giving us ESRCH because the thread handle is apparently no longer valid. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 07, 2012 [Issue 8774] 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | http://d.puremagic.com/issues/show_bug.cgi?id=8774 --- Comment #5 from Alex Rønne Petersen <alex@lycus.org> 2012-10-07 15:11:18 CEST --- Something is very wrong here and I'm not sure whether to blame the compiler or Phobos: starting 0 7FCE6E0B3E00 joining 0 7FCE6E0B3D00 First value is the thread number, second is its address. Notice how the address it attempts to join with is very wrong. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 07, 2012 [Issue 8774] 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | http://d.puremagic.com/issues/show_bug.cgi?id=8774 --- Comment #6 from Russel Winder <russel@winder.org.uk> 2012-10-07 07:44:02 PDT --- Perhaps worth noting that using ldc2 compiled from the Git repository gives effectively the same result. core.thread.ThreadException@/home/Checkouts/Git/Git/LDC/runtime/druntime/src/core/thread.d(788): Unable to join thread -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 19, 2012 [Issue 8774] 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | http://d.puremagic.com/issues/show_bug.cgi?id=8774 luka8088 <luka8088@owave.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |luka8088@owave.net --- Comment #7 from luka8088 <luka8088@owave.net> 2012-10-19 00:32:12 PDT --- *** Issue 8852 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
October 19, 2012 [Issue 8774] 2.059 worked 2.060 does not: Unable to join thread | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | http://d.puremagic.com/issues/show_bug.cgi?id=8774 --- Comment #8 from luka8088 <luka8088@owave.net> 2012-10-19 00:33:58 PDT --- Here is a simple test case: ----- module program; import std.stdio; import core.thread; void main () { Thread t1, t2; t1 = new Thread(delegate { t2.start(); }); t2 = new Thread(delegate { Thread.sleep(dur!"seconds"(1)); }); t1.start(); t2.join(); } ----- http://dpaste.dzfl.pl/0d24dd06 output: core.thread.ThreadException@src/core/thread.d(780): Unable to join thread if t2.join occurs after t2 already finished then exception is not thrown, hence the sleep -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation