public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "xavier.bru at bull dot net" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/15358] New: gdb deadlock due to gdb calling calloc() in signal handler. Date: Thu, 11 Apr 2013 15:02:00 -0000 [thread overview] Message-ID: <bug-15358-4717@http.sourceware.org/bugzilla/> (raw) http://sourceware.org/bugzilla/show_bug.cgi?id=15358 Bug #: 15358 Summary: gdb deadlock due to gdb calling calloc() in signal handler. Product: gdb Version: 7.2 Status: NEW Severity: normal Priority: P2 Component: gdb AssignedTo: unassigned@sourceware.org ReportedBy: xavier.bru@bull.net Classification: Unclassified Created attachment 6976 --> http://sourceware.org/bugzilla/attachment.cgi?id=6976 Traces of manually reprucing the deadlock in calloc() gdb calls calloc() in signal hanler. It seems that this function is not reentrant. If gdb catches a signal in calloc(), it can sometimes deadlock, due to calling calloc() in the signal handler. Version-Release number of selected component (if applicable): gdb-7.2-56 How reproducible: Can be reproduced manually using gdb to stop in calloc(). See attached traces . Steps to Reproduce: 1. run gdb on gdb 2. set a breakpoint in calloc() after the cmpxchg instruction 3. send a SIGTERM to gdb Actual results: gdb deadlocks Expected results: gdb should catch the signal and exit Additional info: On HPC cluster, gdb is used a lot by padb, ddt, etc with a lot of parallel applications and it's very difficult to reproduce the issue in a testcase, but it has already been found in the deadlock (hereafter a trace on RHEL 6.1) : # ps -ef | grep gdb user 85753 1 0 15:04 ? 00:00:01 gdb --interpreter=mi -q # gstack 85753 #0 0x000003405ef542e in __lll__lock_wait_private () from /lib64/libc.so.6 #1 0x000003405e7943b in _L_lock_8926 () from /lib64/libc.so.6 #2 0x000003405e7943b in calloc () from /lib64/libc.so.6 #3 0x0000000004159f9 in ?? () #4 0x000000000513b7b in ?? () #5 0x000000000513cbe in ?? () #6 0x0000000004134b7 in ?? () #7 <signal handler called> #8 0x000003405e7a6e4 in _int_realloc () from /lib64/libc.so.6 #9 0x000003405e7aaf5 in realloc () from /lib64/libc.so.6 #10 0x000000000415a5d in ?? () #11 0x00000000054e873 in ?? () #12 0x000000000557094 in ?? () .... #41 0x000000000409869 in ?? () #42 0x000003405e1ecdd in __libc_start_main () from /lib64/libc.so.6 .... #50 0x000000000000000 in ?? () # -- 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.
next reply other threads:[~2013-04-11 15:02 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-04-11 15:02 xavier.bru at bull dot net [this message] 2013-04-12 8:35 ` [Bug gdb/15358] " jan.kratochvil at redhat dot com 2013-04-15 5:10 ` xavier.bru at bull dot net 2013-06-17 6:30 ` jan.kratochvil at redhat dot com 2013-06-17 14:00 ` tromey at redhat dot com 2013-07-01 20:36 ` jan.kratochvil at redhat dot com 2013-07-03 5:31 ` jan.kratochvil at redhat dot com 2014-03-14 18:38 ` jan.kratochvil at redhat dot com 2014-03-14 18:46 ` jan.kratochvil at redhat dot com 2014-03-18 21:51 ` cvs-commit at gcc dot gnu.org 2014-03-18 21:52 ` jan.kratochvil at redhat dot com 2023-02-15 21:34 ` pedro at palves dot 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-15358-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@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: linkBe 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).