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

Connections to ProxySQL will periodically segfault if IPv6 listening enabled #1646

Open
jdlawrie opened this Issue Aug 15, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@jdlawrie

jdlawrie commented Aug 15, 2018

OS: CentOS Linux release 7.5.1804 (Core)
ProxySQL Version: proxysql-1.4.9-1.1.el7.x86_64

If you configure ProxySQL to listen on IPv6, ProxySQL will periodically segfault.

  • It seems to do it more if you connect over IPv6, but happens over IPv4 too
  • It only seems to do it if you have a mysql shell open (mysql -BN -e didn't reproduce)
  • It happens around 5-20% of the time.

Steps to reproduce:

mysql> UPDATE global_variables SET variable_value='0.0.0.0:6032;[::1]:6032' WHERE variable_name='admin-mysql_ifaces';
Query OK, 1 row affected (0.00 sec)

mysql> SAVE ADMIN VARIABLES TO DISK;
Query OK, 31 rows affected (0.11 sec)

mysql> PROXYSQL RESTART

[root@centos7-pxc57-1 ~]# mysql -uadmin -padmin --port 6032 -h::1
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.30 (ProxySQL Admin Module)

Copyright (c) 2009-2018 Percona LLC and/or its affiliates
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> UPDATE mysql_servers SET comment='testing';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing2';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing3';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing4';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing5';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing6';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing7';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing8';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing9';
Query OK, 1 row affected (0.00 sec)

mysql> UPDATE mysql_servers SET comment='testing19';
ERROR 2013 (HY000): Lost connection to MySQL server during query

(same happens connecting on port 6033 and running SELECT NOW())

Log entry:

Error: signal 11:
proxysql(_Z13crash_handleri+0x1a)[0x44c5ba]
/lib64/libc.so.6(+0x362f0)[0x7fa70fe602f0]
proxysql[0x58e0a6]
proxysql(free+0x3b4)[0x55ea54]
proxysql[0x4ad911]
/lib64/libpthread.so.0(+0x7e25)[0x7fa711712e25]
/lib64/libc.so.6(clone+0x6d)[0x7fa70ff28bad]
2018-08-15 08:50:38 main.cpp:905:ProxySQL_daemonize_phase3(): [ERROR] ProxySQL crashed. Restarting!

Will attempt to follow up with a coredump later.

@renecannao

This comment has been minimized.

Show comment
Hide comment
@renecannao

renecannao Sep 6, 2018

Contributor

Thank you for the reproducible test case.
I am working on it.

Contributor

renecannao commented Sep 6, 2018

Thank you for the reproducible test case.
I am working on it.

@renecannao renecannao self-assigned this Sep 6, 2018

@renecannao renecannao added this to the v1.4.11 milestone Sep 6, 2018

pondix added a commit that referenced this issue Sep 6, 2018

Merge pull request #1677 from sysown/v1.4.11-1646
Bug fix for crash related to binding on IPv6 #1646
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment