Summary: | ASTERISK-06012: dblock blocking forever | ||
Reporter: | Kristof Köhler (kkoehler) | Labels: | |
Date Opened: | 2006-01-07 12:17:45.000-0600 | Date Closed: | 2008-01-15 16:12:21.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | In db.c, function ast_db_deltree the dblock mutex is locked, but not unlocked if dbinit() fails. This can lead to a deadlock. Version: 1.0.10 ****** ADDITIONAL INFORMATION ****** Patch: --- db.c.orig Sun Nov 13 18:12:51 2005 +++ db.c Sun Nov 13 18:13:16 2005 @@ -87,8 +87,10 @@ prefix[0] = '\0'; ast_mutex_lock(&dblock); - if (dbinit()) + if (dbinit()) { + ast_mutex_unlock(&dblock); return -1; + } memset(&key, 0, sizeof(key)); memset(&data, 0, sizeof(data)); I hereby disclaim all copyright interest in this patch. | ||
Comments: | By: Kristof Köhler (kkoehler) 2006-01-07 12:26:34.000-0600 This one is still present in SVN Head. By: Mark Spencer (markster) 2006-01-07 12:31:00.000-0600 Fixed in SVN head, thanks! By: Digium Subversion (svnbot) 2008-01-15 16:12:21.000-0600 Repository: asterisk Revision: 7856 U trunk/db.c ------------------------------------------------------------------------ r7856 | markster | 2008-01-15 16:12:21 -0600 (Tue, 15 Jan 2008) | 3 lines Fix potential deadlock (bug ASTERISK-6012) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7856 |