Bug 159024

Summary: RPM expects PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
Product: [Fedora] Fedora Reporter: Mark Hatle <mhatle>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED UPSTREAM QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: gq, n3npq
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-07-13 10:48:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mark Hatle 2005-05-27 20:58:52 UTC
Description of problem:
rpmsq.c uses mutexs to manage the child processes.  These mutexes are defined
using default parameters.  RPM expects that PTHREAD_MUTEX_DEFAULT will have the
effects of PTHREAD_MUTEX_NORMAL.  POSIX 1003.1-2004 states that
PTHREAD_MUTEX_DEFAULT may be set to any standard POSIX mutex type, not
necessarily NORMAL.  This can lead to many unexpected problems, especially when
porting RPM to new OSes.

Version-Release number of selected component (if applicable):
4.3+

Additional info:

My suggestion is to add a simple:

#if PTHREAD_MUTEX_DEFAULT != PTHREAD_MUTEX_NORMAL
  #error RPM Expected PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
#endif

to the rpmio/rpmsq.c to help prevent future porting issues.. or if the defaults
ever change in an existing port.

Comment 1 Jeff Johnson 2005-07-13 10:48:31 UTC
Added to rpm-4_4 cvs, should be in rpm-4.4.2-0.8 when built. Thanks for the suggestion.