You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While experimenting with multithreading, it is helpful to have constructs like
lock(mylock)
println(message)
unlock(mylock)
in the thread functions, where mylock is a Mutex or SpinLock. Although this works most of the time, I find that programs which do a lot of allocation often segfault (in GC code) when such constructs are present. Are such locks known to be insufficient to protect thread-unsafe code? If not, I can provide gists of code and tracebacks.
Julia Version 0.6.0-dev.787
Commit c71f205 (2016-09-26 16:28 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.7.1 (ORCJIT, haswell)
Also seen in v0.5.0
The text was updated successfully, but these errors were encountered:
I'm trying to help you make it solid! Anyway, I think this may differ from #15620 because the crash is a
real segfault (i.e. invalid memory access) and often occurs after the thread loop has completed - hence the issue title.
Here is example code and a valgrind log. Commenting out the print statement in the thread loop suppresses the problem (AFAICT).
While experimenting with multithreading, it is helpful to have constructs like
in the thread functions, where
mylock
is aMutex
orSpinLock
. Although this works most of the time, I find that programs which do a lot of allocation often segfault (in GC code) when such constructs are present. Are such locks known to be insufficient to protect thread-unsafe code? If not, I can provide gists of code and tracebacks.Also seen in v0.5.0
The text was updated successfully, but these errors were encountered: