Skip to content
New issue

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

WorkerThread[3119]: segfault at fffffffffffffffe ip 0000000000513388 sp 00007f200b01f9f0 error 6 in pika[400000+5bb000] 经常出现崩溃 #2972

Open
lvshaofeng opened this issue Dec 11, 2024 · 3 comments
Labels
☢️ Bug Something isn't working

Comments

@lvshaofeng
Copy link

Is this a regression?

Yes

Description

pika实例相关日志没有任何相关信息(我现在的pika版本是3.0.9<系统是centos 6.4>)
通过coredump打出的信息如下:

Please provide a link to a minimal reproduction of the bug

No response

Screenshots or videos

No response

Please provide the version you discovered this bug in (check about page for version information)

No response

Anything else?

No response

@lvshaofeng lvshaofeng added the ☢️ Bug Something isn't working label Dec 11, 2024
@lvshaofeng
Copy link
Author

[root@centos core_files]# gdb -c core-WorkerThread-1659-1733850077
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-92.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
[New Thread 3119]
[New Thread 3120]
[New Thread 3178]
[New Thread 3126]
[New Thread 3179]
[New Thread 3180]
[New Thread 1676]
[New Thread 27947]
[New Thread 3182]
[New Thread 3118]
[New Thread 14267]
[New Thread 3121]
[New Thread 1675]
[New Thread 3123]
[New Thread 3125]
[New Thread 3127]
[New Thread 3183]
[New Thread 1674]
[New Thread 1677]
[New Thread 1678]
[New Thread 1659]
[New Thread 3181]
[New Thread 3124]
[New Thread 3122]
Core was generated by /usr/local/pika_13004/bin/pika -c /data/pika_13004/pika.cnf'. Program terminated with signal 11, Segmentation fault. #0 0x0000000000513388 in ?? () (gdb) file /usr/local/pika_13004/bin/pika Reading symbols from /usr/local/pika_3.0.6/bin/pika...done. (gdb) core-file /data/core_files/core-WorkerThread-1659-1733850077 [New Thread 3119] [New Thread 3120] [New Thread 3178] [New Thread 3126] [New Thread 3179] [New Thread 3180] [New Thread 1676] [New Thread 27947] [New Thread 3182] [New Thread 3118] [New Thread 14267] [New Thread 3121] [New Thread 1675] [New Thread 3123] [New Thread 3125] [New Thread 3127] [New Thread 3183] [New Thread 1674] [New Thread 1677] [New Thread 1678] [New Thread 1659] [New Thread 3181] [New Thread 3124] [New Thread 3122] Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done. [Thread debugging using libthread_db enabled] Loaded symbols for /lib64/libpthread.so.0 Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib64/librt.so.1 Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done. Loaded symbols for /lib64/libz.so.1 Reading symbols from /lib64/libbz2.so.1...(no debugging symbols found)...done. Loaded symbols for /lib64/libbz2.so.1 Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib64/libm.so.6 Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done. Loaded symbols for /lib64/libgcc_s.so.1 Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib64/libc.so.6 Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 Core was generated by /usr/local/pika_13004/bin/pika -c /data/pika_13004/pika.cnf'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000513388 in pink::RedisConn::ProcessInputBuffer() () at /usr/local/include/c++/4.8.0/ext/atomicity.h:47
47 /usr/local/include/c++/4.8.0/ext/atomicity.h: No such file or directory.
in /usr/local/include/c++/4.8.0/ext/atomicity.h
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.5-7.el6_0.x86_64 glibc-2.12-1.212.el6.x86_64 libgcc-4.4.7-4.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0 0x0000000000513388 in pink::RedisConn::ProcessInputBuffer() () at /usr/local/include/c++/4.8.0/ext/atomicity.h:47
#1 0x0000000000513486 in pink::RedisConn::GetRequest() () at src/redis_conn.cc:310
#2 0x000000000051633a in pink::WorkerThread::ThreadMain() () at src/worker_thread.cc:175
#3 0x00000000005101ec in pink::Thread::RunThread(void*) () at src/pink_thread.cc:27
#4 0x00007f200fa8baa1 in start_thread () from /lib64/libpthread.so.0
#5 0x00007f200ed0fc4d in clone () from /lib64/libc.so.6
(gdb) info registers
rax 0xffffffffffffffee -18
rbx 0x6fabea88 1873537672
rcx 0x6fabea90 1873537680
rdx 0xffffffff 4294967295
rsi 0xfffffffffffffffe -2
rdi 0x220000 2228224
rbp 0x7f200b01fa50 0x7f200b01fa50
rsp 0x7f200b01f9f0 0x7f200b01f9f0
r8 0xc32f00 12791552
r9 0x6fabea80 1873537664
r10 0x6e69746e65735f5f 7956018234223976287
r11 0x107e00183a18060c 1188387455726257676
r12 0x39f61f60 972431200
r13 0x39f61f40 972431168
r14 0x7f200b01fa1f 139775600359967
r15 0x39f61ef0 972431088
rip 0x513388 0x513388 pink::RedisConn::ProcessInputBuffer()+408
eflags 0x10202 [ IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) x/i $pc
=> 0x513388 <_ZN4pink9RedisConn18ProcessInputBufferEv+408>: lock xadd %edx,(%rsi)

@wangshao1
Copy link
Collaborator

看堆栈是在解析网络包的时候踩内存了,但不知道具体是哪个变量导致的,bt full也没有打印具体值。如果有稳定复现的场景的话,麻烦提供下,我们这边复现下。
你们也可以在这些地方加一些日志或者assert。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


According to the stack, the memory was touched when parsing the network packet, but I don’t know which variable caused it, and bt full did not print the specific value. If there is a scene that can be reproduced stably, please provide it and we can reproduce it here.
You can also add some logs or asserts in these places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☢️ Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants