diff -Nru rsyslog-5.8.11/debian/changelog rsyslog-5.8.11/debian/changelog --- rsyslog-5.8.11/debian/changelog 2012-12-07 08:18:18.000000000 -0500 +++ rsyslog-5.8.11/debian/changelog 2013-04-17 09:34:06.000000000 -0400 @@ -1,3 +1,11 @@ +rsyslog (5.8.11-2ubuntu1.1) raring-proposed; urgency=low + + [ Pierre Carrier ] + * debian/patches/04-fix_startup_deadlock.patch: + - Fixes deadlock during startup (LP: #1169740) + + -- Adam Stokes Wed, 17 Apr 2013 09:33:32 -0400 + rsyslog (5.8.11-2ubuntu1) raring; urgency=low * Merge from Debian unstable. Remaining changes: diff -Nru rsyslog-5.8.11/debian/patches/04-fix_startup_deadlock.patch rsyslog-5.8.11/debian/patches/04-fix_startup_deadlock.patch --- rsyslog-5.8.11/debian/patches/04-fix_startup_deadlock.patch 1969-12-31 19:00:00.000000000 -0500 +++ rsyslog-5.8.11/debian/patches/04-fix_startup_deadlock.patch 2013-04-17 09:33:31.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; + } + +@@ -791,6 +801,9 @@ + */ + # define PATHBUF_OVERHEAD 1 + iModNameLen + 3 + 1 + ++ /* acquire mutObjGlobalOp before &mutLoadUnload to prevent deadlocks */ ++ pthread_mutex_lock(&mutObjGlobalOp); ++ + pthread_mutex_lock(&mutLoadUnload); + + if(iModNameLen > 3 && !strcmp((char *) pModName + iModNameLen - 3, ".so")) { +@@ -916,6 +929,10 @@ + if(pPathBuf != pathBuf) /* used malloc()ed memory? */ + free(pPathBuf); + pthread_mutex_unlock(&mutLoadUnload); ++ ++ /* release obj lock */ ++ pthread_mutex_unlock(&mutObjGlobalOp); ++ + RETiRet; + } + +--- a/runtime/obj.c ++++ b/runtime/obj.c +@@ -97,7 +97,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.11/debian/patches/series rsyslog-5.8.11/debian/patches/series --- rsyslog-5.8.11/debian/patches/series 2012-12-07 07:54:02.000000000 -0500 +++ rsyslog-5.8.11/debian/patches/series 2013-04-17 09:32:56.000000000 -0400 @@ -2,3 +2,4 @@ 01-dont_create_db.patch 02-path_max.patch 03-fix_relp_dns_resolution.patch +04-fix_startup_deadlock.patch