This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nscd/13594] Crash if nscd is not running in __nscd_get_mapping


http://sourceware.org/bugzilla/show_bug.cgi?id=13594

law at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at redhat dot com

--- Comment #7 from law at redhat dot com 2012-03-27 18:19:34 UTC ---
Based on just reading the code, I wonder if a one thread is mucking up
hst_map_handle.mapped behind the back of nscd_get_mapping.

nscd_get_nl_timestamp doesn't bother to grab the hst_map_handle lock and calls
into nscd_get_mapping which could potentially change hst_map_handle.mapped to
NO_MAPPING.

If this occurs after another thread had passed the NO_MAPPING check in
nscd_get_map_ref, but hasn't yet hit the atomic_decrement_val in
nscd_get_mapping then it could cause the failure mode reported in this report
(and several others across various distros, upstream kde and possibly
elsewhere).

That would also explain why the patch in c#2 works as well as the lack of
reproducability.

Vladimir/Paulo: I don't have a way to reproduce the problem here, but I could
pass along a patch to y'all if you're interested in testing my theory.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]