ThreadPools.jl
ThreadPools.jl copied to clipboard
segfault when using tmap with code that runs fine with qmap
I'm not sure exactly what's going on here. I have a bit of code that works just fine with qmap, but throws a segfault when using tmap:
signal (11): Segmentation fault
in expression starting at /home/skainswo/dev/research/julia/odecontrol/diffdrive/train.jl:131
signal (11): Segmentation fault
signal (11): Segmentation fault
in expression starting at /home/skainswo/dev/research/julia/odecontrol/diffdrive/train.jl:131
in expression starting at /home/sin expression starting at /home/skainswo/dev/research/julia/odecontrol/diffdrive/train.jl:131
in expression starting at /home/skainswo/dev/research/julia/odecontrol/diffdrive/train.jl:131
size at ./array.jl:155 [inlined]
cat_size at ./abstractarray.jl:1384 [inlined]
map at ./tuple.jl:158 [inlined]
_cat_t at ./abstractarray.jl:1440 [inlined]
#cat_t#109 at ./abstractarray.jl:1437 [inlined]
cat_t##kw at ./abstractarray.jl:1437 [inlined]
_cat at ./abstractarray.jl:1435 [inlined]
#cat#110 at ./abstractarray.jl:1564 [inlined]
cat##kw at ./abstractarray.jl:1564 [inlined]
vcat at ./abstractarray.jl:1502 [inlined]
loss_pullback at /home/skainswo/dev/research/julia/odecontrol/ppg.jl:55
ez_loss_and_grad at /home/skainswo/dev/research/julia/odecontrol/ppg.jl:106
ERROR: macro expansion at ./util.jl:175 [inlined]
#610 at /home/skainswo/dev/research/julia/odecontrol/ppg.jl:159 [inlined]
#49 at /home/skainswo/.julia/packages/ThreadPools/KEWRC/src/staticpool.jl:44
macro expansion at /home/skainswo/.julia/packages/ThreadPools/KEWRC/src/staticpool.jl:50 [inlined]
#38#threadsfor_fun at ./threadingconstructs.jl:61
#38#threadsfor_fun at ./threadingconstructs.jl:28
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2145 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2323
size at ./array.jl:155 [inlined]
cat_size at ./abstractarray.jl:1384 [inlined]
map at ./tuple.jl:158 [inlined]
_cat_t at ./abstractarray.jl:1440 [inlined]
#cat_t#109 at ./abstractarray.jl:1437 [inlined]
cat_t##kw at ./abstractarray.jl:1437 [inlined]
_cat at ./abstractarray.jl:1435 [inlined]
#cat#110 at ./abstractarray.jl:1564 [inlined]
cat##kw at ./abstractarray.jl:1564 [inlined]
vcat at ./abstractarray.jl:1502 [inlined]
loss_pullback at /home/skainswo/dev/research/julia/odecontrol/ppg.jl:55
ez_loss_and_grad at /home/skainswo/dev/research/julia/odecontrol/ppg.jl:106
macro expansion at ./util.jl:175 [inlined]
#610 at /home/skainswo/dev/research/julia/odecontrol/ppg.jl:159 [inlined]
#49 at /home/skainswo/.julia/packages/ThreadPools/KEWRC/src/staticpool.jl:44
macro expansion at /home/skainswo/.julia/packages/ThreadPools/KEWRC/src/staticpool.jl:50 [inlined]
#38#threadsfor_fun at ./threadingconstructs.jl:61
#38#threadsfor_fun at ./threadingconstructs.jl:28
_jl_invoke at /buildworker/worker/package_linux64/build/src/gf.c:2145 [inlined]
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2323
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1700 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:687
unknown function (ip: (nil))
Allocations: 7131313439 (Pool: 7089494235; Big: 41819204); GC: 278
Segmentation fault (core dumped)
The code is currently quite messy, but I can try to work out a reproduction if necessary.
Yeah, I don't know where to start with the above. Is everything you are using threadsafe?
but I can try to work out a reproduction if necessary
Yes, an MWE would be appreciated