public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/30041] New: pthread_cancel() hangs under gdb on aarch64
@ 2023-01-24 14:21 stsp at users dot sourceforge.net
  2023-01-24 14:52 ` [Bug nptl/30041] " schwab@linux-m68k.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: stsp at users dot sourceforge.net @ 2023-01-24 14:21 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 30041
           Summary: pthread_cancel() hangs under gdb on aarch64
           Product: glibc
           Version: 2.36
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: stsp at users dot sourceforge.net
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Created attachment 14612
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14612&action=edit
test case

Under qemu's aarch64 please do the following:

$ gcc -Wall -ggdb3 tcanc.c
$ ./a.out
1
2
3
Stopping
4
OK

So far so good.
Now:

$ gdb ./a.out
r
1
2
3
Stopping
4
5
6
[ counting continues infinitely - main thread stuck in pthread_cancel() ]
[ lets disable SIGALRM just to make sure the hang is permanent ]
^C
Thread 1 "a.out" received signal SIGINT, Interrupt.
__GI__dl_debug_state () at ./elf/dl-debug.c:117
117     ./elf/dl-debug.c: No such file or directory.
(gdb) handle SIGALRM nopass
Signal        Stop      Print   Pass to program Description
SIGALRM       No        No      No              Alarm clock
(gdb) c
Continuing.
^C
Thread 1 "a.out" received signal SIGINT, Interrupt.
__GI__dl_debug_state () at ./elf/dl-debug.c:117
117     in ./elf/dl-debug.c
(gdb) 
[ yes, the hang is permanent, it won't advance even w/o SIGALRM ]


This hang doesn't depend on a SIGALRM rate, i.e. SIGALRM
doesn't drain the CPU power, the rate in a test-case is
actually rather low. But SIGALRM is a needed "ingredient",
i.e. w/o SIGALRM the hang is not reproducible.

Stack trace points to some dlopen/unwind games, so I suspect
its a glibc bug. But if not - maybe its a gdb bug?

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

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

end of thread, other threads:[~2023-01-25 12:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 14:21 [Bug nptl/30041] New: pthread_cancel() hangs under gdb on aarch64 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
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

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).