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

[proxysql2-2.0.10] crash in MySQL_Threads_Handler::get_non_idle_client_connections (this=this@entry=0x2b146c449700) at MySQL_Thread.cpp:6143 #2834

Closed
apircalabu opened this issue May 28, 2020 · 0 comments

Comments

@apircalabu
Copy link

apircalabu commented May 28, 2020

Haven't seen this one before, just out of the blue. Currently running proxysql2-2.0.10-1.1.el7.x86_64 from percona-release repo on CentOS 7. Core dump attached.
core.7987.gz
gdb backtrace:

Core was generated by `/usr/bin/proxysql -c /etc/proxysql.cnf'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000000004f2eb4 in MySQL_Threads_Handler::get_non_idle_client_connections (this=this@entry=0x2b146c449700) at MySQL_Thread.cpp:6143
6143	MySQL_Thread.cpp: No such file or directory.
Missing separate debuginfos, use: debuginfo-install proxysql2-2.0.10-1.1.el7.x86_64
(gdb) info threads 
  Id   Target Id         Frame 
  9    Thread 0x2b1475423700 (LWP 8006) 0x00002b146afd985d in nanosleep () from /lib64/libc.so.6
  8    Thread 0x2b1472e00700 (LWP 8000) 0x00002b1469ec0017 in pthread_join () from /lib64/libpthread.so.0
  7    Thread 0x2b1469990300 (LWP 7987) 0x00002b1469ec0017 in pthread_join () from /lib64/libpthread.so.0
  6    Thread 0x2b146dc14700 (LWP 7989) 0x00002b146b007c3d in poll () from /lib64/libc.so.6
  5    Thread 0x2b146d413700 (LWP 7988) 0x00002b1469ec2a35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  4    Thread 0x2b1475c00700 (LWP 8008) 0x00002b146afd985d in nanosleep () from /lib64/libc.so.6
  3    Thread 0x2b1473601700 (LWP 8290) 0x00002b146b007c3d in poll () from /lib64/libc.so.6
  2    Thread 0x2b1470584700 (LWP 7999) 0x00002b146afd985d in nanosleep () from /lib64/libc.so.6
* 1    Thread 0x2b146f080700 (LWP 7990) 0x00000000004f2eb4 in MySQL_Threads_Handler::get_non_idle_client_connections (this=this@entry=0x2b146c449700) at MySQL_Thread.cpp:6143
(gdb) thread 1
[Switching to thread 1 (Thread 0x2b146f080700 (LWP 7990))]
#0  0x00000000004f2eb4 in MySQL_Threads_Handler::get_non_idle_client_connections (this=this@entry=0x2b146c449700) at MySQL_Thread.cpp:6143
6143	in MySQL_Thread.cpp
(gdb) bt full
#0  0x00000000004f2eb4 in MySQL_Threads_Handler::get_non_idle_client_connections (this=this@entry=0x2b146c449700) at MySQL_Thread.cpp:6143
        thr = 0x2b1470c00000
        q = 0
        i = 0
#1  0x00000000004f3d40 in MySQL_Threads_Handler::SQL3_GlobalStatus (this=0x2b146c449700, _memory=_memory@entry=false) at MySQL_Thread.cpp:5067
        buf = "0\000\067\071\062\060\000\000\304\361{8\000\000\000\000\001\000\000\000\000\000\000\000\340\337\ao\024+\000\000p\337\ao\024+\000\000\222\311\034\303\375\177\000\000\317\367S㥛\304 \000\263f3g\000\000\000\340\337\ao\024+\000\000\375\207\002k\024+\000\000resident\024\342T\000\000\000\000\000ctive), AVG(mapped), AVGp?Fl\024+\000\000a), AVG(retainedH\354\331", '\000' <repeats 13 times>, "\236\037\354i\024+\000\000RE timesl\303\006\000\000\000\000\000\243h\245\032\000\000\000\000\060\060 AND tim"...
        pta = 0x2b147120ce90
        result = 0x2b1471273bc0
#2  0x0000000000553bcd in admin_main_loop (arg=0x2b146c48ee40) at ProxySQL_Admin.cpp:4590
        resultset = <optimized out>
        poll_wait = <optimized out>
        child = 47366835017472
        stacks = 8388608
        next_run = <optimized out>
        fds = 0x2b146c430900
        nfds = <optimized out>
        __PRETTY_FUNCTION__ = "void* admin_main_loop(void*)"
        callback_func = 0x2b146c4bcac0
        shutdown = 0x2b146c444c00
        attr = {__size = "\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\020", '\000' <repeats 37 times>, __align = 0}
        __func__ = "admin_main_loop"
        i = <optimized out>
        version = 5
        socket_names = {0x0, 0x2b147120cbc0 "0.0.0.0:6032", 0x0 <repeats 14 times>}
#3  0x00002b1469ebeea5 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#4  0x00002b146b0128dd in clone () from /lib64/libc.so.6
No symbol table info available.

Log entries for the crash:

2020-05-05 15:34:40 ProxySQL_GloVars.cpp:9:term_handler(): [WARNING] Received TERM signal: shutdown in progress...
2020-05-05 15:34:40 [INFO] Starting shutdown...
Error: signal 11:
/usr/bin/proxysql(_Z13crash_handleri+0x1a)[0x4ae55a]
/lib64/libc.so.6(+0x36400)[0x2b146af4a400]
/usr/bin/proxysql(_ZN21MySQL_Threads_Handler31get_non_idle_client_connectionsEv+0x34)[0x4f2eb4]
/usr/bin/proxysql(_ZN21MySQL_Threads_Handler17SQL3_GlobalStatusEb+0x2b0)[0x4f3d40]
/usr/bin/proxysql[0x553bcd]
/lib64/libpthread.so.0(+0x7ea5)[0x2b1469ebeea5]
/lib64/libc.so.6(clone+0x6d)[0x2b146b0128dd]
2020-05-05 15:34:40 main.cpp:1538:ProxySQL_daemonize_phase3(): [ERROR] ProxySQL crashed. Restarting!
2020-05-05 15:34:40 [INFO] ProxySQL version 2.0.10-percona-1.1
2020-05-05 15:34:40 [INFO] ProxySQL SHA1 checksum: 225445eaa4e1520032bd93f91b3ac503b00c0c60
2020-05-05 15:34:40 [INFO] Angel process started ProxySQL process 8963
Standard ProxySQL MySQL Logger rev. 2.0.0714 -- MySQL_Logger.cpp -- Fri Feb 28 13:11:05 2020
Standard ProxySQL Cluster rev. 0.4.0906 -- ProxySQL_Cluster.cpp -- Fri Feb 28 13:11:05 2020
Standard ProxySQL Statistics rev. 1.4.1027 -- ProxySQL_Statistics.cpp -- Fri Feb 28 13:11:05 2020
Standard ProxySQL HTTP Server Handler rev. 1.4.1031 -- ProxySQL_HTTP_Server.cpp -- Fri Feb 28 13:11:05 2020
Standard ProxySQL Admin rev. 2.0.6.0805 -- ProxySQL_Admin.cpp -- Fri Feb 28 13:11:05 2020
2020-05-05 15:34:40 [INFO] ProxySQL SHA1 checksum: 225445eaa4e1520032bd93f91b3ac503b00c0c60
Standard MySQL Threads Handler rev. 0.2.0902 -- MySQL_Thread.cpp -- Fri Feb 28 13:11:05 2020
Standard MySQL Authentication rev. 0.2.0902 -- MySQL_Authentication.cpp -- Fri Feb 28 13:11:05 2020
2020-05-05 15:34:40 [INFO] Starting shutdown...
2020-05-05 15:34:40 [INFO] Shutdown completed!
2020-05-05 15:34:40 [INFO] Exiting...
2020-05-05 15:34:40 [INFO] Shutdown angel process
2020-05-05 15:35:00 [INFO] ProxySQL version 2.0.10-percona-1.1
renecannao added a commit that referenced this issue Jun 7, 2020
Fixes #2834: Segfault due to invalid access to threads during startup / shutdown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant