Bug 122730
Summary: | Problem with reentrant getservbyname_r() calls in threaded programs | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Nils Philippsen <nphilipp> | ||||||
Component: | glibc | Assignee: | Jakub Jelinek <jakub> | ||||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 3.0 | CC: | fabrizio.muscarella, marcel.schriber | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i386 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 2.3.2-95.27 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2004-09-25 21:28:02 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: | |||||||||
Attachments: |
|
Description
Nils Philippsen
2004-05-07 15:24:15 UTC
Created attachment 100080 [details]
Test program
Test program, compile with:
gcc -o main main.c -lpthread
run with:
./main
The program opens a number of threads which each consecutively call
getservbyname_r() for a nonexisting service "gurus" (just an example) a number
of times (200 in the attached test program).
Are you able to reproduce this with glibc-2.3.2-95.20 (U2 glibc)? There have been a bunch of fixes in exactly this part of the NIS client code. Yes, I got the SIGSEGV with 2.3.2-95.20 as well. http://sources.redhat.com/ml/libc-hacker/2004-05/msg00038.html Wonder why you haven't seen it on FC2, wasn't it UP and a bit of sheer luck? Created attachment 102278 [details]
Different test program which shows the problem on FC2 as well
Another test program which shows the problem on FC2 as well, courtesy of
Fabrizio Muscarella, refined by me. Simply untar and make. Builds
nis_tst_getservbyname_r and nis_tst_getaddrinfo which use getservbyname_r() or
getaddrinfo() respectively.
Can you reproduce it with glibc-2.3.3-31 or later though (rawhide/FC3t1)? Ping!? I cannot reproduce any problem with glibc-2.3.3-45.i686. The program prints Oops... (Servname not supported for ai_socktype) Oops indeed, will check when I have access to an FC3 box later in the day. Hi, the output 'Oops...' is printed only by the second test program if you compile it without USE_GETSERVBYNAME_R (bacause i forgot to check the return value of getservbyname_r , mmmmm ;-( ). In this case will be interesting to known if getservbyname_r is working too. I see no failures with a current glibc version in neither versions of the program in the second patch. I mark the bug as fixed. If you still see failures, please reopen with appropriate instructions to reproduce. |