View Issue Details

IDProjectCategoryView StatusLast Update
0003280CentOS-5glibcpublic2011-01-14 10:18
Status resolvedResolutionfixed 
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/
#5 0xf680d205 in _nss_ldap_mergeconfigfromdns () from /lib/
#6 0xf68026a3 in _nss_ldap_mergeconfigfromdns () from /lib/
#7 0xf67eeb30 in _nss_ldap_test_initgroups_ignoreuser () from /lib/
#8 0xf67f21f4 in _nss_ldap_leave () from /lib/
#9 0x00951b52 in fork () from /lib/
#10 0x00a14424 in fork () from /lib/
#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:
TagsNo tags attached.




2008-12-02 14:16

reporter   ~0008364

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.


2008-12-02 14:26

administrator   ~0008365

It would be better if you could file that issue at our upstream at

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.


2008-12-02 17:35

reporter   ~0008366

Upstream bug reported:


2011-01-14 10:18

administrator   ~0012349

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