From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6817 invoked by alias); 26 Sep 2012 17:14:32 -0000 Received: (qmail 6797 invoked by uid 48); 26 Sep 2012 17:14:31 -0000 From: "palves at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug threads/14618] gdbserver also exits after a thread exits if "set scheduler-locking on" Date: Wed, 26 Sep 2012 17:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: threads X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: palves at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2012-q3/txt/msg00398.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14618 --- Comment #3 from Pedro Alves 2012-09-26 17:14:29 UTC --- Right. As I said, GDBserver ends up resuming all threads of the inferior if the single thread that had been resumed exits. In this case, after the inferior has been resumed, it naturally exits. And when the inferior exits, then GDBserver exits as well; that much is normal. The bit that decides to resume the inferior has this comment, in linux-low.c: /* If we were only supposed to resume one thread, only wait for that thread - if it's still alive. If it died, however - which can happen if we're coming from the thread death case below - then we need to make sure we restart the other threads. We could pick a thread at random or restart all; restarting all is less arbitrary. */ This is of course, totally bogus. The right fix it to add support for the new TARGET_WAITKIND_NO_RESUMED event type to the remote protocol, and teach gdbserver to use it. -- 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.