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
Segfault in t_reply of Kamailio v5.2.2 rev. 9bc44f #2055
Comments
Can you get the output for the next gdb commands:
|
Here it is,
|
Seems to be a removed transaction structure. Can the async operation take very long till it resumes the transaction processing? What kind of operations are done in this async execution? |
The async operation basically related to chat history setup on our production server. It fetches chat sessions and relevent info from backend (REDIS + MySQL or Elastic Search) using mod_perl. According to our load test results, the whole operation takes roughly 500 to 800 ms (<1 second) under normal conditions but may prolong upto 5000 ms (5 seconds) in case backend service (MySQL or ES) failure. The server logs show that transaction in question was started at 03:02:00 CET on Sept. 03, 2019 and kamailio crashed at 03:02:03 CET, there was a backend failure (REDIS was unreachable at the time). |
Do you still have the sip traffic for that transaction (requests/replies received/sent by kamailio)? If yes, you can send me the pcap to try to match with code execution. |
Hi, Sorry for late reply, i was travelling and didn't get chance to look at this issue. Anyways, no, we do not have sip trace. I only have syslogs which indicate that right before crash the REDIS connectivity failed.
|
Here is the code fragment that was executing in async process when crash happened,
Note that variable $avp(new_body) was set by PERL script. There is a theory from one of my developers is that since REDIS failed to connect so this variable was never set and when UAC tried to set NULL as JSON body for SIP MESSAGE request, the crashed must have happened. However, the core dump attached in this ticket does not confirm that. This resulted in this syslog messages,
Let know if you have any further queries. |
- transaction is expired in that moment, pending its destroy process - GH #2055
My expectation is that the crash happened because the transaction was resumed more or less when it was about to be destroyed. I pushed a patch to prevent that happening -- I will back port it. If you still get the crash with it, reopen. |
Description
Kamailio v5.2.2 rev. 9bc44f randomly crashes once a week. The problem seems to be related to TM and ASYNC modules as seen in back-trace of dump core below.
Troubleshooting
None. We have dump core file available for analysis.
Reproduction
Randomly, roughly once every 5 to 7 days.
Debugging Data
Log Messages
SIP Traffic
Not available
Possible Solutions
N/A
Additional Information
kamailio -v
The text was updated successfully, but these errors were encountered: