Re: Crashes on saving query rules?

165 views
Skip to first unread message
Message has been deleted

René Cannaò

unread,
Sep 2, 2016, 3:41:19 PM9/2/16
to Paul Rydell, proxysql
Paul,

This seems a bug! Thanks for reporting.
I created an issue to track it: https://github.com/sysown/proxysql/issues/682
Probably has nothing to do with saving query rules: I suspect that this error is not handled gracefully:

Failed to mysql_change_user()2016-09-01 09:57:50 MySQL_Session.cpp:1324:handler(): [WARNING] Error during change user: 1226, User 'salt-faxburner' has exceeded the 'max_user_connections' resource (current value: 35)

Can you please share the core dump?

Thanks.

On 2 September 2016 at 09:18, Paul Rydell <paulr...@gmail.com> wrote:
During high activity I was creating query rules and running 

LOAD MYSQL QUERY RULES TO RUNTIME;
SAVE MYSQL QUERY RULES TO DISK;

to get them activated.

Later I noticed a few crashes and I believe they all matched up to when I was activating this new query rules.

Any possibility that saving these rules is causing these crashes?

Thanks,
Paul


Centos 7 running Source RPM  : proxysql-1.2.1-1.src.rpm.

Here is the entry from the log:

Failed to mysql_change_user()2016-09-01 09:57:50 MySQL_Session.cpp:1324:handler(): [WARNING] Error during change user: 1226, User 'salt-faxburner' has exceeded the 'max_user_connections' resource (current value: 35)

proxysql: ../include/MySQL_Data_Stream.h:41: void MyDS_real_query::init(PtrSize_t*): Assertion `QueryPtr==__null' failed.Error: signal 6:
proxysql(_Z13crash_handleri+0x1a)[0x43899a]
/lib64/libc.so.6(+0x35670)[0x7f7be70ab670]
/lib64/libc.so.6(gsignal+0x37)[0x7f7be70ab5f7]
/lib64/libc.so.6(abort+0x148)[0x7f7be70acce8]
/lib64/libc.so.6(+0x2e566)[0x7f7be70a4566]
/lib64/libc.so.6(+0x2e612)[0x7f7be70a4612]
proxysql(_ZN13MySQL_Session7handlerEv+0x2c1c)[0x45eedc]
proxysql(_ZN12MySQL_Thread20process_all_sessionsEv+0x1b2)[0x4532f2]
proxysql(_ZN12MySQL_Thread3runEv+0x54b)[0x454bbb]
proxysql(_Z24mysql_worker_thread_funcPv+0x54)[0x437344]
/lib64/libpthread.so.0(+0x7dc5)[0x7f7be88d5dc5]
/lib64/libc.so.6(clone+0x6d)[0x7f7be716c28d]
2016-09-01 09:57:50 main.cpp:607:ProxySQL_daemonize_phase3(): [ERROR] ProxySQL crashed. Restarting!
2016-09-01 09:57:50 [INFO] Angel process is waiting 1 seconds before starting a new ProxySQL process
2016-09-01 09:57:51 [INFO] Angel process started ProxySQL process 7568
2016-09-01 09:57:51 ProxySQL_Admin.cpp:2777:flush_mysql_variables___database_to_runtime(): [ERROR] Impossible to set not existing variable session_debug with value "(null)". Deleting
Standard ProxySQL Admin rev. 0.2.0902 -- ProxySQL_Admin.cpp -- Tue Aug  2 23:39:42 2016
Standard MySQL Threads Handler rev. 0.2.0902 -- MySQL_Thread.cpp -- Tue Aug  2 23:39:42 2016
Standard MySQL Authentication rev. 0.2.0902 -- MySQL_Authentication.cpp -- Tue Aug  2 23:39:42 2016
HID: 0 , address: 127.0.0.1 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 50 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0
HID: 2 , address: 54.183.190.149 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 50 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0
HID: 2 , address: 52.53.182.240 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 50 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0
HID: 2 , address: 52.88.241.119 , port: 3306 , weight: 1 , status: ONLINE , max_connections: 50 , max_replication_lag: 0 , use_ssl: 0 , max_latency_ms: 0
2016-09-01 09:57:51 [INFO] New mysql_replication_hostgroups table
Standard Query Processor rev. 0.2.0902 -- Query_Processor.cpp -- Tue Aug  2 23:39:42 2016
In memory Standard Query Cache (SQC) rev. 0.2.0902 -- Query_Cache.cpp -- Tue Aug  2 23:39:42 2016
2016-09-01 09:57:51 MySQL_Session.cpp:1193:handler(): [WARNING] Error during query on (0,127.0.0.1,3306): 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')  


And looking at core dump I see this:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `proxysql -c /etc/proxysql.cnf -D /var/lib/proxysql'.
Program terminated with signal 6, Aborted.
#0  0x00007f7be70ab5f7 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install proxysql-1.2.1-1.x86_64
(gdb) bt
#0  0x00007f7be70ab5f7 in raise () from /lib64/libc.so.6
#1  0x00007f7be70acce8 in abort () from /lib64/libc.so.6
#2  0x00007f7be70a4566 in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007f7be70a4612 in __assert_fail () from /lib64/libc.so.6
#4  0x000000000045eedc in init (_pkt=0x7f7be8cb4850, this=0x7f7bd87ee4c8) at ../include/MySQL_Data_Stream.h:41
#5  MySQL_Session::handler (this=this@entry=0x7f7bdab0ca00) at MySQL_Session.cpp:829
#6  0x00000000004532f2 in MySQL_Thread::process_all_sessions (this=this@entry=0x7f7be460d000) at MySQL_Thread.cpp:1958
#7  0x0000000000454bbb in MySQL_Thread::run (this=this@entry=0x7f7be460d000) at MySQL_Thread.cpp:1843
#8  0x0000000000437344 in mysql_worker_thread_func (arg=0x7f7be563c840) at main.cpp:163
#9  0x00007f7be88d5dc5 in start_thread () from /lib64/libpthread.so.0
#10 0x00007f7be716c28d in clone () from /lib64/libc.so.6

--
You received this message because you are subscribed to the Google Groups "proxysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

René Cannaò

unread,
Sep 2, 2016, 7:24:57 PM9/2/16
to Paul Rydell, proxysql
Paul,

I managed to reproduce the issue.
The bug is fixed and will be released in v1.2.3 .
It is a very simple bug fix .

I recommend one of these options:
* compile v1.2.3 : it is v1.2.2 (released today) + this bug fix
* apply the bug fix to v1.2.1 ad compile it
* tune mysql_servers.max_connections so to not have a very high number of backend connections : ProxySQL is very good at multiplexing multiple client connections into few backend connections.

Thank you again for the report!

Paul Rydell

unread,
Sep 6, 2016, 3:28:15 AM9/6/16
to proxysql, paulr...@gmail.com
Terrific! I will try that out.
--Paul
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages