-
Notifications
You must be signed in to change notification settings - Fork 918
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
Random crashes on tcp_main.c:handle_tcp_child() on FreeBSD #2638
Comments
|
This could be specific to FreeBSD and libssl. Is it openssl lib or libressl? If it is openssl lib, maybe you can try to see if you can reproduce on Debian 10. I do not have any *BSD, not really familiar with FreeBSD, so I can't help much with this kind of environment, but maybe other devs want to jump in and try to help if they use *BSDes. |
|
@miconda, we use openssl. We can try to rebuild the kamailio with libressl support. I've investigated the problem much more and found out the crash has appeared on handle_tcp_child() instead tls_h_tcpconn_clean_f(). Example: or or What do you think might be causing the problem? |
|
It is known not to work with libssl, they removed some features from libssl that are needed by Kamailio (iirc, custom memory management). Are those crashes by a kamailio with tls module still loaded, or not? For the core of the first backtrace in the previous comment, can you get the output of the gdb commands: I see you use lldb, not that familiar with, that's why I gave the gdb commands, probably you can find the equivalent of them. |
|
@miconda, do you prefer a libressl? Yep, Kamailio is with a tls module. there're no sources on a target machine for the list/source list command P.S. We can help to find the possible bug in our environment. But if you suggest where to look. |
|
I think this also not will work with |
|
It is known not to work with libressl, I wanted to be sure that is not used. Can you also get the output for: |
|
@miconda, we use only OpenSSL. |
|
From the initial dump it looks like the problem is with ssl and memory management (it uses the wrong malloc). |
|
Crash with The problem was that the implementation of the pthreads library is different. |
|
I'm closing the issue as a resolved main annoying problem. I will open new issue if new problem will have occured (ex. on syslog() function). |
fixed crash in CRYPTO_THREAD_lock_free(): (enabled pthread_mutex_init() fix by LIBSSL_SET_MUTEX_SHARED flag kamailio/kamailio#2638 (comment)) Changes https://www.kamailio.org/pub/kamailio/5.4.5/ChangeLog PR: 255486 Reviewed by: koobs Approved by: maintainer MFH: 2021Q2
fixed crash in CRYPTO_THREAD_lock_free(): (enabled pthread_mutex_init() fix by LIBSSL_SET_MUTEX_SHARED flag kamailio/kamailio#2638 (comment)) Changes https://www.kamailio.org/pub/kamailio/5.4.5/ChangeLog PR: 255486 Reviewed by: koobs Approved by: maintainer MFH: 2021Q2 (cherry picked from commit 92942c5)
Description
We've random crashes (approx one occurrence per day) on handle_tcp_child().
Troubleshooting
Reproduction
The crash appears sometimes on closing TLS session (it doesn't have to be gracefully) initiated by remote edge or other conditions.
Debugging Data
All backtraces are differ from other on frames downed handle_tcp_child() (frame #17 on the backtrace).
Log Messages
Additional Information
kamailio -vThe text was updated successfully, but these errors were encountered: