You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following two memory leaks have been detected during testing:
First leak
Leak is directly tied to handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE,
related to memory allocated to client_addr. As we can see by the log:
2021-09-10 16:13:55 MySQL_Session.cpp:5098:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(): [ERROR] ProxySQL Error: Access denied for user 'inv_user'@'10.200.1.2' (using password: YES)
2021-09-10 16:13:56 MySQL_Session.cpp:5098:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(): [ERROR] ProxySQL Error: Access denied for user 'inv_user'@'10.200.1.2' (using password: YES)
2021-09-10 16:13:56 MySQL_Session.cpp:5098:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(): [ERROR] ProxySQL Error: Access denied for user 'inv_user'@'10.200.1.2' (using password: YES)
2021-09-10 16:13:57 MySQL_Session.cpp:5098:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(): [ERROR] ProxySQL Error: Access denied for user 'inv_user'@'10.200.1.2' (using password: YES)
==1202933==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 44 byte(s) in 4 object(s) allocated from:
#0 0x7f1340b783f9 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:454
#1 0x565348b76756 in MySQL_Session::handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(_PtrSize_t*, bool*) /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Session.cpp:5059
#2 0x565348b61e4a in MySQL_Session::get_pkts_from_client(bool&, _PtrSize_t&) /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Session.cpp:3416
#3 0x565348b6bdd1 in MySQL_Session::handler() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Session.cpp:4254
#4 0x565348aeb2a0 in MySQL_Thread::process_all_sessions() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:3539
#5 0x565348ae51a3 in MySQL_Thread::run() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:3051
#6 0x565348902f6e in mysql_worker_thread_func(void*) /home/javjarfer/Projects/proxysql_v2.X.0/src/main.cpp:417
#7 0x7f1340903258 in start_thread (/usr/lib/libpthread.so.0+0x9258)
Direct leak of 36 byte(s) in 1 object(s) allocated from:
#0 0x7f1340bd3279 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x565348aaf5d4 in MySQL_Data_Stream::buffer2array() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:975
#2 0x565348aad8ff in MySQL_Data_Stream::read_pkts() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:892
#3 0x565348c36fd5 in child_mysql(void*) /home/javjarfer/Projects/proxysql_v2.X.0/lib/ProxySQL_Admin.cpp:4908
#4 0x7f1340903258 in start_thread (/usr/lib/libpthread.so.0+0x9258)
Leak is related with failed connections. Same result isn't achieved for non-failing
connections.
Second leak
Leak is related with SSL connections:
==1199044==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 252 byte(s) in 7 object(s) allocated from:
#0 0x7f3fb412b279 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x5612e29f05d4 in MySQL_Data_Stream::buffer2array() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:975
#2 0x5612e29ee8ff in MySQL_Data_Stream::read_pkts() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:892
#3 0x5612e2a28fa7 in MySQL_Thread::process_data_on_data_stream(MySQL_Data_Stream*, unsigned int) /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:3277
#4 0x5612e2a23dd0 in MySQL_Thread::ProcessAllMyDS_AfterPoll() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:2793
#5 0x5612e2a25f8d in MySQL_Thread::run() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:3035
#6 0x5612e2843f6e in mysql_worker_thread_func(void*) /home/javjarfer/Projects/proxysql_v2.X.0/src/main.cpp:417
#7 0x7f3fb3e5b258 in start_thread (/usr/lib/libpthread.so.0+0x9258)
Direct leak of 36 byte(s) in 1 object(s) allocated from:
#0 0x7f3fb412b279 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x5612e29f05d4 in MySQL_Data_Stream::buffer2array() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:975
#2 0x5612e29ee8ff in MySQL_Data_Stream::read_pkts() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:892
#3 0x5612e2b77fd5 in child_mysql(void*) /home/javjarfer/Projects/proxysql_v2.X.0/lib/ProxySQL_Admin.cpp:4908
#4 0x7f3fb3e5b258 in start_thread (/usr/lib/libpthread.so.0+0x9258)
The provided script should be enough to reproduce both issues, sanitizer output should be:
Direct leak of 108 byte(s) in 3 object(s) allocated from:
#0 0x7f1985b0d279 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x56403038a5d4 in MySQL_Data_Stream::buffer2array() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:975
#2 0x5640303888ff in MySQL_Data_Stream::read_pkts() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:892
#3 0x5640303c2fa7 in MySQL_Thread::process_data_on_data_stream(MySQL_Data_Stream*, unsigned int) /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:3277
#4 0x5640303bddd0 in MySQL_Thread::ProcessAllMyDS_AfterPoll() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:2793
#5 0x5640303bff8d in MySQL_Thread::run() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:3035
#6 0x5640301ddf6e in mysql_worker_thread_func(void*) /home/javjarfer/Projects/proxysql_v2.X.0/src/main.cpp:417
#7 0x7f198583d258 in start_thread (/usr/lib/libpthread.so.0+0x9258)
Direct leak of 108 byte(s) in 3 object(s) allocated from:
#0 0x7f1985b0d279 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
#1 0x56403038a5d4 in MySQL_Data_Stream::buffer2array() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:975
#2 0x5640303888ff in MySQL_Data_Stream::read_pkts() /home/javjarfer/Projects/proxysql_v2.X.0/lib/mysql_data_stream.cpp:892
#3 0x564030511fd5 in child_mysql(void*) /home/javjarfer/Projects/proxysql_v2.X.0/lib/ProxySQL_Admin.cpp:4908
#4 0x7f198583d258 in start_thread (/usr/lib/libpthread.so.0+0x9258)
Direct leak of 33 byte(s) in 3 object(s) allocated from:
#0 0x7f1985ab23f9 in __interceptor_strdup /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:454
#1 0x564030451756 in MySQL_Session::handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(_PtrSize_t*, bool*) /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Session.cpp:5059
#2 0x56403043ce4a in MySQL_Session::get_pkts_from_client(bool&, _PtrSize_t&) /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Session.cpp:3416
#3 0x564030446dd1 in MySQL_Session::handler() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Session.cpp:4254
#4 0x5640303c62a0 in MySQL_Thread::process_all_sessions() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:3539
#5 0x5640303c01a3 in MySQL_Thread::run() /home/javjarfer/Projects/proxysql_v2.X.0/lib/MySQL_Thread.cpp:3051
#6 0x5640301ddf6e in mysql_worker_thread_func(void*) /home/javjarfer/Projects/proxysql_v2.X.0/src/main.cpp:417
#7 0x7f198583d258 in start_thread (/usr/lib/libpthread.so.0+0x9258)
The following two memory leaks have been detected during testing:
First leak
Leak is directly tied to
handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE
,related to memory allocated to
client_addr
. As we can see by the log:Leak is related with failed connections. Same result isn't achieved for non-failing
connections.
Second leak
Leak is related with SSL connections:
v2.x
The provided script should be enough to reproduce both issues, sanitizer output should be:
Script:
reproduce_leaks.sh.tar.gz
The text was updated successfully, but these errors were encountered: