-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
heisenbugThis bug occurs unpredictablyThis bug occurs unpredictablymultithreadingBase.Threads and related functionalityBase.Threads and related functionalityregression 1.12Regression in the 1.12 releaseRegression in the 1.12 release
Milestone
Description
on 7de5585
(gdb) thread apply all bt
Thread 4 (Thread 0x7f01bc2cd640 (LWP 791445) "julia"):
#0 0x00007f01c304c646 in julia_lock_2766 () at locks-mt.jl:81
#1 0x00007f01c3363723 in lock () at condition.jl:75
#2 julia_init_perthread_2775 () at lock.jl:883
#3 0x00007f01c391215e in julia_getindex_2768 () at lock.jl:864
#4 0x00007f01c36a4a40 in workqueue_for () at task.jl:923
#5 julia_enq_work_2734 () at task.jl:947
#6 0x00007f01c2b1d47c in julia_#schedule#597_2726 () at task.jl:1027
#7 0x00007f01c39dffe0 in schedule () at task.jl:1014
#8 julia_notify_2722 () at condition.jl:165
#9 0x00007f01c396ed89 in julia_#notify#402_2805 () at condition.jl:159
#10 0x00007f01c33db396 in julia_notify_2802 () at condition.jl:159
#11 0x00007f01c3363de6 in notify () at condition.jl:159
#12 julia_init_perthread_2775 () at lock.jl:927
#13 0x00007f01c391215e in julia_getindex_2768 () at lock.jl:864
#14 0x00007f01c35929d3 in workqueue_for () at task.jl:923
#15 julia_wait_2815 () at task.jl:1191
#16 0x00007f01c33c2525 in julia_task_done_hook_66526 () at task.jl:847
#17 0x00007f01c369a8bf in jfptr_task_done_hook_66527 () from /home/vtjnash/julia-globals-invokelatest/usr/lib/julia/sys.so
#18 0x00007f01d3ddc78c in jl_apply (args=0x7f01bc2ccce0, nargs=2) at /workspace/src/julia.h:2370
#19 jl_finish_task (ct=ct@entry=0x7f01c1e08010) at /workspace/src/task.c:349
#20 0x00007f01d3e134d9 in jl_threadfun (arg=0x823680) at /workspace/src/scheduler.c:122
#21 0x00007f01d4868ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#22 0x00007f01d48fa850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Thread 3 (Thread 0x7f01c2a0e640 (LWP 791419) "julia"):
#0 0x00007f01d481721a in __GI___sigtimedwait (set=set@entry=0x7f01c2a0d970, info=info@entry=0x7f01c2a0d9f0, timeout=timeout@entry=0x0) at ../sysdeps/unix/sysv/linux/sigtimedwait.c:61
#1 0x00007f01d481729b in __GI___sigwaitinfo (set=set@entry=0x7f01c2a0d970, info=info@entry=0x7f01c2a0d9f0) at ../sysdeps/unix/sysv/linux/sigwaitinfo.c:25
#2 0x00007f01d3e1f9db in signal_listener (arg=<optimized out>) at /workspace/src/signals-unix.c:976
#3 0x00007f01d4868ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#4 0x00007f01d48fa850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Thread 2 (Thread 0x7f01d47afd00 (LWP 791418) "iou-sqp-791416"):
#0 0x0000000000000000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x0
Thread 1 (Thread 0x7f01d47afd00 (LWP 791416) "julia"):
#0 0x00007f01c304c646 in julia_lock_2766 () at locks-mt.jl:81
#1 0x00007f01c3363723 in lock () at condition.jl:75
#2 julia_init_perthread_2775 () at lock.jl:883
#3 0x00007f01c391215e in julia_getindex_2768 () at lock.jl:864
#4 0x00007f01c35929d3 in workqueue_for () at task.jl:923
#5 julia_wait_2815 () at task.jl:1191
#6 0x00007f01c2bca791 in julia_#wait#401_2808 () at condition.jl:141
#7 0x00007f01c3363b5b in wait () at condition.jl:136
#8 julia_init_perthread_2775 () at lock.jl:904
#9 0x00007f01c391215e in julia_getindex_2768 () at lock.jl:864
#10 0x00007f01c36a4968 in workqueue_for () at task.jl:923
#11 julia_enq_work_2734 () at task.jl:956
#12 0x00007f01c2b197f6 in schedule () at task.jl:970
#13 macro expansion () at threadingconstructs.jl:522
#14 julia_start_profile_listener_41336 () at Base.jl:354
#15 0x00007f01c363147a in julia___init___41279 () at Base.jl:391
#16 0x00007f01c3a1e8f9 in jfptr___init___41280 () from /home/vtjnash/julia-globals-invokelatest/usr/lib/julia/sys.so
#17 0x00007f01d3df3b3e in jl_apply (args=0x7fff64b83c68, nargs=1) at /workspace/src/julia.h:2370
#18 jl_module_run_initializer (m=0x7f01c8e6c3a0 <jl_system_image_data+85615520>) at /workspace/src/toplevel.c:68
#19 0x00007f01d3dda998 in _finish_jl_init_ (sysimage=..., ct=<optimized out>, ptls=<optimized out>) at /workspace/src/init.c:632
#20 0x00007f01d3ddbbab in ijl_init_ (sysimage=...) at /workspace/src/init.c:784
#21 0x00007f01d3e1de12 in jl_repl_entrypoint (argc=<optimized out>, argv=0x7fff64b84058) at /workspace/src/jlapi.c:1131
#22 0x0000000000401079 in main (argc=<optimized out>, argv=<optimized out>) at /workspace/cli/loader_exe.c:58
Base.Workqueue = Base.IntrusiveLinkedListSynchronized{Task}(queue=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0))
Base.Workqueues = Base.OncePerThread{Base.IntrusiveLinkedListSynchronized{Task}, Type{Base.IntrusiveLinkedListSynchronized{Task}}}(xs=GenericMemory{:atomic, Base.IntrusiveLinkedListSynchronized{Task}, Core.AddrSpace{Core}(0x00)}(2, 0x7f01c1de4020)[
#<null>,
Base.IntrusiveLinkedListSynchronized{Task}(queue=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0))], ss=GenericMemory{:atomic, UInt8, Core.AddrSpace{Core}(0x00)}(2, 0x7f01c1de0020)[0x00, 0x01], initializer=Base.IntrusiveLinkedListSynchronized{Task})
Base.PerThreadLock = Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=1))
Note the deadlock loop here workqueue_for => notify => workqueue_for. Seems like we need a wait/notify for ThreadSynchronizer that keeps the spin lock behavior, since the normal behavior of accessing the scheduler may de-synchronize the threads instead
Metadata
Metadata
Assignees
Labels
heisenbugThis bug occurs unpredictablyThis bug occurs unpredictablymultithreadingBase.Threads and related functionalityBase.Threads and related functionalityregression 1.12Regression in the 1.12 releaseRegression in the 1.12 release