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 228936 - getpwuid_r causes a multi threads program core dump
Summary: getpwuid_r causes a multi threads program core dump
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: glibc
Version: 4.4
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-02-15 22:54 UTC by Yi Zhou
Modified: 2008-02-19 02:29 UTC (History)
0 users

Fixed In Version: 2.3.4-2.36
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-19 02:29:46 UTC


Attachments (Terms of Use)
Test program (deleted)
2007-02-15 22:58 UTC, Yi Zhou
no flags Details | Diff

Description Yi Zhou 2007-02-15 22:54:52 UTC
Description of problem:When a program creates multi threads to invoke  
getpwuid_r, getpwuid_r causes the program core dump when the program is 
running in a for loop for a couple of minutes.


Version-Release number of selected component (if applicable):
libc.so.6

How reproducible:





Steps to Reproduce:
1.Compile attached program
2.run following script:
while true
do
  ./testgetpwuid > output 2>&1
  if [ $? -gt 0 ] ; then
     break;
  fi
done

3.After a couple of minutes, program testgetpwuid core dump and the core stack 
trace is following:
#0  0x00aa858a in __nscd_get_map_ref () from /lib/tls/libc.so.6
#1  0x00aa6854 in nscd_getpw_r () from /lib/tls/libc.so.6
#2  0x00aa6ba7 in __nscd_getpwuid_r () from /lib/tls/libc.so.6
#3  0x00a3967a in getpwuid_r@@GLIBC_2.1.2 () from /lib/tls/libc.so.6
#4  0x08048a50 in testgetpwuid_r ()
#5  0x00be7341 in start_thread () from /lib/tls/libpthread.so.0
#6  0x00a776fe in clone () from /lib/tls/libc.so.6

  
Actual results:


Expected results:


Additional info:

Comment 1 Yi Zhou 2007-02-15 22:58:42 UTC
Created attachment 148157 [details]
Test program

Comment 2 Jakub Jelinek 2007-02-15 23:03:40 UTC
You haven't said which exact glibc version you are using or whether the user
data is provided by /etc/passwd, NIS, NIS+, LDAP or some other services.
There have been several fixes in the nscd client code since RHEL4.4,
can you please try:
http://people.redhat.com/jakub/glibc/2.3.4-2.36.1/
if you have an older glibc than that?

Comment 3 Yi Zhou 2007-02-16 07:28:02 UTC
Yes, the user data ia provided by /etc/passwd, NIS,... The test program can be 
run succesfully for a few times. The glibc version which we are using is glibc-
2.3.4-2.13.


Comment 4 Jakub Jelinek 2007-02-16 20:18:00 UTC
2.3.4-2.13 is 18 month old, there have been really many bugfixes even in this
area since then.

Comment 5 Yi Zhou 2007-02-17 00:27:00 UTC
Hi Jakub,

I have upgraded the glibc to the version that you have suggested. The problem 
appears resolved. Thanks! 

Which release patch we should notify our customer to use in order to solve 
this problem. What is your recomentation? Thanks!

Comment 6 Jakub Jelinek 2007-02-18 16:49:47 UTC
Try RHEL4 U4 glibc (glibc-2.3.4-2.25), if that works, try also RHEL4 U3 glibc
(glibc-2.3.4-2.19).

Comment 7 Yi Zhou 2007-03-01 21:56:29 UTC
Hi Jakub,

I just got chance to try RHEL4 U4 glibc (glibc-2.3.4-2.25) on my system, it 
appears that the problem still exists.

Comment 8 Jakub Jelinek 2007-03-02 15:12:00 UTC
Then this will be fixed in RHEL4.5.

Comment 9 Ben Levenson 2008-02-19 02:29:46 UTC
a fix for this issue should have been issued in rhel-4.5 (2.3.4-2.36)
-> RESOLVED:CURRENTRELEASE


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