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-2.0.5-1 core autocommit bug #2133

Closed
leagueofsoups opened this issue Jul 11, 2019 · 2 comments
Closed

proxysql-2.0.5-1 core autocommit bug #2133

leagueofsoups opened this issue Jul 11, 2019 · 2 comments
Assignees

Comments

@leagueofsoups
Copy link

leagueofsoups commented Jul 11, 2019

centos 7 kernel 3.10.0-693.11.1.el7.x86_64

rpm -ivh https://github.com/sysown/proxysql/releases/download/v2.0.5/proxysql-2.0.5-1-centos7.x86_64.rpm

cat /etc/proxysql.cnf
datadir="/var/lib/proxysql"

scheduler=
(
)

admin_variables = {
mysql_ifaces = "127.0.0.1:6032;/tmp/proxysql_admin.sock"
admin_credentials = "FIXIT"
}

mysql_variables = {
interfaces = "0.0.0.0:3306;/tmp/proxysql.sock"
monitor_username = "monitor"
monitor_slave_lag_when_null = "9000"
monitor_password = "FIXIT"
}

mysql_users:
(
{ username = "login2", password = "pass1", default_hostgroup = 2, max_connections = 300, fast_forward = 0 })

mysql_servers =
()

mysql_replication_hostgroups=
()

mysql_query_rules:
()

Test script:
#!/usr/bin/python3.4

import mysql.connector
config = {'port': 3306, 'host': '10.0.4.100', 'password': 'pass1', 'database': 'base', 'user': 'login2' }
conn = mysql.connector.connect(**config)

Script output:
Traceback (most recent call last):
File "./core.py", line 5, in
conn = mysql.connector.connect(**config)
File "/usr/lib/python3.4/site-packages/mysql/connector/init.py", line 173, in connect
return MySQLConnection(*args, **kwargs)
File "/usr/lib/python3.4/site-packages/mysql/connector/connection.py", line 102, in init
self.connect(**kwargs)
File "/usr/lib/python3.4/site-packages/mysql/connector/abstracts.py", line 737, in connect
self._post_connection()
File "/usr/lib/python3.4/site-packages/mysql/connector/abstracts.py", line 713, in _post_connection
self.autocommit = self._autocommit
File "/usr/lib/python3.4/site-packages/mysql/connector/abstracts.py", line 530, in autocommit
self.cmd_query("SET @@session.autocommit = {0}".format(switch))
File "/usr/lib/python3.4/site-packages/mysql/connector/connection.py", line 553, in cmd_query
result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query))
File "/usr/lib/python3.4/site-packages/mysql/connector/connection.py", line 314, in _send_cmd
return self._socket.recv()
File "/usr/lib/python3.4/site-packages/mysql/connector/network.py", line 251, in recv_plain
raise errors.InterfaceError(errno=2013)
mysql.connector.errors.InterfaceError: 2013: Lost connection to MySQL server during query

Proxysql log:
Error: signal 11:
proxysql(_Z13crash_handleri+0x1a)[0x4a226a]
/lib64/libc.so.6(+0x36280)[0x7fe12dbaf280]
/lib64/libc.so.6(+0x15aea6)[0x7fe12dcd3ea6]
proxysql(_ZN13MySQL_Session21handler_SetAutocommitEP10_PtrSize_t+0x382)[0x4ecc32]
proxysql(_ZN13MySQL_Session23handler_special_queriesEP10_PtrSize_t+0x45b)[0x4f8aeb]
proxysql(_ZN13MySQL_Session7handlerEv+0xe4e)[0x4f9f6e]
proxysql(_ZN12MySQL_Thread20process_all_sessionsEv+0x1fc)[0x4dab6c]
proxysql(_ZN12MySQL_Thread3runEv+0xe16)[0x4e3fa6]
proxysql(_Z24mysql_worker_thread_funcPv+0x6c)[0x49ebcc]
/lib64/libpthread.so.0(+0x7dd5)[0x7fe12ed8edd5]
/lib64/libc.so.6(clone+0x6d)[0x7fe12dc76ead]
2019-07-11 15:39:38 main.cpp:1373:ProxySQL_daemonize_phase3(): [ERROR] ProxySQL crashed. Restarting!

Reproduce on proxysql with normal config (user, query rules, servers).
When update mysql_users set fast_forward=1; script not crash.

pip3.4 list | grep mysql-connector-python
mysql-connector-python 8.0.16

UPD: mysql -h -P -u -p -e 'SET @@session.autocommit=0;'

@leagueofsoups leagueofsoups changed the title proxysql-2.0.5-1 core proxysql-2.0.5-1 core session.autocommit bug Jul 11, 2019
@leagueofsoups leagueofsoups changed the title proxysql-2.0.5-1 core session.autocommit bug proxysql-2.0.5-1 core autocommit bug Jul 11, 2019
@renecannao
Copy link
Contributor

Bug confirmed.
Thank you for the report

@renecannao renecannao self-assigned this Jul 14, 2019
renecannao added a commit that referenced this issue Jul 14, 2019
Recession bug introduced in 2.0.5
@renecannao
Copy link
Contributor

Recession bug introduced in 2.0.5 , sorry about that.
Fixed again in 2.0.6 .
Thank you for the report.
Closing

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