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

Kevin Harwell reviewboard at asterisk.org
Wed Feb 11 12:02:18 CST 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4409/
-----------------------------------------------------------

(Updated Feb. 11, 2015, 12:02 p.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 431698


Bugs: ASTERISK-24741
    https://issues.asterisk.org/jira/browse/ASTERISK-24741


Repository: Asterisk


Description
-------

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.


Diffs
-----

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

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


Testing
-------

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.


Thanks,

Kevin Harwell

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


More information about the asterisk-dev mailing list