[Issue 19978] New: D sometimes just crashes on exit with daemon threads
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 17 06:11:30 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19978
Issue ID: 19978
Summary: D sometimes just crashes on exit with daemon threads
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: critical
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
Consider the following code:
void main()
{
import core.thread : Thread;
with (new Thread({ })) { isDaemon = true; start; }
}
On Linux, this builds and runs successfully, maybe 99% of the time.
But if you run it in a loop:
while true; do ./test || break; done
You will see that it segfaults after a few seconds.
I asked the forum for repros (
https://forum.dlang.org/post/awnslgsogmdixktynjmw@forum.dlang.org ), and got
successful crashes on these systems:
- DMD 2.080.0, Linux 4.18.0-20 x86_64
- DMD 2.086.0, Linux 5.0.0-16-generic x86_64
- DMD 2.086.0, Linux hal9000 5.1.9-zen1-1-zen #1 ZEN SMP PREEMPT Tue Jun 11
- LDC2-1.11, Linux 4.14.111
- DMD64 2.086.0, MacOs 10.13.6; Darwin Kernel Version 17.7.0; x86_64
and a failure to reproduce under Windows 10, dmd 2.082.0 and ldc2 1.12.0-beta2.
The crashes on MacOs and LDC, effectively excluding backend issues and kernel
bugs, strongly hint at a druntime bug.
See the forum thread for some backtraces.
--
More information about the Digitalmars-d-bugs
mailing list