0
使用共享內存中存儲的rwlock對象的同一進程中的兩個線程在pthreads壓力測試期間遇到崩潰。我花了一段時間試圖找到內存腐敗或僵局,但迄今爲止沒有。這只是一種不太理想的方式來告訴我我已經創造了一個僵局?調試這個工具/方法的任何指針?futex設施返回了一個意外的錯誤代碼?
Thread 5 "tms_test" received signal SIGABRT, Aborted. [Switching to Thread 0x7ffff28a7700 (LWP 3777)] 0x00007ffff761e428 in __GI_raise (sig=[email protected]=6) at ../sysdeps/unix/sysv/linux/raise.c:54 54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff761e428 in __GI_raise ([email protected]=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x00007ffff762002a in __GI_abort() at abort.c:89 #2 0x00007ffff76607ea in __libc_message ([email protected]=1, [email protected]=0x7ffff77776cc "%s") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007ffff766080e in __GI___libc_fatal ([email protected]=0x7ffff79c4ae0 "The futex facility returned an unexpected error code.") at ../sysdeps/posix/libc_fatal.c:185 #4 0x00007ffff79be7e5 in futex_fatal_error() at ../sysdeps/nptl/futex-internal.h:200 #5 futex_wait (private=, expected=, futex_word=0x7ffff7f670d9) at ../sysdeps/unix/sysv/linux/futex-internal.h:77 #6 futex_wait_simple (private=, expected=, futex_word=0x7ffff7f670d9) at ../sysdeps/nptl/futex-internal.h:135 #7 __pthread_rwlock_wrlock_slow (rwlock=0x7ffff7f670cd) at pthread_rwlock_wrlock.c:67 #8 0x00000000004046e3 in _memstat (offset=0x7fffdc0b11a5, func=0x0, lineno=0, size=134, flag=1 '\001') at tms_mem.c:107 #9 0x000000000040703b in TmsMemReallocExec (in=0x7fffdc0abb81, size=211, func=0x43f858 "_malloc_thread", lineno=478) at tms_mem.c:390 #10 0x000000000042a008 in _malloc_thread (arg=0x644c11) at tms_test.c:478 #11 0x000000000041a1d6 in _threadStarter (arg=0x644c51) at tms_mem.c:2384 #12 0x00007ffff79b96ba in start_thread (arg=0x7ffff28a7700) at pthread_create.c:333 #13 0x00007ffff76ef82d in clone() at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 (gdb)