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

Rusty Newton (JIRA) noreply at issues.asterisk.org
Wed Apr 17 18:55:05 CDT 2013


Rusty Newton created ASTERISK-21541:
---------------------------------------

             Summary: [patch] chan_sip deadlock on monlock between unload_module and do_monitor
                 Key: ASTERISK-21541
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21541
             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


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