mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 17:53:37 +08:00
bd499987c6
If a GETxxBYyy request (for passwd or group) is running in parallel to an INVALIDATE request (for the same database) then in a particular order of events the garbage collector is not properly marking all used memory and fails an assertion: GETGRBYNAME (root) Haven't found "root" in group cache! add new entry "root" of type GETGRBYNAME for group to cache (first) handle_request: request received (Version = 2) from PID 7413 INVALIDATE (group) pruning group cache; time 9223372036854775807 considering GETGRBYNAME entry "root", timeout 1456763027 add new entry "0" of type GETGRBYGID for group to cache remove GETGRBYNAME entry "root" nscd: mem.c:403: gc: Assertion `next_data == &he_data[db->head->nentries]' failed. Here the first call to cache_add added the GETGRBYNAME entry, which is immediately marked for collection by prune_cache. Then the GETGRBYGID entry is added which shares the data packet with the first entry and therefore is marked as !first, while the marking look in prune_cache has already finished. When the garbage collector runs, it only considers references by entries marked as first, missing the reference by the secondary entry. The only way to fix that is to prevent prune_cache from running while the two related entries are added. |
||
---|---|---|
.. | ||
aicache.c | ||
cache.c | ||
connections.c | ||
dbg_log.c | ||
dbg_log.h | ||
Depend | ||
gai.c | ||
getgrgid_r.c | ||
getgrnam_r.c | ||
gethstbyad_r.c | ||
gethstbynm3_r.c | ||
getpwnam_r.c | ||
getpwuid_r.c | ||
getsrvbynm_r.c | ||
getsrvbypt_r.c | ||
grpcache.c | ||
hstcache.c | ||
initgrcache.c | ||
Makefile | ||
mem.c | ||
netgroupcache.c | ||
nscd_conf.c | ||
nscd_getai.c | ||
nscd_getgr_r.c | ||
nscd_gethst_r.c | ||
nscd_getpw_r.c | ||
nscd_getserv_r.c | ||
nscd_helper.c | ||
nscd_initgroups.c | ||
nscd_netgroup.c | ||
nscd_proto.h | ||
nscd_setup_thread.c | ||
nscd_stat.c | ||
nscd-client.h | ||
nscd.c | ||
nscd.conf | ||
nscd.h | ||
nscd.init | ||
nscd.service | ||
nscd.tmpfiles | ||
pwdcache.c | ||
res_hconf.c | ||
selinux.c | ||
selinux.h | ||
servicescache.c |