From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19578 invoked by alias); 17 Aug 2014 12:16:13 -0000 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 Received: (qmail 19553 invoked by uid 48); 17 Aug 2014 12:16:11 -0000 From: "dilyan.palauzov at aegee dot org" To: gdb-prs@sourceware.org Subject: [Bug gdb/17283] New: gdbserver stops working in non-stop mode Date: Sun, 17 Aug 2014 12:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dilyan.palauzov at aegee dot org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q3/txt/msg00274.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17283 Bug ID: 17283 Summary: gdbserver stops working in non-stop mode Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: dilyan.palauzov at aegee dot org I use gdb78 and gdbserver78. When gdb is in non-stop mode, gdbserver terminates with ../../../gdb-7.8/gdb/gdbserver/server.c:2695: A problem internal to GDBserver has been detected. I expect that gdbserver does not terminate, or at least gdb warns, that doing remote non-stop will lead to gdbserver termination. Moreover, I expect that target remote can be run async: target remote -- stops the program, after connecting to remove target remote & -- doesn't stop the program (implies continue&) # gdbserver --debug --debug-format=timestamp,all --attach :1234 21936 2> gdb-stderr # gdb ./prog (gdb) set non-stop on (gdb) show architecture The target architecture is set automatically (currently i386:x86-64) (gdb) target remote localhost:1234 Remote debugging using localhost:1234 Remote connection closed (qdb) quit # cat gdb-stderr sigchld_handler 1408277153:183341 Found new lwp 21937 sigchld_handler 1408277153:183464 Found new lwp 28894 sigchld_handler 1408277153:183584 Found new lwp 28968 sigchld_handler Attached; pid = 21936 1408277153:183747 >>>> entering linux_wait_1 1408277153:183774 linux_wait_1: [Process 21936] my_waitpid (-1, 0x40000001) my_waitpid (-1, 0x1): status(137f), 21936 1408277153:183828 LWFE: waitpid(-1, ...) returned 21936, ERRNO-OK 1408277153:183872 LLW: waitpid 21936 received Stopped (signal) (stopped) 1408277153:183976 linux_low_filter_event: pc is 0x7fe35ea42633 1408277153:183995 pc is 0x7fe35ea42633 1408277153:184014 stop pc is 0x7fe35ea42633 my_waitpid (29340, 0x0) my_waitpid (29340, 0x0): status(137f), 29340 my_waitpid (29340, 0x0) my_waitpid (29340, 0x0): status(1057f), 29340 my_waitpid (29341, 0x0) my_waitpid (29341, 0x0): status(137f), 29341 my_waitpid (29341, 0x0) my_waitpid (29341, 0x0): status(9), 29341 my_waitpid (29340, 0x0) my_waitpid (29340, 0x0): status(0), 29340 1408277153:184887 Expected stop. sigchld_handler 1408277153:184930 Hit a non-gdbserver trap event. 1408277153:184950 >>>> entering stop_all_lwps 1408277153:184967 stop_all_lwps (stop, except=none) 1408277153:184988 Have pending sigstop for lwp 21937 1408277153:185008 Have pending sigstop for lwp 28894 1408277153:185025 Have pending sigstop for lwp 28968 1408277153:185045 wait_for_sigstop: pulling events my_waitpid (-1, 0x40000001) my_waitpid (-1, 0x80000001): status(137f), 28968 1408277153:185084 LWFE: waitpid(-1, ...) returned 28968, ERRNO-OK 1408277153:185108 LLW: waitpid 28968 received Stopped (signal) (stopped) 1408277153:185167 linux_low_filter_event: pc is 0x7fe35ea42633 1408277153:185186 pc is 0x7fe35ea42633 1408277153:185203 stop pc is 0x7fe35ea42633 1408277153:185219 Expected stop. my_waitpid (-1, 0x40000001) my_waitpid (-1, 0x80000001): status(137f), 28894 1408277153:185250 LWFE: waitpid(-1, ...) returned 28894, ERRNO-OK 1408277153:185267 LLW: waitpid 28894 received Stopped (signal) (stopped) 1408277153:185307 linux_low_filter_event: pc is 0x7fe35ea42633 1408277153:185324 pc is 0x7fe35ea42633 1408277153:185339 stop pc is 0x7fe35ea42633 1408277153:185356 Expected stop. my_waitpid (-1, 0x40000001) my_waitpid (-1, 0x80000001): status(137f), 21937 1408277153:185387 LWFE: waitpid(-1, ...) returned 21937, ERRNO-OK 1408277153:185403 LLW: waitpid 21937 received Stopped (signal) (stopped) 1408277153:185442 linux_low_filter_event: pc is 0x7fe35f436009 1408277153:185459 pc is 0x7fe35f436009 1408277153:185473 stop pc is 0x7fe35f436009 1408277153:185488 Expected stop. my_waitpid (-1, 0x40000001) my_waitpid (-1, 0x80000001): status(137f), 0 1408277153:185522 LWFE: waitpid(-1, ...) returned 0, ERRNO-OK 1408277153:185628 leader_pid=21936, leader_lp!=NULL=1, num_lwps=4, zombie=0 1408277153:185704 LLW: exit (no unwaited-for LWP) 1408277153:185720 stop_all_lwps done, setting stopping_threads back to !stopping 1408277153:185732 <<<< exiting stop_all_lwps 1408277153:185750 Checking whether LWP 21936 needs to move out of the jump pad...no 1408277153:185766 Checking whether LWP 21937 needs to move out of the jump pad...no 1408277153:185780 Checking whether LWP 28894 needs to move out of the jump pad...no 1408277153:185795 Checking whether LWP 28968 needs to move out of the jump pad...no 1408277153:185815 linux_wait_1 ret = LWP 21936.21936, 1, 0 1408277153:185829 <<<< exiting linux_wait_1 Listening on port 1234 1408277224:689906 handling possible accept event Remote debugging from host 127.0.0.1 1408277224:690036 linux_async (0), previous=0 1408277224:690069 handling possible serial event sigchld_handler sigchld_handler 1408277224:690983 handling possible serial event 1408277224:691120 handling possible serial event 1408277224:691247 handling possible serial event 1408277224:691355 handling possible serial event 1408277224:691832 handling possible serial event 1408277224:692877 handling possible serial event 1408277224:693735 handling possible serial event 1408277224:696486 handling possible serial event 1408277224:696650 handling possible serial event 1408277224:696676 linux_async (1), previous=0 1408277224:696762 handling possible target event 1408277224:696796 >>>> entering linux_wait_1 1408277224:696817 linux_wait_1: [] my_waitpid (-1, 0x40000001) my_waitpid (-1, 0x80000001): status(30), 0 1408277224:696850 LWFE: waitpid(-1, ...) returned 0, ERRNO-OK 1408277224:696942 leader_pid=21936, leader_lp!=NULL=1, num_lwps=4, zombie=0 1408277224:697002 LLW: exit (no unwaited-for LWP) 1408277224:697015 linux_wait_1 ret = null_ptid, TARGET_WAITKIND_NO_RESUMED 1408277224:697027 <<<< exiting linux_wait_1 1408277224:697044 handling possible serial event 1408277224:697517 handling possible serial event 1408277224:697650 handling possible serial event 1408277224:697739 handling possible serial event 1408277224:697765 >>>> entering linux_resume 1408277224:697779 linux_resume: 1408277224:697791 already stopped LWP 21936 at GDB's request 1408277224:697805 Need step over [LWP 21936]? Ignoring, should remain stopped 1408277224:697817 Need step over [LWP 21937]? No 1408277224:697857 pc is 0x7fe35f436009 1408277224:697875 Need step over [LWP 21937]? No, no breakpoint found at 0x7fe35f436009 1408277224:697888 Need step over [LWP 28894]? No 1408277224:697920 pc is 0x7fe35ea42633 1408277224:697935 Need step over [LWP 28894]? No, no breakpoint found at 0x7fe35ea42633 1408277224:697947 Need step over [LWP 28968]? No 1408277224:697978 pc is 0x7fe35ea42633 1408277224:697993 Need step over [LWP 28968]? No, no breakpoint found at 0x7fe35ea42633 1408277224:698005 Resuming, no pending status or step over needed 1408277224:698016 linux_resume done 1408277224:698027 <<<< exiting linux_resume 1408277224:698125 handling possible serial event 1408277224:698151 Returning trace status as 0, stop reason tnotrun 1408277224:698259 handling possible serial event 1408277224:698280 Returning first trace state variable definition 1408277224:698361 handling possible serial event 1408277224:698382 Returning additional trace state variable definition 1408277224:698466 handling possible serial event 1408277224:698496 Reporting thread LWP 21936.21936 as already stopped with status->kind = stopped, signal = GDB_SIGNAL_0 1408277224:698513 Reporting thread LWP 21936.21937 as already stopped with status->kind = ignore ../../../gdb-7.8/gdb/gdbserver/server.c:2695: A problem internal to GDBserver has been detected. queue_stop_reply_callback: Assertion `thread->last_status.kind != TARGET_WAITKIND_IGNORE' failed. -- You are receiving this mail because: You are on the CC list for the bug.