Bug 8849 – std.parallelism.executeInNewThread with thread priority segfaults
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P3
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-18T10:48:00Z
Last change time
2012-10-18T23:21:31Z
Assigned to
nobody
Creator
acehreli
Comments
Comment #0 by acehreli — 2012-10-18T10:48:51Z
import std.parallelism;
void foo()
{}
void main() {
auto t = task!foo();
t.executeInNewThread(1);
}
Output from gdb:
Program received signal SIGSEGV, Segmentation fault.
0x0000003016e0839b in pthread_getschedparam () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.5.x86_64
(gdb) bt
#0 0x0000003016e0839b in pthread_getschedparam () from /lib64/libpthread.so.0
#1 0x0000000000458cd0 in core.thread.Thread.priority() ()
#2 0x0000000000000000 in ?? ()
Compiling with -m32 causes the same issue with better backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x0011844d in pthread_getschedparam () from /lib/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.5.i686
(gdb) bt
#0 0x0011844d in pthread_getschedparam () from /lib/libpthread.so.0
#1 0x08095253 in core.thread.Thread.priority() ()
#2 0x08092f1e in std.parallelism.TaskPool.__ctor() ()
#3 0x080873df in std.parallelism.Task!(foo).Task.executeInNewThread (this=0xf7ee5fe0, priority=1) at /usr/include/d/dmd/phobos/std/parallelism.d:753
#4 0x08086ae1 in D main () at deneme.d:102585
#5 0x0808f564 in rt.dmain2.main() ()
#6 0x0808f074 in rt.dmain2.main() ()
#7 0x0808f5a6 in rt.dmain2.main() ()
#8 0x0808f074 in rt.dmain2.main() ()
#9 0x0808f024 in main ()
Comment #1 by github-bugzilla — 2012-10-18T23:19:38Z