2018-02-18 00:47 UTC

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003280CentOS-5glibcpublic2011-01-14 10:18
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:
TagsNo tags attached.
Attached Files




domml (reporter)

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.


range (administrator)

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.


domml (reporter)

Upstream bug reported:


range (administrator)

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
+Issue History