non-blocking API appears to be blocking for secure connections
I am encountering delays when using secure connections to AuroraDB, and wondering if the client lib (C-connector) is making lengthy system calls.
Here is a callstack when not connected (and want to connected):
#0 0x00007f34ce333394 in __libc_read (fd=227, buf=0x7e3bc664ed93, nbytes=5) at ../sysdeps/unix/sysv/linux/read.c:27 #1 0x00007f34cd1a8b7e in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 #2 0x00007f34cd1a3fba in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 #3 0x00007f34cd1a2e53 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 #4 0x00007f34cd1a3403 in BIO_read () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 #5 0x00007f34cd5e4913 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #6 0x00007f34cd5e8fbd in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #7 0x00007f34cd5e66c2 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #8 0x00007f34cd5ed995 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #9 0x00007f34cd5f8232 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #10 0x00007f34cd5f8353 in SSL_read () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #11 0x00007f34ccec5437 in ma_tls_read_async (pvio=pvio@entry=0x7e3bc6982110, buffer=buffer@entry=0x7e3bc7b9b5b0 "9", length=length@entry=16384) at /mariadb-connector-c-3.1.12-src/libmariadb/secure/openssl.c:589 #12 0x00007f34cceb54cc in ma_pvio_read (pvio=pvio@entry=0x7e3bc6982110, buffer=0x7e3bc7b9b5b0 "9", length=length@entry=16384) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_pvio.c:228 #13 0x00007f34cceb56e3 in ma_pvio_cache_read (pvio=0x7e3bc6982110, buffer=buffer@entry=0x7e3bc7291cd0 "\021", length=length@entry=7) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_pvio.c:297 #14 0x00007f34cceaba76 in ma_real_read (net=net@entry=0x7e13c7594fa8, complen=complen@entry=0x7e3bc756c628) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_net.c:380 #15 0x00007f34cceac4ac in ma_net_read (net=net@entry=0x7e13c7594fa8) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_net.c:555 #16 0x00007f34cceb1571 in ma_net_safe_read (mysql=mysql@entry=0x7e13c7594fa8) at /mariadb-connector-c-3.1.12-src/libmariadb/mariadb_lib.c:200 #17 0x00007f34cceb4ca8 in mthd_my_read_query_result (mysql=0x7e13c7594fa8) at /mariadb-connector-c-3.1.12-src/libmariadb/mariadb_lib.c:2314 #18 0x00007f34cceb27c2 in mthd_my_real_connect (mysql=0x7e13c7594fa8, host=<optimized out>, user=<optimized out>, passwd=0x7e13c74f03b0 "B1b-_1824b448ffb3f497064872ef54fe1a4a035451c1d8478b71e4ce4ce3e76f4f", db=0x7e13c74f1650 "test_gsilt_1m_common_main_xone_Load7d44167e04", port=<optimized out>, unix_socket=<optimized out>, client_flag=2147549344) at /mariadb-connector-c-3.1.12-src/libmariadb/mariadb_lib.c:1678 #19 0x00007f34cceaf308 in mysql_real_connect (mysql=0x7e13c7594fa8, host=0x7e13c7594f70 "10.94.7.87", user=0x7e13c74f0774 "rwapp_355bf29784", passwd=0x7e13c74f03b0 "B1b-_1824b448ffb3f497064872ef54fe1a4a035451c1d8478b71e4ce4ce3e76f4f", db=0x7e13c74f1650 "test_gsilt_1m_common_main_xone_Load7d44167e04", port=3306, unix_socket=0x0, client_flag=2147549184) at /mariadb-connector-c-3.1.12-src/libmariadb/mariadb_lib.c:1295 #20 0x00007f34cced7031 in mysql_real_connect_start_internal (d=<optimized out>) at /mariadb-connector-c-3.1.12-src/libmariadb/mariadb_async.c:332 #21 0x00007f34cceda851 in my_context_spawn (c=0x7e3bc69c3000, f=0x7e3bc664ed93, d=0x5) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_context.c:201
and callstack when already connected:
#0 0x00007ffb4282d394 in __libc_read (fd=232, buf=0x7f023b656033, nbytes=5) at ../sysdeps/unix/sysv/linux/read.c:27 #1 0x00007ffb416a2b7e in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 #2 0x00007ffb4169dfba in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 #3 0x00007ffb4169ce53 in ?? () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 #4 0x00007ffb4169d403 in BIO_read () from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 #5 0x00007ffb41ade913 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #6 0x00007ffb41ae2fbd in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #7 0x00007ffb41ae06c2 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #8 0x00007ffb41ae7995 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #9 0x00007ffb41af2232 in ?? () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #10 0x00007ffb41af2353 in SSL_read () from /usr/lib/x86_64-linux-gnu/libssl.so.1.1 #11 0x00007ffb413bf437 in ma_tls_read_async (pvio=pvio@entry=0x7f023b6495f0, buffer=buffer@entry=0x7f023b6fedf0 "\035", length=length@entry=16384) at /mariadb-connector-c-3.1.12-src/libmariadb/secure/openssl.c:589 #12 0x00007ffb413af4cc in ma_pvio_read (pvio=pvio@entry=0x7f023b6495f0, buffer=0x7f023b6fedf0 "\035", length=length@entry=16384) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_pvio.c:228 #13 0x00007ffb413af6e3 in ma_pvio_cache_read (pvio=0x7f023b6495f0, buffer=buffer@entry=0x7f023b85e810 "\001", length=length@entry=7) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_pvio.c:297 #14 0x00007ffb413a5a76 in ma_real_read (net=net@entry=0x7eda3bab9088, complen=complen@entry=0x7f023b898f08) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_net.c:380 #15 0x00007ffb413a64ac in ma_net_read (net=net@entry=0x7eda3bab9088) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_net.c:555 #16 0x00007ffb413ab571 in ma_net_safe_read (mysql=mysql@entry=0x7eda3bab9088) at /mariadb-connector-c-3.1.12-src/libmariadb/mariadb_lib.c:200 #17 0x00007ffb413ad82b in mthd_my_send_cmd (mysql=0x7eda3bab9088, command=<optimized out>, arg=0x7ffb413d8232 "", length=<optimized out>, skipp_check=0 '\000', opt_arg=<optimized out>) at /mariadb-connector-c-3.1.12-src/libmariadb/mariadb_lib.c:427 #18 0x00007ffb413adad8 in mysql_ping (mysql=0x7eda3bab9088) at /mariadb-connector-c-3.1.12-src/libmariadb/mariadb_lib.c:2792 #19 0x00007ffb413d12e4 in mysql_ping_start_internal (d=<optimized out>) at /mariadb-connector-c-3.1.12-src/libmariadb/mariadb_async.c:1028 #20 0x00007ffb413d4851 in my_context_spawn (c=0x7f023bb4f480, f=0x7f023b656033, d=0x5) at /mariadb-connector-c-3.1.12-src/libmariadb/ma_context.c:201
Using a more recent version (3.2.6) did not make a difference.
Answer Answered by Vladislav Vaintroub in this comment.
I filed a bug on your behalf https://jira.mariadb.org/browse/CONC-594
Generally, it is more efficient to file bugs JIRA, instead of using KB for doing the same. "KB bugs" can't be assigned, tracked, and planned.
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.