diff -Nru rsyslog-5.8.6/debian/changelog rsyslog-5.8.6/debian/changelog --- rsyslog-5.8.6/debian/changelog 2012-12-05 07:32:08.000000000 -0500 +++ rsyslog-5.8.6/debian/changelog 2013-04-17 09:54:40.000000000 -0400 @@ -1,3 +1,10 @@ +rsyslog (5.8.6-1ubuntu8.2) precise-proposed; urgency=low + + * debian/patches/02-fix_startup_deadlock.patch: + - Fixes deadlock during startup (LP: #1169740) + + -- Adam Stokes Wed, 17 Apr 2013 09:54:00 -0400 + rsyslog (5.8.6-1ubuntu8.1) precise-proposed; urgency=low * debian/patches/101-fix-rfc5424-instabilities.patch: diff -Nru rsyslog-5.8.6/debian/patches/02-fix_startup_deadlock.patch rsyslog-5.8.6/debian/patches/02-fix_startup_deadlock.patch --- rsyslog-5.8.6/debian/patches/02-fix_startup_deadlock.patch 1969-12-31 19:00:00.000000000 -0500 +++ rsyslog-5.8.6/debian/patches/02-fix_startup_deadlock.patch 2013-04-17 09:54:00.000000000 -0400 @@ -0,0 +1,68 @@ +## Description: add some description +## Origin/Author: add some origin or author +## Bug: bug URL +--- a/runtime/modules.c ++++ b/runtime/modules.c +@@ -74,6 +74,9 @@ + */ + static pthread_mutex_t mutLoadUnload; + ++/* mutObjGlobalOp defined in obj.c */ ++extern pthread_mutex_t mutObjGlobalOp; ++ + static modInfo_t *pLoadedModules = NULL; /* list of currently-loaded modules */ + static modInfo_t *pLoadedModulesLast = NULL; /* tail-pointer */ + +@@ -667,6 +670,9 @@ + pThis = *ppThis; + assert(pThis != NULL); + ++ /* acquire mutObjGlobalOp before &mutLoadUnload to prevent deadlocks */ ++ pthread_mutex_lock(&mutObjGlobalOp); ++ + pthread_mutex_lock(&mutLoadUnload); + + /* first check if we are permitted to unload */ +@@ -704,6 +710,10 @@ + + finalize_it: + pthread_mutex_unlock(&mutLoadUnload); ++ ++ /* release obj lock */ ++ pthread_mutex_unlock(&mutObjGlobalOp); ++ + RETiRet; + } + +@@ -779,6 +789,9 @@ + assert(pModName != NULL); + dbgprintf("Requested to load module '%s'\n", pModName); + ++ /* acquire mutObjGlobalOp before &mutLoadUnload to prevent deadlocks */ ++ pthread_mutex_lock(&mutObjGlobalOp); ++ + pthread_mutex_lock(&mutLoadUnload); + + iModNameLen = strlen((char *) pModName); +@@ -904,6 +917,10 @@ + + finalize_it: + pthread_mutex_unlock(&mutLoadUnload); ++ ++ /* release obj lock */ ++ pthread_mutex_unlock(&mutObjGlobalOp); ++ + RETiRet; + } + +--- a/runtime/obj.c ++++ b/runtime/obj.c +@@ -99,7 +99,7 @@ + DEFobjCurrIf(errmsg) + DEFobjCurrIf(strm) + static objInfo_t *arrObjInfo[OBJ_NUM_IDS]; /* array with object information pointers */ +-static pthread_mutex_t mutObjGlobalOp; /* mutex to guard global operations of the object system */ ++pthread_mutex_t mutObjGlobalOp; /* mutex to guard global operations of the object system */ + + + /* cookies for serialized lines */ diff -Nru rsyslog-5.8.6/debian/patches/series rsyslog-5.8.6/debian/patches/series --- rsyslog-5.8.6/debian/patches/series 2012-12-05 07:31:58.000000000 -0500 +++ rsyslog-5.8.6/debian/patches/series 2013-04-17 09:53:51.000000000 -0400 @@ -3,3 +3,4 @@ # Ubuntu patches for rsyslog 100-imuxsock-allow-missing-date.patch 101-fix-rfc5424-instabilities.patch +02-fix_startup_deadlock.patch