Summary: | ASTERISK-19356: Deadlock in cel_sqlite3_custom module reload | ||
Reporter: | Alex VillacĂs Lasso (a_villacis) | Labels: | |
Date Opened: | 2012-02-14 11:41:37.000-0600 | Date Closed: | 2012-02-14 12:16:19.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | CEL/cel_sqlite3_custom |
Versions: | 1.8.9.1 1.8.9.2 | Frequency of Occurrence | Frequent |
Related Issues: | |||
Environment: | Linux pbx.palosanto.com 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:22:04 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux | Attachments: | |
Description: | On module reload, cel_sqlite3_custom will incorrectly lock again a lock instead of unlocking it. A possible way to reproduce: 1) Load cel_sqlite3_custom 2) Reload module at least twice [root@pbx tmp]# asterisk -rnx 'core show locks' ======================================================================= === Currently Held Locks ============================================== ======================================================================= === === <pending> <lock#> (<file>): <lock type> <line num> <function> <lock name> <lock addr> (times locked) === === Thread ID: 0x4064a940 (tps_processing_function started at [ 451] taskprocessor.c ast_taskprocessor_get()) === ---> Lock #0 (event.c): RDLOCK 1452 handle_event &(&ast_event_subs[event_types[i]])->lock 0x8348d8 (1) /usr/sbin/asterisk(ast_bt_get_addresses+0x1a) [0x4f2390] /usr/sbin/asterisk(__ast_rwlock_rdlock+0xf6) [0x4eceae] /usr/sbin/asterisk [0x4b65f4] /usr/sbin/asterisk [0x564c5e] /usr/sbin/asterisk [0x577618] /lib64/libpthread.so.0 [0x3be5a0673d] /lib64/libc.so.6(clone+0x6d) [0x3be4ed44bd] === ---> Waiting for Lock #1 (cel_sqlite3_custom.c): MUTEX 241 write_cel &lock 0x2aaac7751380 (1) /usr/sbin/asterisk(ast_bt_get_addresses+0x1a) [0x4f2390] /usr/sbin/asterisk(__ast_pthread_mutex_lock+0xf6) [0x4eac91] /usr/lib64/asterisk/modules/cel_sqlite3_custom.so [0x2aaac754fbf9] /usr/sbin/asterisk [0x4b667b] /usr/sbin/asterisk [0x564c5e] /usr/sbin/asterisk [0x577618] /lib64/libpthread.so.0 [0x3be5a0673d] /lib64/libc.so.6(clone+0x6d) [0x3be4ed44bd] === --- ---> Locked Here: cel_sqlite3_custom.c line 354 (reload) === --- ---> Locked Here: cel_sqlite3_custom.c line 356 (reload) === ------------------------------------------------------------------- === ======================================================================= | ||
Comments: |