[Gc] Fwd: [bdwgc] Race conditions between thread termination and garbage collection (#86)
Ivan Maidanski <ivmai-JGs/[email protected]> Sat, 09 Jan 2016 19:21:40 +0300
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <[email protected]> |
-------- Forwarded message -------- From: Daniel Mendler <[email protected]> CC: ivmai/bdwgc <[email protected]> Date: Sat, 09 Jan 2016, 16:46 +03:00 Subj: [bdwgc] Race conditions between thread termination and garbage collection (#86) This was discussed before, but I don't know if it was resolved: http://www.hpl.hp.com/hosted/linux/mail-archives/gc/2010-March/003793.html I use github master. (gdb) info threads Id Target Id Frame 11 Thread 0x7f7dfd962700 (LWP 2022) 0x00007f7e04dcd482 in do_sigsuspend (set=0x7f7e059db240 <suspend_handler_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 10 Thread 0x7f7dfe163700 (LWP 2021) 0x00007f7e04dcd482 in do_sigsuspend (set=0x7f7e059db240 <suspend_handler_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 9 Thread 0x7f7dfe964700 (LWP 2020) 0x00007f7e04dcd482 in do_sigsuspend (set=0x7f7e059db240 <suspend_handler_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 8 Thread 0x7f7dff165700 (LWP 2019) 0x00007f7e04dcd482 in do_sigsuspend (set=0x7f7e059db240 <suspend_handler_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 7 Thread 0x7f7dff966700 (LWP 2018) 0x00007f7e04dcd482 in do_sigsuspend (set=0x7f7e059db240 <suspend_handler_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 6 Thread 0x7f7e00167700 (LWP 2017) 0x00007f7e04dcd482 in do_sigsuspend (set=0x7f7e059db240 <suspend_handler_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 5 Thread 0x7f7e00968700 (LWP 2016) 0x00007f7e04dcd482 in do_sigsuspend (set=0x7f7e059db240 <suspend_handler_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 4 Thread 0x7f7e01169700 (LWP 2015) sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85 3 Thread 0x7f7e0216b700 (LWP 2013) __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 2 Thread 0x7f7e04970700 (LWP 2008) pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 * 1 Thread 0x7f7e05c05b40 (LWP 2007) 0x00007f7e04dcd482 in do_sigsuspend (set=0x7f7e059db240 <suspend_handler_mask>) at ../sysdeps/unix/sysv/linux/sigsuspend.c:31 It seems that threads 2, 3, 4 are dead locked. (gdb) thread 4 [Switching to thread 4 (Thread 0x7f7e01169700 (LWP 2015))] #0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85 85 ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S: No such file or directory. (gdb) bt #0 sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:85 #1 0x00007f7e057bcf82 in GC_stop_world () at pthread_stop_world.c:662 #2 0x00007f7e057a913e in GC_stopped_mark (stop_func=stop_func@entry=0x7f7e057a8c40 <GC_never_stop_func>) at alloc.c:646 #3 0x00007f7e057a9c99 in GC_try_to_collect_inner (stop_func=0x7f7e057a8c40 <GC_never_stop_func>) at alloc.c:486 #4 0x00007f7e057a9f0a in GC_try_to_collect_general (stop_func=stop_func@entry=0x0, force_unmap=force_unmap@entry=0) at alloc.c:1065 #5 0x00007f7e057a9fdd in GC_gcollect () at alloc.c:1089 (gdb) thread 3 [Switching to thread 3 (Thread 0x7f7e0216b700 (LWP 2013))] #0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 135 in ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (gdb) bt #0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 #1 0x00007f7e055864b9 in _L_lock_909 () from /lib/x86_64-linux-gnu/libpthread.so.0 #2 0x00007f7e055862e0 in __GI___pthread_mutex_lock (mutex=0x7f7e059daca0 <GC_allocate_ml>) at ../nptl/pthread_mutex_lock.c:79 #3 0x00007f7e057bbed5 in GC_thread_exit_proc (arg=arg@entry=0x2662c00) at pthread_support.c:1409 #4 0x00007f7e057bacad in GC_inner_start_routine (sb=<error reading variable: value has been optimized out>, arg=<error reading variable: value has been optimized out>) at pthread_start.c:63 #5 0x00007f7e057b5a42 in GC_call_with_stack_base (fn=<optimized out>, arg=<optimized out>) at misc.c:1925 #6 0x00007f7e055840a4 in start_thread (arg=0x7f7e0216b700) at pthread_create.c:309 #7 0x00007f7e04e7e04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (gdb) thread 2 [Switching to thread 2 (Thread 0x7f7e04970700 (LWP 2008))] #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 185 ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: No such file or directory. (gdb) bt #0 pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185 #1 0x00007f7e057bc8f7 in GC_wait_marker () at pthread_support.c:2121 #2 0x00007f7e057b2cea in GC_help_marker (my_mark_no=my_mark_no@entry=30) at mark.c:1186 #3 0x00007f7e057bc8cc in GC_mark_thread (id=<optimized out>) at pthread_support.c:380 #4 0x00007f7e055840a4 in start_thread (arg=0x7f7e04970700) at pthread_create.c:309 #5 0x00007f7e04e7e04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 — Reply to this email directly or view it on GitHub . _______________________________________________ bdwgc mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/bdwgc