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

ProxySQL Crash on Signal 11[Core dump attached] #1586

Closed
s4sukan opened this issue Jul 2, 2018 · 6 comments
Closed

ProxySQL Crash on Signal 11[Core dump attached] #1586

s4sukan opened this issue Jul 2, 2018 · 6 comments

Comments

@s4sukan
Copy link

s4sukan commented Jul 2, 2018

Hi @renecannao ,

ProxySQL is crashing every now and then with signal 11, managed to get the core dump.

#0 0x00007f70fdf32a97 in _strcpy_sse2_unaligned () from /lib64/libc.so.6
No symbol table info available.
#1 0x000000000048c0bc in MySQL_Session::handler (this=this@entry=0x7f70f13bcc80) at MySQL_Session.cpp:2940
sqlstate = "2018-07-02"
retry_conn = false
myerr =
errmsg = 0x0
myconn = 0x7f70ecb8bb80
myds = 0x7f70e49e8e00
rc =
begint = {tv_sec = 140122987267040, tv_nsec = 140122776519040}
endt = {tv_sec = 0, tv_nsec = 26}
prepared_stmt_with_no_params = false
pkt = {ptr = 0x7f70ec9e4b40, size = 26}
c =
PRETTY_FUNCTION = "int MySQL_Session::handler()"
func = "handler"
wrong_pass = false
#2 0x0000000000471fec in MySQL_Thread::process_all_sessions (this=this@entry=0x7f70fa60d000) at MySQL_Thread.cpp:3237
sess = 0x7f70f13bcc80
total_active_transactions
= 0
idle_maintenance_thread = false
sess_sort =
total_active_transactions_tmp =
n = 74
rc =
#3 0x000000000047b036 in MySQL_Thread::run (this=this@entry=0x7f70fa60d000) at MySQL_Thread.cpp:3024
num_idles =
maintenance_interval =
idle_maintenance_thread =
PRETTY_FUNCTION = "void MySQL_Thread::run()"
func = "run"
n =
rc =
#4 0x000000000044a6ec in mysql_worker_thread_func (arg=0x7f70fc4a52e0) at main.cpp:243
thread_attr = {__size = '\000' <repeats 17 times>, "\020", '\000' <repeats 37 times>, __align = 0}
tmp_stack_size = 8388608
mysql_thread = 0x7f70fc4a52e0
worker = 0x7f70fa60d000
#5 0x00007f70ff77bdc5 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#6 0x00007f70fdf9421d in clone () from /lib64/libc.so.6

Let me know if you need anything else

@renecannao
Copy link
Contributor

Hi @s4sukan .
Please provide more information. Specifically:

  • what proxysql version ? Can you provide the binary?
  • can you provide the core dump?
  • what OS version?

Thanks

@s4sukan
Copy link
Author

s4sukan commented Jul 2, 2018

@renecannao
Please find the replies inline

  • what proxysql version ? Can you provide the binary?
    1.4.8-32-g669c149, downloaded from here
  • can you provide the core dump?
    Shared the same rene.cannao at gmail
  • what OS version?
    CentOS Linux release 7.5.1804 (Core)

@renecannao
Copy link
Contributor

Thanks

@renecannao
Copy link
Contributor

Hi @s4sukan . Thank you for the core dump.
It seems a known issue, fixed by @pondix in 3819fb2 .
Please upgrade to ProxySQL 1.4.9 .
Thanks

@s4sukan
Copy link
Author

s4sukan commented Jul 2, 2018

Great @renecannao Shall upgrade right way.
Ccould you share how did you manage to find this from the core dump, it would be helpful if you provide us with some more stats on how to process the core dump!!. So instead of catching you each time, we can find out what is really happening.

@renecannao
Copy link
Contributor

Sure.

(gdb) bt
#0  0x00007f0727b6bb06 in __strcpy_ssse3 () from /lib64/libc.so.6
#1  0x000000000048c0bc in MySQL_Session::handler (this=this@entry=0x7f07157efe00) at MySQL_Session.cpp:2940
#2  0x0000000000471fec in MySQL_Thread::process_all_sessions (this=this@entry=0x7f072460d000) at MySQL_Thread.cpp:3237
#3  0x000000000047b036 in MySQL_Thread::run (this=this@entry=0x7f072460d000) at MySQL_Thread.cpp:3024
#4  0x000000000044a6ec in mysql_worker_thread_func (arg=0x7f07260a52c0) at main.cpp:243
#5  0x00007f07292f3e25 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f0727b09bad in twalk () from /lib64/libc.so.6
#7  0x0000000000000000 in ?? ()
(gdb) l 2940
2935										}
2936										break;
2937									case PROCESSING_STMT_EXECUTE:
2938										{
2939											char sqlstate[10];
2940											sprintf(sqlstate,"%s",mysql_sqlstate(myconn->mysql));
2941											client_myds->myprot.generate_pkt_ERR(true,NULL,NULL,client_myds->pkt_sid+1,mysql_errno(myconn->mysql),sqlstate,(char *)mysql_stmt_error(myconn->query.stmt));
2942											client_myds->pkt_sid++;
2943										}
2944										break;
(gdb) up      
#1  0x000000000048c0bc in MySQL_Session::handler (this=this@entry=0x7f07157efe00) at MySQL_Session.cpp:2940
2940											sprintf(sqlstate,"%s",mysql_sqlstate(myconn->mysql));
(gdb) p myconn 
$3 = (MySQL_Connection *) 0x7f071adf7980
(gdb) p myconn->mysql
$4 = (MYSQL *) 0x0

myconn->mysql is NULL. This is exactly the part of the code fixed in the mentioned commit.
Thanks

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

2 participants