public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "stsp at users dot sourceforge.net" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug nptl/30041] pthread_cancel() hangs on aarch64
Date: Wed, 25 Jan 2023 10:17:20 +0000	[thread overview]
Message-ID: <bug-30041-131-95WEAUnN3E@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30041-131@http.sourceware.org/bugzilla/>

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

--- Comment #8 from Stas Sergeev <stsp at users dot sourceforge.net> ---
(In reply to Andreas Schwab from comment #7)
> If anything this is a bug in the debugger.  There are two concurrent types
> of events, the signal and the shlib events, and the constant flow of signal
> events prevents the shlib event from making forward progress.

Yes, this seems to be the case.
I modified the test so that the
second thread disables the timer
after some time. If pthread_cancel()
was hanging, it unstucks.
If pthread_join() was hanging, it
doesn't unstuck because actually
the second thread is already terminated
so the timer shut-down doesn't happen.

But I thought I excluded such a possibility
by at least 2 things:
- attaching with gdb and doing "handle SIGALRM nopass"
- lowering the SIGALRM rate and making
sure both threads can execute code and
print things.

So I still don't understand what's
going on. If both threads could
sleep() and printf() relatively happily
under the much higher SIGALRM rate, then
why some rather small SIGALRM rate still
causes pthread_cancel() to stall indefinitely?
Its not like anything else stalls.
In fact, I discovered that effect on a
real program of mine, which works perfectly
(and is used by people) under the exact
SIGALRM rate which causes the full stall of
pthread_cancel().
So how is that possible w/o a bug?

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

  parent reply	other threads:[~2023-01-25 10:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 14:21 [Bug nptl/30041] New: pthread_cancel() hangs under gdb " stsp at users dot sourceforge.net
2023-01-24 14:52 ` [Bug nptl/30041] " schwab@linux-m68k.org
2023-01-24 15:25 ` stsp at users dot sourceforge.net
2023-01-24 15:34 ` stsp at users dot sourceforge.net
2023-01-24 15:41 ` schwab@linux-m68k.org
2023-01-24 15:55 ` stsp at users dot sourceforge.net
2023-01-24 18:20 ` stsp at users dot sourceforge.net
2023-01-24 18:20 ` [Bug nptl/30041] pthread_cancel() hangs " stsp at users dot sourceforge.net
2023-01-25  9:57 ` schwab@linux-m68k.org
2023-01-25 10:17 ` stsp at users dot sourceforge.net [this message]
2023-01-25 10:25 ` schwab@linux-m68k.org
2023-01-25 10:29 ` stsp at users dot sourceforge.net
2023-01-25 10:42 ` schwab@linux-m68k.org
2023-01-25 10:57 ` stsp at users dot sourceforge.net
2023-01-25 12:45 ` [Bug nptl/30041] pthread_cancel() hangs under gdb " stsp at users dot sourceforge.net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-30041-131-95WEAUnN3E@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).