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

**reproducible bug***** buffer overflow detected ***: terminated #4785

Open
YATV opened this issue Jan 6, 2025 · 1 comment
Open

**reproducible bug***** buffer overflow detected ***: terminated #4785

YATV opened this issue Jan 6, 2025 · 1 comment

Comments

@YATV
Copy link

YATV commented Jan 6, 2025

ProxySQL version: 2.7.1-16-g2726c27
OS version: Ubuntu 24.04 LTS
Linux garth2 6.8.0-36-generic #36-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 10 10:49:14 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

The steps to reproduce the issue: start very hard and long query

*** buffer overflow detected *: terminated
Error: signal 6:
/usr/bin/proxysql(_Z13crash_handleri+0x41)[0x5d9fc61f9971]
/lib/x86_64-linux-gnu/libc.so.6(+0x45320)[0x78ba51445320]
/lib/x86_64-linux-gnu/libc.so.6(pthread_kill+0x11c)[0x78ba5149eb1c]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x1e)[0x78ba5144526e]
/lib/x86_64-linux-gnu/libc.so.6(abort+0xdf)[0x78ba514288ff]
/lib/x86_64-linux-gnu/libc.so.6(+0x297b6)[0x78ba514297b6]
/lib/x86_64-linux-gnu/libc.so.6(+0x136c19)[0x78ba51536c19]
/lib/x86_64-linux-gnu/libc.so.6(+0x1365d4)[0x78ba515365d4]
/usr/bin/proxysql(_ZN17MySQL_Data_Stream12buffer2arrayEv+0xe5f)[0x5d9fc626120f]
/usr/bin/proxysql(_ZN17MySQL_Data_Stream9read_pktsEv+0x22)[0x5d9fc6261462]
/usr/bin/proxysql(_ZN12MySQL_Thread27process_data_on_data_streamEP17MySQL_Data_Streamj+0x2e1)[0x5d9fc6269ea1]
/usr/bin/proxysql(_ZN12MySQL_Thread24ProcessAllMyDS_AfterPollEv+0x80)[0x5d9fc6278650]
/usr/bin/proxysql(_ZN12MySQL_Thread3runEv+0x365)[0x5d9fc6279c25]
/usr/bin/proxysql(_Z24mysql_worker_thread_funcPv+0xdf)[0x5d9fc61cc04b]
/lib/x86_64-linux-gnu/libc.so.6(+0x9ca94)[0x78ba5149ca94]
/lib/x86_64-linux-gnu/libc.so.6(+0x129c3c)[0x78ba51529c3c]
---- /usr/bin/proxysql(_Z13crash_handleri+0x41) [0x5d9fc61f9971] : crash_handler(int)
---- /usr/bin/proxysql(_ZN17MySQL_Data_Stream12buffer2arrayEv+0xe5f) [0x5d9fc626120f] : MySQL_Data_Stream::buffer2array()
---- /usr/bin/proxysql(_ZN17MySQL_Data_Stream9read_pktsEv+0x22) [0x5d9fc6261462] : MySQL_Data_Stream::read_pkts()
---- /usr/bin/proxysql(_ZN12MySQL_Thread27process_data_on_data_streamEP17MySQL_Data_Streamj+0x2e1) [0x5d9fc6269ea1] : MySQL_Thread::process_data_on_data_stream(MySQL_Data_Stream
, unsigned int)
---- /usr/bin/proxysql(_ZN12MySQL_Thread24ProcessAllMyDS_AfterPollEv+0x80) [0x5d9fc6278650] : MySQL_Thread::ProcessAllMyDS_AfterPoll()
---- /usr/bin/proxysql(_ZN12MySQL_Thread3runEv+0x365) [0x5d9fc6279c25] : MySQL_Thread::run()
---- /usr/bin/proxysql(_Z24mysql_worker_thread_funcPv+0xdf) [0x5d9fc61cc04b] : mysql_worker_thread_func(void
)
To report a crashing bug visit: https://github.com/sysown/proxysql/issues
For support visit: https://proxysql.com/services/support/
2025-01-06 11:54:25 main.cpp:1471:ProxySQL_daemonize_phase3(): [ERROR] ProxySQL crashed. Restarting!
2025-01-06 11:54:25 [INFO] ProxySQL version 2.7.1-16-g2726c27
2025-01-06 11:54:25 [INFO] ProxySQL SHA1 checksum: c7b60d324bcd8bd9212e4d6cc5568315015e5f0d
2025-01-06 11:54:25 [INFO] Trying to call external script after exit failure: (null)
2025-01-06 11:54:25 [INFO] SSL keys/certificates found in datadir (/var/lib/proxysql): loading them.
2025-01-06 11:54:25 [INFO] ProxySQL exited after only 6 seconds , below the 10 seconds threshold. Restarting attempt 1
2025-01-06 11:54:25 [INFO] Angel process is waiting 2 seconds before starting a new ProxySQL process
2025-01-06 11:54:27 [INFO] Angel process started ProxySQL process 4171151
2025-01-06 11:54:27 [INFO] SSL keys/certificates found in datadir (/var/lib/proxysql): loading them.
2025-01-06 11:54:27 [INFO] Loaded built-in SQLite3
Standard ProxySQL MySQL Logger rev. 2.5.0421 -- MySQL_Logger.cpp -- Fri Sep 20 15:51:19 2024
Standard ProxySQL Cluster rev. 0.4.0906 -- ProxySQL_Cluster.cpp -- Fri Sep 20 15:51:19 2024
Standard ProxySQL Statistics rev. 1.4.1027 -- ProxySQL_Statistics.cpp -- Fri Sep 20 15:51:19 2024
2025-01-06 11:54:27 [INFO] Using UUID from database: a20b69f7-a72e-4f6f-959a-14733a3ae93d
2025-01-06 11:54:27 [INFO] Computed checksum for 'LOAD ADMIN VARIABLES TO RUNTIME' was '0xAD0F2DB4B71C73B9', with epoch '1736164467'
2025-01-06 11:54:27 [INFO] Computed checksum for 'LOAD MYSQL VARIABLES TO RUNTIME' was '0xA822CA9FE3605629', with epoch '1736164467'
Standard ProxySQL Admin rev. 2.0.6.0805 -- ProxySQL_Admin.cpp -- Fri Sep 20 15:51:19 2024
2025-01-06 11:54:27 [INFO] ProxySQL SHA1 checksum: c7b60d324bcd8bd9212e4d6cc5568315015e5f0d
Standard MySQL Threads Handler rev. 0.2.0902 -- MySQL_Thread.cpp -- Fri Sep 20 15:51:19 2024
Standard MySQL Authentication rev. 0.2.0902 -- MySQL_Authentication.cpp -- Fri Sep 20 15:51:19 2024

@YATV
Copy link
Author

YATV commented Jan 9, 2025

To get such an error, you need to execute a huge MySQL insert query where the SQL query length exceeds 20 million characters.

ProxySQL buffer overflows, then crashes and restarts.

Such behavior makes it impossible for me to use ProxySQL in a large project.

It would be great if this issue could be fixed in future versions.

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