[asterisk-dev] [Code Review] 4409: res_pjsip: dtls_handler causes Asterisk to crash

Kevin Harwell reviewboard at asterisk.org
Fri Feb 6 18:25:23 CST 2015

This is an automatically generated e-mail. To reply, visit:

Review request for Asterisk Developers.

Bugs: ASTERISK-24741

Repository: Asterisk


There have been a couple of times where a crash occurred in the dtls_handler section of the code for res_pjsip. Unfortunately, in working this issue the problem was unable to be reproduced. After looking at the backtraces and through the code the current best guess as to why this happened might be due to a reentrance problem and the strtok function. So, the current fix is to convert the strtok function into the reentrant version of the function, strtok_r.


  branches/13/res/res_pjsip/pjsip_configuration.c 431572 

Diff: https://reviewboard.asterisk.org/r/4409/diff/


Ran through the pjsip testsuite tests to make sure no crashes occurred or anything else out of the ordinary. Also while running asterisk with res_pjsip configured to use realtime issued reloads every 0.1 seconds while also executing the show endpoint command at the same interval in an attempt to potentially cause two threads to enter the dtls_handler function at the same time. No crashes occurred.


Kevin Harwell

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150207/87dbb097/attachment.html>

More information about the asterisk-dev mailing list