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: Sat, 07 Jan 2023 17:42:17 +0000	[thread overview]
Message-ID: <bug-29833-4717-2EsvlxPOxV@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 #8 from Tom de Vries <vries at gcc dot gnu.org> ---
OK, so with the assert from the previous comment, and this in the test-case:
...
+gdb_test_no_output "maint set internal-error quit yes"
+gdb_test_no_output "maint set internal-error corefile yes"
 gdb_test_no_output "monitor exit"
...
and:
...
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index af538e5c8fb..f82756acbe8 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2236,6 +2236,8 @@ proc default_gdb_spawn { } {
        return 1
     }

+    verbose -log "spawned GDB PID: [exp_pid -i $res]"
+    
     set gdb_spawn_id $res
     set ::gdb_tty_name $::last_spawn_tty_name
     return 0
...
I managed to generate a core and find it.

Backtrace:
...
(gdb) bt
#0  0x00007f7b0f156cbb in raise () from /lib64/libc.so.6
#1  0x00007f7b0f158355 in abort () from /lib64/libc.so.6
#2  0x0000000000cd8439 in dump_core () at
/home/vries/gdb_versions/devel/src/gdb/utils.c:203
#3  0x0000000000cd8a74 in internal_vproblem(internal_problem *, const char *,
int, const char *, typedef __va_list_tag __va_list_tag *) (problem=0x25f95e0
<internal_error_problem>, 
    file=0x15c9b30 "/home/vries/gdb_versions/devel/src/gdb/remote.c",
line=9476, 
    fmt=0x15c9729 "%s: Assertion `%s' failed.", ap=0x7ffc77c68628)
    at /home/vries/gdb_versions/devel/src/gdb/utils.c:455
#4  0x0000000000cd8b4a in internal_verror (
    file=0x15c9b30 "/home/vries/gdb_versions/devel/src/gdb/remote.c",
line=9476, 
    fmt=0x15c9729 "%s: Assertion `%s' failed.", ap=0x7ffc77c68628)
    at /home/vries/gdb_versions/devel/src/gdb/utils.c:481
#5  0x00000000014345e7 in internal_error_loc (
    file=0x15c9b30 "/home/vries/gdb_versions/devel/src/gdb/remote.c",
line=9476, 
    fmt=0x15c9729 "%s: Assertion `%s' failed.")
    at /home/vries/gdb_versions/devel/src/gdbsupport/errors.cc:58
#6  0x0000000000aa94a9 in remote_target::readchar (this=0x323b4b0, timeout=0)
    at /home/vries/gdb_versions/devel/src/gdb/remote.c:9476
#7  0x0000000000aaa25c in remote_target::getpkt_or_notif_sane_1
(this=0x323b4b0, 
    buf=0x323b4d8, forever=0, expecting_notif=1, is_notif=0x7ffc77c68870)
--Type <RET> for more, q to quit, c to continue without paging--
    at /home/vries/gdb_versions/devel/src/gdb/remote.c:9946
#8  0x0000000000aaa64a in remote_target::getpkt_or_notif_sane (this=0x323b4b0, 
    buf=0x323b4d8, forever=0, is_notif=0x7ffc77c68870)
    at /home/vries/gdb_versions/devel/src/gdb/remote.c:10055
#9  0x0000000000aa62b5 in remote_target::wait_ns (this=0x323b4b0, ptid=..., 
    status=0x7ffc77c68ed8, options=...)
    at /home/vries/gdb_versions/devel/src/gdb/remote.c:8128
#10 0x0000000000aa6ca3 in remote_target::wait (this=0x323b4b0, ptid=..., 
    status=0x7ffc77c68ed8, options=...)
    at /home/vries/gdb_versions/devel/src/gdb/remote.c:8357
#11 0x0000000000c12f47 in target_wait (ptid=..., status=0x7ffc77c68ed8,
options=...)
    at /home/vries/gdb_versions/devel/src/gdb/target.c:2579
#12 0x000000000086adfa in do_target_wait_1 (inf=0x3066e00, ptid=...,
status=0x7ffc77c68ed8, 
    options=...) at /home/vries/gdb_versions/devel/src/gdb/infrun.c:3736
#13 0x000000000086af52 in <lambda(inferior*)>::operator()(inferior *) const (
    __closure=0x7ffc77c68d10, inf=0x3066e00)
    at /home/vries/gdb_versions/devel/src/gdb/infrun.c:3795
#14 0x000000000086b280 in do_target_wait (ecs=0x7ffc77c68eb0, options=...)
    at /home/vries/gdb_versions/devel/src/gdb/infrun.c:3814
#15 0x000000000086c04d in fetch_inferior_event ()
--Type <RET> for more, q to quit, c to continue without paging--
    at /home/vries/gdb_versions/devel/src/gdb/infrun.c:4172
#16 0x000000000084b13c in inferior_event_handler (event_type=INF_REG_EVENT)
    at /home/vries/gdb_versions/devel/src/gdb/inf-loop.c:41
#17 0x0000000000ab52c7 in remote_async_serial_handler (scb=0x3bc0460,
context=0x323b4d8)
    at /home/vries/gdb_versions/devel/src/gdb/remote.c:14424
#18 0x0000000000b5bff0 in run_async_handler_and_reschedule (scb=0x3bc0460)
    at /home/vries/gdb_versions/devel/src/gdb/ser-base.c:138
#19 0x0000000000b5c0d5 in fd_event (error=0, context=0x3bc0460)
    at /home/vries/gdb_versions/devel/src/gdb/ser-base.c:189
#20 0x000000000143544e in handle_file_event (file_ptr=0x3be2ec0, ready_mask=1)
    at /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:573
#21 0x00000000014359d6 in gdb_wait_for_event (block=1)
    at /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:694
#22 0x00000000014348aa in gdb_do_one_event (mstimeout=-1)
    at /home/vries/gdb_versions/devel/src/gdbsupport/event-loop.cc:264
#23 0x00000000008ffdbb in start_event_loop ()
    at /home/vries/gdb_versions/devel/src/gdb/main.c:411
#24 0x00000000008ffee1 in captured_command_loop ()
    at /home/vries/gdb_versions/devel/src/gdb/main.c:471
#25 0x0000000000901667 in captured_main (data=0x7ffc77c692b0)
--Type <RET> for more, q to quit, c to continue without paging--
    at /home/vries/gdb_versions/devel/src/gdb/main.c:1310
#26 0x00000000009016cd in gdb_main (args=0x7ffc77c692b0)
    at /home/vries/gdb_versions/devel/src/gdb/main.c:1325
#27 0x000000000041a26e in main (argc=13, argv=0x7ffc77c693c8)
    at /home/vries/gdb_versions/devel/src/gdb/gdb.c:32
...

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

  parent reply	other threads:[~2023-01-07 17:42 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
2023-01-07 17:42 ` vries at gcc dot gnu.org [this message]
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-2EsvlxPOxV@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).