[asterisk-bugs] [JIRA] (ASTERISK-21406) [patch] chan_sip deadlock on monlock between unload_module and do_monitor

David Brillert (JIRA) noreply at issues.asterisk.org
Thu Jul 18 08:08:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-21406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=208042#comment-208042 ] 

David Brillert commented on ASTERISK-21406:
-------------------------------------------

I might be experiencing the same deadlock.
Do you have a gdb trace you can upload so I can compare traces?
                
> [patch] chan_sip deadlock on monlock between unload_module and do_monitor
> -------------------------------------------------------------------------
>
>                 Key: ASTERISK-21406
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21406
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: 11.4.0
>         Environment: Ubuntu/quantal, eglibc-2.15-0ubuntu20
>            Reporter: Corey Farrell
>         Attachments: chan_sip-unload-testfix.patch
>
>
> unload_module cancels/joins the monitor thread while holding monlock.  If do_monitor attempts to lock monlock while unload_module already has it, they deadlock.  do_monitor waits for monlock while unload_module waits for do_monitor to exit.
> I've experienced this issue a couple of times in production when attempting to shutting down.  I found the cause while running valgrind tests.  I believe valgrind slowed things down so much it caused the deadlock to occur somewhat reliably.  I could not replicate the issue with lock debugging enabled.  I added ast_log messages to unload_module, found that they stopped while monlock was held.  The valgrind testing was done with 'make samples', no changes to /etc/asterisk.  I tried attaching gdb once the lock occured but it could not find symbols (probably because of valgrind).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list