Summary: | ASTERISK-24512: asterisk -rx "module reload" + flag DEBUG_THREADS causes a deadlock | ||
Reporter: | Mikael Fredin (Zedekul) | Labels: | |
Date Opened: | 2014-11-10 10:11:06.000-0600 | Date Closed: | 2014-11-12 18:44:43.000-0600 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Core/Configuration |
Versions: | 1.8.27.0 1.8.31.1 | Frequency of Occurrence | Frequent |
Related Issues: | |||
Environment: | CentOS release 6.5 | Attachments: | ( 0) backtrace-threads.txt ( 1) core-show-locks.txt |
Description: | ,When using "DEBUG THREADS" in compiler flags, to be able to provide information for a deadlock issue, the asterisk -rx "module reload" command stops working after a while with the message (when trying to issue the command again):
VERBOSE[34579] loader.c: The previous reload command didn't finish yet And only a shutdown of asterisk seems to fix it. I am using res_config_mysql for realtime configuration as well, with 50000 rows or so, if that matters. Without the debugging it's very quick to load , and I cannot reproduce the error. With the debugging it takes a lot longer plus it takes just 5-10 reloads to reproduce the issue above. A weird thing happens when I issue the command: gdb -ex "thread apply all bt" --batch /usr/sbin/asterisk `pidof asterisk` > /tmp/backtrace-threads.txt ...the thread(s) seem to come alive again and I can use "module reload" a few more times until it locks. | ||
Comments: | By: Matt Jordan (mjordan) 2014-11-12 18:44:43.198-0600 This is a duplicate of ASTERISK-22851 By: Mikael Fredin (Zedekul) 2014-11-13 03:11:00.309-0600 Is it a duplicate? We experience a deadlock with only like 50+ calls, the more it goes above that the more likely a deadlock will be (SIP channel driver, not IAX). I have reported this before but needed a backtrace and to debug threads, but it seems leaving DEBUG_THREADS on is a big no no for us as it makes it deadlock even more. Catch-22. But I am suspecting our deadlocks may be one and the same - and that it happens even without DEBUG_THREADS, only that DEBUG_THREADS makes it a lot more likely because of how much slower the reload becomes. By: Mikael Fredin (Zedekul) 2014-11-13 03:20:00.998-0600 The "core show locks"-files in this issue and the other looks quite different as well. By: Mikael Fredin (Zedekul) 2014-11-14 03:19:14.027-0600 Reading more on the issue tracker, it is likely we're suffering from this: ASTERISK-21228 I will stop using pbx_realtime and see how that goes. |