OK, this turns out to be a lot more complicated. I'll try to describe as accurately as possible.

Turns out SSL support was already disabled on the server-side, so in all above examples there was no SSL used for the database connection. Although that doesn't rule out libssl still being involved in the db code, to try to negotiate a SSL connection.

I was able to upgrade to Kamailio 5.3 without any problems, with exactly the same behavior as before; able to reproduce both failure modes.

With modparam("db_mysql", "opt_ssl_mode", 1) I can still easily reproduce failure mode 1.

I'm struggling to generate "accurate" backtraces for that, because either I'm crazy, or Kamailio keeps on "fixing itself" at exactly the moment I decide to run pstrap. It can be frozen for minutes, not responding to any TCP socket at all, then suddenly in the middle of the gdb process print a bunch of messages like "tcpconn_1st_send(): connect 157.245.69.206:40573 failed (RST) Connection refused" then continue to function again.

Nonetheless, even with modparam("db_mysql", "opt_ssl_mode", 1) I see libmysqlclient in the backtrace coming from various ssl functions, e.g.

#3  0x00007fe9a9c87d30 in ?? () from /usr/lib/x86_64-linux-gnu/libmysqlclient.so.20
#4  0x00007fe9a9275c63 in ssleay_rand_add (buf=0x7ffcf0a04b18, num=8, add=0) at md_rand.c:230

Finally, so far I'm completely unable to reproduce the issue when db_mysql.so is not loaded! Looks like having both db_mysql.so and tls.so loaded causes some kind of conflict..

That's a lot of input - does this help and/or is there any avenue you'd like me to debug further?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.