public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/28678] New: nptl/tst-create1 hangs sporadically
@ 2021-12-09 20:24 fweimer at redhat dot com
  2021-12-10  4:08 ` [Bug nptl/28678] " fweimer at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2021-12-09 20:24 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 28678
           Summary: nptl/tst-create1 hangs sporadically
           Product: glibc
           Version: 2.35
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---
             Flags: security-

Seen on x86-64 and aarch64.

thread 1: started.
thread 2: started.
thread 2: locked user_lock.
constructor started: 0.
thread 1: in ctor: started.
thread 3: started.
thread 3: done.
thread 2: unlocked user_lock.
thread 2: locked user_lock.

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

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

* [Bug nptl/28678] nptl/tst-create1 hangs sporadically
  2021-12-09 20:24 [Bug nptl/28678] New: nptl/tst-create1 hangs sporadically fweimer at redhat dot com
@ 2021-12-10  4:08 ` fweimer at redhat dot com
  2021-12-10  4:08 ` fweimer at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2021-12-10  4:08 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

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

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
It's a test bug. The test hangs if thread2 reacquires user_lock before ctor
acquires it. I'm testing a patch.

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

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

* [Bug nptl/28678] nptl/tst-create1 hangs sporadically
  2021-12-09 20:24 [Bug nptl/28678] New: nptl/tst-create1 hangs sporadically fweimer at redhat dot com
  2021-12-10  4:08 ` [Bug nptl/28678] " fweimer at redhat dot com
@ 2021-12-10  4:08 ` fweimer at redhat dot com
  2021-12-10  4:32 ` fweimer at redhat dot com
  2021-12-10 10:57 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2021-12-10  4:08 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |fweimer at redhat dot com
             Status|NEW                         |ASSIGNED

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

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

* [Bug nptl/28678] nptl/tst-create1 hangs sporadically
  2021-12-09 20:24 [Bug nptl/28678] New: nptl/tst-create1 hangs sporadically fweimer at redhat dot com
  2021-12-10  4:08 ` [Bug nptl/28678] " fweimer at redhat dot com
  2021-12-10  4:08 ` fweimer at redhat dot com
@ 2021-12-10  4:32 ` fweimer at redhat dot com
  2021-12-10 10:57 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2021-12-10  4:32 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
Patch posted:
https://sourceware.org/pipermail/libc-alpha/2021-December/133949.html

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

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

* [Bug nptl/28678] nptl/tst-create1 hangs sporadically
  2021-12-09 20:24 [Bug nptl/28678] New: nptl/tst-create1 hangs sporadically fweimer at redhat dot com
                   ` (2 preceding siblings ...)
  2021-12-10  4:32 ` fweimer at redhat dot com
@ 2021-12-10 10:57 ` fweimer at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: fweimer at redhat dot com @ 2021-12-10 10:57 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.35
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for 2.35 via:

commit 5cc338565479a620244c2f8ff35956629c4dbf81
Author: Florian Weimer <fweimer@redhat.com>
Date:   Fri Dec 10 05:14:24 2021 +0100

    nptl: Add one more barrier to nptl/tst-create1

    Without the bar_ctor_finish barrier, it was possible that thread2
    re-locked user_lock before ctor had a chance to lock it.  ctor then
    blocked in its locking operation, xdlopen from the main thread
    did not return, and thread2 was stuck waiting in bar_dtor:

    thread 1: started.
    thread 2: started.
    thread 2: locked user_lock.
    constructor started: 0.
    thread 1: in ctor: started.
    thread 3: started.
    thread 3: done.
    thread 2: unlocked user_lock.
    thread 2: locked user_lock.

    Fixes the test in commit 83b5323261bb72313bffcf37476c1b8f0847c736
    ("elf: Avoid deadlock between pthread_create and ctors [BZ #28357]").

    Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>

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

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

end of thread, other threads:[~2021-12-10 10:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09 20:24 [Bug nptl/28678] New: nptl/tst-create1 hangs sporadically fweimer at redhat dot com
2021-12-10  4:08 ` [Bug nptl/28678] " fweimer at redhat dot com
2021-12-10  4:08 ` fweimer at redhat dot com
2021-12-10  4:32 ` fweimer at redhat dot com
2021-12-10 10:57 ` 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).