public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nscd/10402] New: nscd locking severely broken
@ 2009-07-16 14:38 pasky at suse dot cz
  2009-07-16 14:39 ` [Bug nscd/10402] " pasky at suse dot cz
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: pasky at suse dot cz @ 2009-07-16 14:38 UTC (permalink / raw)
  To: glibc-bugs

The commit 20e498bd removes the pthread_mutex_rdlock() calls, but not the
corresponding pthread_mutex_unlock() calls. Also, the database lock is never
unlocked in one branch of the mempool_alloc() if.

I think unreproducible random assert(dh->usable) crashes in prune_cache() were
caused by this. But an easy way to make nscd threads hang with the broken
locking was

  while true; do id root; id tttest; nscd -i passwd; done

-- 
           Summary: nscd locking severely broken
           Product: glibc
           Version: 2.10
            Status: NEW
          Severity: critical
          Priority: P2
         Component: nscd
        AssignedTo: drepper at redhat dot com
        ReportedBy: pasky at suse dot cz
                CC: glibc-bugs at sources dot redhat dot com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug nscd/10402] nscd locking severely broken
  2009-07-16 14:38 [Bug nscd/10402] New: nscd locking severely broken pasky at suse dot cz
@ 2009-07-16 14:39 ` pasky at suse dot cz
  2009-07-16 17:11 ` drepper at redhat dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: pasky at suse dot cz @ 2009-07-16 14:39 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pasky at suse dot cz  2009-07-16 14:38 -------
Created an attachment (id=4056)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4056&action=view)
proposed patch


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug nscd/10402] nscd locking severely broken
  2009-07-16 14:38 [Bug nscd/10402] New: nscd locking severely broken pasky at suse dot cz
  2009-07-16 14:39 ` [Bug nscd/10402] " pasky at suse dot cz
@ 2009-07-16 17:11 ` drepper at redhat dot com
  2009-07-17 14:51 ` drepper at redhat dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: drepper at redhat dot com @ 2009-07-16 17:11 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2009-07-16 17:11 -------
Applied to upstream.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug nscd/10402] nscd locking severely broken
  2009-07-16 14:38 [Bug nscd/10402] New: nscd locking severely broken pasky at suse dot cz
  2009-07-16 14:39 ` [Bug nscd/10402] " pasky at suse dot cz
  2009-07-16 17:11 ` drepper at redhat dot com
@ 2009-07-17 14:51 ` drepper at redhat dot com
  2009-07-17 14:51 ` drepper at redhat dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: drepper at redhat dot com @ 2009-07-17 14:51 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2009-07-17 14:51 -------
Actually, the patch is wrong.  The unlocking deliberately doesn't happen at
those times.  Keeping the lock is the key to handling memory allocations in a
thread-safe way.

I reverted the patch.

What is the problem you were trying to solve?  Always provide that information.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug nscd/10402] nscd locking severely broken
  2009-07-16 14:38 [Bug nscd/10402] New: nscd locking severely broken pasky at suse dot cz
                   ` (2 preceding siblings ...)
  2009-07-17 14:51 ` drepper at redhat dot com
@ 2009-07-17 14:51 ` drepper at redhat dot com
  2009-07-21 10:18 ` pasky at suse dot cz
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: drepper at redhat dot com @ 2009-07-17 14:51 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |WAITING


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug nscd/10402] nscd locking severely broken
  2009-07-16 14:38 [Bug nscd/10402] New: nscd locking severely broken pasky at suse dot cz
                   ` (3 preceding siblings ...)
  2009-07-17 14:51 ` drepper at redhat dot com
@ 2009-07-21 10:18 ` pasky at suse dot cz
  2009-07-21 10:46 ` jakub at redhat dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 10+ messages in thread
From: pasky at suse dot cz @ 2009-07-21 10:18 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pasky at suse dot cz  2009-07-21 10:17 -------
You are right, I forgot the locking scheme since I've reviewed your patch that
adds it; too bad there isn't a single comment in the code alerting the reader of
it. :(

I have already described the testcase in my first comment; is it not hanging for
you?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug nscd/10402] nscd locking severely broken
  2009-07-16 14:38 [Bug nscd/10402] New: nscd locking severely broken pasky at suse dot cz
                   ` (4 preceding siblings ...)
  2009-07-21 10:18 ` pasky at suse dot cz
@ 2009-07-21 10:46 ` jakub at redhat dot com
  2009-08-25 14:37 ` pasky at suse dot cz
  2009-08-25 22:46 ` pasky at suse dot cz
  7 siblings, 0 replies; 10+ messages in thread
From: jakub at redhat dot com @ 2009-07-21 10:46 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From jakub at redhat dot com  2009-07-21 10:46 -------
That reproducer is quite vague.  You haven't provided your /etc/nsswitch.conf,
nor details about root and ttest user, etc.
Assuming only files for passwd and group databases and root
root:x:0:0:root:/root:/bin/bash
and non-existing ttest user, I can't reproduce this (at least not within 100000
cycles of that loop on a quad core box).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug nscd/10402] nscd locking severely broken
  2009-07-16 14:38 [Bug nscd/10402] New: nscd locking severely broken pasky at suse dot cz
                   ` (5 preceding siblings ...)
  2009-07-21 10:46 ` jakub at redhat dot com
@ 2009-08-25 14:37 ` pasky at suse dot cz
  2009-08-25 22:46 ` pasky at suse dot cz
  7 siblings, 0 replies; 10+ messages in thread
From: pasky at suse dot cz @ 2009-08-25 14:37 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pasky at suse dot cz  2009-08-25 14:37 -------
I'm sorry, I wasn't indeed careful enough when testing - it turns out to be
specific to passwd: compat and +:::::: entry in /etc/passwd.

I'm debugging this further.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug nscd/10402] nscd locking severely broken
  2009-07-16 14:38 [Bug nscd/10402] New: nscd locking severely broken pasky at suse dot cz
                   ` (6 preceding siblings ...)
  2009-08-25 14:37 ` pasky at suse dot cz
@ 2009-08-25 22:46 ` pasky at suse dot cz
  7 siblings, 0 replies; 10+ messages in thread
From: pasky at suse dot cz @ 2009-08-25 22:46 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pasky at suse dot cz  2009-08-25 22:46 -------
I'm sorry for the false bugreport, it turned out to be a trivial messup in a
local patch we have that introduces proper support for negtimeout == 0 - I
severely underestimated how much of a havoc can it cause. :-(

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug nscd/10402] nscd locking severely broken
       [not found] <bug-10402-131@http.sourceware.org/bugzilla/>
@ 2014-07-01  7:48 ` fweimer at redhat dot com
  0 siblings, 0 replies; 10+ messages in thread
From: fweimer at redhat dot com @ 2014-07-01  7:48 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=10402

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-07-01  7:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-16 14:38 [Bug nscd/10402] New: nscd locking severely broken pasky at suse dot cz
2009-07-16 14:39 ` [Bug nscd/10402] " pasky at suse dot cz
2009-07-16 17:11 ` drepper at redhat dot com
2009-07-17 14:51 ` drepper at redhat dot com
2009-07-17 14:51 ` drepper at redhat dot com
2009-07-21 10:18 ` pasky at suse dot cz
2009-07-21 10:46 ` jakub at redhat dot com
2009-08-25 14:37 ` pasky at suse dot cz
2009-08-25 22:46 ` pasky at suse dot cz
     [not found] <bug-10402-131@http.sourceware.org/bugzilla/>
2014-07-01  7:48 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).