Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 159024 - RPM expects PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
Summary: RPM expects PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-27 20:58 UTC by Mark Hatle
Modified: 2010-05-12 21:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-07-13 10:48:31 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.