We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
运行runtime=9420次后:主进程死锁,子进程进入僵尸 root 24349 24170 52 09:23 pts/0 00:04:07 ./taskc root 25854 24349 0 09:30 pts/0 00:00:00 [taskc] # strace -p 24349结果如下: strace: Process 24349 attached futex(0x7fd20e6195c0, FUTEX_WAIT_PRIVATE, 2, NULL #pstack 24349结果如下: #0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 #1 0x00007fd20e00ba24 in pthread_rwlock_rdlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:122 #2 0x00007fd20e412037 in zlog (category=0xa10cd0, file=0x401230 "taskc.c", filelen=7, func=0x401342 <FUNCTION.4306> "do_sig_child", funclen=12, line=39, level=30, format=0x401238 "do_sig_child, pid=%d, tid=%d,sigs=%d\n") at zlog.c:1010 #3 0x0000000000400c4a in do_sig_child () #4 #5 pthread_rwlock_unlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:41 #6 0x00007fd20e412071 in zlog (category=0xa10cd0, file=0x401230 "taskc.c", filelen=7, func=0x40134f <FUNCTION.4332> "main", funclen=, line=170, level=30, format=0x401309 "Parent ID %d\n") at zlog.c:1037 #7 0x00000000004010f3 in main () gcore 后,用gdb /root/taskc core.24349,where结果如下: Core was generated by `./taskc'. #0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 135 ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: No such file or directory. (gdb) where #0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135 #1 0x00007fd20e00ba24 in pthread_rwlock_rdlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:122 #2 0x00007fd20e412037 in zlog (category=0xa10cd0, file=0x401230 "taskc.c", filelen=7, func=0x401342 <FUNCTION.4306> "do_sig_child", funclen=12, line=39, level=30, format=0x401238 "do_sig_child, pid=%d, tid=%d,sigs=%d\n") at zlog.c:1010 #3 0x0000000000400c4a in do_sig_child () #4 #5 pthread_rwlock_unlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:41 #6 0x00007fd20e412071 in zlog (category=0xa10cd0, file=0x401230 "taskc.c", filelen=7, func=0x40134f <FUNCTION.4332> "main", funclen=, line=170, level=30, format=0x401309 "Parent ID %d\n") at zlog.c:1037 #7 0x00000000004010f3 in main ()
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
我也发生这个问题了 看了一下代码 似乎是 lock_thread 之后 lock_file 失败就直接返回了 没有解锁导致的 改一下就好
rotater.c 大约 461 行
No branches or pull requests
运行runtime=9420次后:主进程死锁,子进程进入僵尸
root 24349 24170 52 09:23 pts/0 00:04:07 ./taskc
root 25854 24349 0 09:30 pts/0 00:00:00 [taskc]
# strace -p 24349结果如下:
strace: Process 24349 attached
futex(0x7fd20e6195c0, FUTEX_WAIT_PRIVATE, 2, NULL
#pstack 24349结果如下:
#0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1 0x00007fd20e00ba24 in pthread_rwlock_rdlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:122
#2 0x00007fd20e412037 in zlog (category=0xa10cd0, file=0x401230 "taskc.c", filelen=7, func=0x401342 <FUNCTION.4306> "do_sig_child", funclen=12, line=39, level=30, format=0x401238 "do_sig_child, pid=%d, tid=%d,sigs=%d\n") at zlog.c:1010
#3 0x0000000000400c4a in do_sig_child ()
#4
#5 pthread_rwlock_unlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:41
#6 0x00007fd20e412071 in zlog (category=0xa10cd0, file=0x401230 "taskc.c", filelen=7, func=0x40134f <FUNCTION.4332> "main", funclen=, line=170, level=30, format=0x401309 "Parent ID %d\n") at zlog.c:1037
#7 0x00000000004010f3 in main ()
gcore 后,用gdb /root/taskc core.24349,where结果如下:
Core was generated by `./taskc'.
#0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
135 ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: No such file or directory.
(gdb) where
#0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1 0x00007fd20e00ba24 in pthread_rwlock_rdlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:122
#2 0x00007fd20e412037 in zlog (category=0xa10cd0, file=0x401230 "taskc.c", filelen=7, func=0x401342 <FUNCTION.4306> "do_sig_child", funclen=12, line=39,
level=30, format=0x401238 "do_sig_child, pid=%d, tid=%d,sigs=%d\n") at zlog.c:1010
#3 0x0000000000400c4a in do_sig_child ()
#4
#5 pthread_rwlock_unlock () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:41
#6 0x00007fd20e412071 in zlog (category=0xa10cd0, file=0x401230 "taskc.c", filelen=7, func=0x40134f <FUNCTION.4332> "main", funclen=,
line=170, level=30, format=0x401309 "Parent ID %d\n") at zlog.c:1037
#7 0x00000000004010f3 in main ()
The text was updated successfully, but these errors were encountered: