public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "marco.marsala at live dot it" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/27144] Just attaching and detaching gdb crashes the Inferior Date: Mon, 04 Jan 2021 17:20:17 +0000 [thread overview] Message-ID: <bug-27144-4717-dvUl2uXXYY@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-27144-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=27144 --- Comment #3 from Marco Marsala <marco.marsala at live dot it> --- The error message says “epool” not epoll. But in effect, newer versions of this executable fixed the issue (I haven’t access to source code) ________________________________ Da: simark at simark dot ca <sourceware-bugzilla@sourceware.org> Inviato: Monday, January 4, 2021 1:14:36 AM A: marco.marsala@live.it <marco.marsala@live.it> Oggetto: [Bug gdb/27144] Just attaching and detaching gdb crashes the Inferior https://sourceware.org/bugzilla/show_bug.cgi?id=27144 Simon Marchi <simark at simark dot ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |NOTABUG CC| |simark at simark dot ca --- Comment #2 from Simon Marchi <simark at simark dot ca> --- I bet that "epool" is actually "epoll", and that this happens because the application in question does not correctly handle epoll_wait failures. Like most system calls, epoll_wait can return -1 with errno == EINTR. If it wants to keep waiting, the application should go back to calling epoll_wait. As an example, try this small program: --- #include <stdio.h> #include <errno.h> #include <string.h> #include <sys/epoll.h> int main() { int epoll = epoll_create(1); int ret = epoll_wait(epoll, NULL, 1, 1000 * 100); printf("ret = %d, strerror = %s\n", ret, strerror(errno)); return 0; } --- Start it in one shell, and attach/detach GDB. You'll get: ret = -1, strerror = Interrupted system call This is likely the case that your application does not handle. So, not a GDB bug, but something that should be fixed in the application. -- You are receiving this mail because: You reported the bug. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-01-04 17:20 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-03 18:41 [Bug gdb/27144] New: " marco.marsala at live dot it 2021-01-03 20:29 ` [Bug gdb/27144] " marco.marsala at live dot it 2021-01-04 0:14 ` simark at simark dot ca 2021-01-04 17:20 ` marco.marsala at live dot it [this message] 2021-01-04 17:54 ` simark at simark dot ca
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-27144-4717-dvUl2uXXYY@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).