public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29833] [gdb] FAIL: gdb.server/monitor-exit-quit.exp: monitor exit
Date: Fri, 06 Jan 2023 18:05:03 +0000	[thread overview]
Message-ID: <bug-29833-4717-DkK2OKLrJa@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29833-4717@http.sourceware.org/bugzilla/>

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

--- Comment #7 from Tom de Vries <vries at gcc dot gnu.org> ---
Using this patch:
...
diff --git a/gdb/remote.c b/gdb/remote.c
index 218bca30d04..1ef9315f2de 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -9471,6 +9471,9 @@ remote_target::readchar (int timeout)
     {
     case SERIAL_EOF:
       remote_unpush_target (this);
+      fprintf (stderr, "Throwing Remote connection closed\n");
+      fflush (stderr);
+      gdb_assert (false);
       throw_error (TARGET_CLOSE_ERROR, _("Remote connection closed"));
       /* no return */
     case SERIAL_ERROR:
...
I generated a backtrace in gdb.log:
...
$ cat gdb.bt  | c++filt 
0x593e04 gdb_internal_backtrace_1
        /home/vries/gdb_versions/devel/src/gdb/bt-utils.c:122
0x593ea7 gdb_internal_backtrace()
        /home/vries/gdb_versions/devel/src/gdb/bt-utils.c:168
0xcd877a internal_vproblem
        /home/vries/gdb_versions/devel/src/gdb/utils.c:401
0xcd8b49 internal_verror(char const*, int, char const*, __va_list_tag*)
        /home/vries/gdb_versions/devel/src/gdb/utils.c:481
0x14345e6 internal_error_loc(char const*, int, char const*, ...)
        /home/vries/gdb_versions/devel/src/gdbsupport/errors.cc:58
0xaa94a8 remote_target::readchar(int)
        /home/vries/gdb_versions/devel/src/gdb/remote.c:9476
0xaaa25b remote_target::getpkt_or_notif_sane_1(std::vector<char,
gdb::default_init_allocator<char, std::allocator<char> > >*, int, int, int*)
        /home/vries/gdb_versions/devel/src/gdb/remote.c:9946
0xaaa649 remote_target::getpkt_or_notif_sane(std::vector<char,
gdb::default_init_allocator<char, std::allocator<char> > >*, int, int*)
        /home/vries/gdb_versions/devel/src/gdb/remote.c:10055
0xaa62b4 remote_target::wait_ns(ptid_t, target_waitstatus*,
enum_flags<target_wait_flag>)
        /home/vries/gdb_versions/devel/src/gdb/remote.c:8128
0xaa6ca2 remote_target::wait(ptid_t, target_waitstatus*,
enum_flags<target_wait_flag>)
        /home/vries/gdb_versions/devel/src/gdb/remote.c:8357
0xc12f46 target_wait(ptid_t, target_waitstatus*, enum_flags<target_wait_flag>)
        /home/vries/gdb_versions/devel/src/gdb/target.c:2579
0x86adf9 do_target_wait_1
        /home/vries/gdb_versions/devel/src/gdb/infrun.c:3736
0x86af51 operator()
        /home/vries/gdb_versions/devel/src/gdb/infrun.c:3795
0x86b27f do_target_wait
        /home/vries/gdb_versions/devel/src/gdb/infrun.c:3814
0x86c04c fetch_inferior_event()
        /home/vries/gdb_versions/devel/src/gdb/infrun.c:4172
0x84b13b inferior_event_handler(inferior_event_type)
        /home/vries/gdb_versions/devel/src/gdb/inf-loop.c:41
0xab52c6 remote_async_serial_handler
        /home/vries/gdb_versions/devel/src/gdb/remote.c:14424
0xb5bfef run_async_handler_and_reschedule
        /home/vries/gdb_versions/devel/src/gdb/ser-base.c:138
0xb5c0d4 fd_event
        /home/vries/gdb_versions/devel/src/gdb/ser-base.c:189
0x143544d handle_file_event
        /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:573
0x14359d5 gdb_wait_for_event
        /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:694
0x14348a9 gdb_do_one_event(int)
        /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:264
0x8ffdba start_event_loop
        /home/vries/gdb_versions/devel/src/gdb/main.c:411
0x8ffee0 captured_command_loop
        /home/vries/gdb_versions/devel/src/gdb/main.c:471
0x901666 captured_main
        /home/vries/gdb_versions/devel/src/gdb/main.c:1310
0x9016cc gdb_main(captured_main_args*)
        /home/vries/gdb_versions/devel/src/gdb/main.c:1325
0x41a26d main
        /home/vries/gdb_versions/devel/src/gdb/gdb.c:32
...

I updated the core pattern to:
...
$ cat /proc/sys/kernel/core_pattern
core.%e.%p.%h.%t
...
but that doesn't uniquely identify the core file that's matching this
particular test-case, because in gdb.log we're not posting the pid's of gdb
when spawned.  I'll try again with -v, maybe that will improve things.

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

  parent reply	other threads:[~2023-01-06 18:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29  7:19 [Bug gdb/29833] New: " vries at gcc dot gnu.org
2022-11-30  8:11 ` [Bug gdb/29833] " vries at gcc dot gnu.org
2022-11-30  9:45 ` vries at gcc dot gnu.org
2022-11-30 12:50 ` simark at simark dot ca
2022-12-01  9:50 ` vries at gcc dot gnu.org
2022-12-01 10:59 ` vries at gcc dot gnu.org
2022-12-01 11:18 ` vries at gcc dot gnu.org
2023-01-06 18:05 ` vries at gcc dot gnu.org [this message]
2023-01-07 17:42 ` vries at gcc dot gnu.org
2023-01-09 14:53 ` vries at gcc dot gnu.org
2023-01-09 14:53 ` vries at gcc dot gnu.org
2023-01-10 10:43 ` vries at gcc dot gnu.org
2023-01-10 14:00 ` vries at gcc dot gnu.org
2023-03-11 15:03 ` vries at gcc dot gnu.org
2024-01-15  9:20 ` vries at gcc dot gnu.org
2024-01-16  7:35 ` [Bug testsuite/29833] " vries at gcc dot gnu.org

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-29833-4717-DkK2OKLrJa@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: link
Be 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).