CentOS Bug Tracker
CentOS Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003280CentOS-5glibcpublic2008-12-01 17:222011-01-14 10:18
Reporterdomml 
PrioritynormalSeveritymajorReproducibilitysometimes
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version5.2 
Target VersionFixed in Version 
Summary0003280: Race in fork
DescriptionIt is generally considered as unsafe to call any system functions between fork and exec because during this time, deadlocks can happen.

It seems the glibc has such a race itself:
#3 0xf6c4d96b in free (ptr=0xc4ba000)
#4 0xf682329a in _nss_ldap_mergeconfigfromdns () from /lib/libnss_ldap.so.2
#5 0xf680d205 in _nss_ldap_mergeconfigfromdns () from /lib/libnss_ldap.so.2
#6 0xf68026a3 in _nss_ldap_mergeconfigfromdns () from /lib/libnss_ldap.so.2
#7 0xf67eeb30 in _nss_ldap_test_initgroups_ignoreuser () from /lib/libnss_ldap.so.2
#8 0xf67f21f4 in _nss_ldap_leave () from /lib/libnss_ldap.so.2
#9 0x00951b52 in fork () from /lib/libc.so.6
#10 0x00a14424 in fork () from /lib/libpthread.so.0
#11 0x0a83c2e2 in TclpCreateProcess ()

This is a part of a gdb backtrace from my application which hung at this point trying to acquire a lock in free(),

It seems that glibc calls _nss_ldap_leave in fork, seemingly after the actual fork has already happened.
Additional InformationPackages:
glibc-2.5-24
nss_ldap-253-13.el5_2.1
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0008364)
domml (reporter)
2008-12-02 14:16

Please note that the backtrace is from the forked child, so you can delete the word "seemingly" from my last sentence :-)

This is rather surely a glibc issue, so I could file it directly to glibc if you want me to.
(0008365)
range (administrator)
2008-12-02 14:26

It would be better if you could file that issue at our upstream at https://bugzilla.redhat.com/ [^]

If you do so, please provide a link to that from here (and enter this bug number here into their "external bug report" field).

Thank you.
(0008366)
domml (reporter)
2008-12-02 17:35

Upstream bug reported:
https://bugzilla.redhat.com/show_bug.cgi?id=474181 [^]
(0012349)
range (administrator)
2011-01-14 10:18

Fixed in 5.6

- Issue History
Date Modified Username Field Change
2008-12-01 17:22 domml New Issue
2008-12-02 14:16 domml Note Added: 0008364
2008-12-02 14:26 range Note Added: 0008365
2008-12-02 14:26 range Status new => feedback
2008-12-02 17:35 domml Note Added: 0008366
2008-12-02 17:35 domml Status feedback => acknowledged
2011-01-14 10:18 range Note Added: 0012349
2011-01-14 10:18 range Status acknowledged => resolved
2011-01-14 10:18 range Resolution open => fixed


Copyright © 2000 - 2014 MantisBT Team
Powered by Mantis Bugtracker