From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4A8283858D32; Mon, 2 Oct 2023 21:15:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4A8283858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1696281311; bh=rANkAzNA5JMQ3sdm93/DBkOuEpg/b9IumdCWAeSzTqQ=; h=From:To:Subject:Date:From; b=N+yVM/frq3NjQGySn1aM7XAZrnX5NVu6erql/n64NSThLgVFF9Tkm/tdbGxVtxrLf +38USqTHp+TcmeX4XvOJdwJ8+J5+b1V6DMpCZtKqutfiFU3fkxFnBixPUbxsP1mp8R iCv9KeXvP13wdb2NTgxzZhXoVrCYma1TvLeBTIbQ= From: "aburgess at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/30935] New: Regression exposed by new gdb.python/py-progspace-events.exp test and native-extended-gdbserver board Date: Mon, 02 Oct 2023 21:15:10 +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: aburgess at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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 target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30935 Bug ID: 30935 Summary: Regression exposed by new gdb.python/py-progspace-events.exp test and native-extended-gdbserver board Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: aburgess at redhat dot com Target Milestone: --- New test gdb.python/py-progspace-events.exp was added with commit: commit 59912fb2d22f8a4bb0862487f12a5cc65b6a013f Date: Tue Sep 19 11:45:36 2023 +0100 gdb: add Python events for program space addition and removal This test fails when run with the native-extended-gdbserver board. The fai= lure mode is that GDB crashes when std::terminate is called while handling an exception. If the same test is run using GDB 13 then GDB doesn't crash -- obviously the events part of the test which uses the new functionality from the above com= mit FAILs, but GDB doesn't crash. All the test does is arrange to follow the parent and child after a fork, a= nd then allows the child process to exit, before trying to step the parent, th= is doesn't feel unreasonable. The crash can be reproduced using these commands: set trace-commands on set height 0 set width 0 set sysroot target extended-remote | ./gdbserver/gdbserver --once --multi - /tmp/build/gdb/testsuite/outputs/gdb.python/py-progspace-events/py-progspac= e-events file /tmp/build/gdb/testsuite/outputs/gdb.python/py-progspace-events/py-progspac= e-events set remote exec-file /tmp/build/gdb/testsuite/outputs/gdb.python/py-progspace-events/py-progspac= e-events break -qualified main run break breakpt continue set detach-on-fork off continue inferior 2 continue continue inferior 1 step On master (59912fb2d22) I see this fail with: +step terminate called after throwing an instance of 'gdb_exception_error' Fatal signal: Aborted ... etc ... Simon reported this issue here: https://inbox.sourceware.org/gdb-patches/18e22709-5bec-4175-a057-09ee92415a= 46@simark.ca/ The crash backtrace from his report is: #4 0x000055a4a0fae18d in error (fmt=3D0x55a49adcd020 "Cannot execute t= his command while the target is running.\nUse the \"interrupt\" command to stop= the target\nand then try again.") at /home/smarchi/src/binutils-gdb/gdbsupport/errors.cc:46 #5 0x000055a49ec2f495 in remote_target::putpkt_binary (this=3D0x61b00003f080, buf=3D0x62d00371e400 "qXfer:auxv:read::0,1000", cnt= =3D23) at /home/smarchi/src/binutils-gdb/gdb/remote.c:9740 #6 0x000055a49ec2efc4 in remote_target::putpkt (this=3D0x61b00003f080, buf=3D0x62d00371e400 "qXfer:auxv:read::0,1000") at /home/smarchi/src/binutils-gdb/gdb/remote.c:9698 #7 0x000055a49ec8b287 in remote_target::putpkt (this=3D0x61b00003f080, buf=3Dstd::__debug::vector of length 36862, capacity 36862 =3D {...}) at /home/smarchi/src/binutils-gdb/gdb/remote.c:1211 #8 0x000055a49ec45c59 in remote_target::remote_read_qxfer (this=3D0x61b00003f080, object_name=3D0x55a49adced00 "auxv", annex=3D0x0, readbuf=3D0x62100057f900 '\276' ..., offset=3D0, len=3D3904966623561266976, xfered_len=3D0x7f5f31c5f220, which_packet=3D18) = at /home/smarchi/src/binutils-gdb/gdb/remote.c:11316 #9 0x000055a49ec47573 in remote_target::xfer_partial (this=3D0x61b0000= 3f080, object=3DTARGET_OBJECT_AUXV, annex=3D0x0, readbuf=3D0x62100057f900 '\276' <= repeats 200 times>..., writebuf=3D0x0, offset=3D0, len=3D4096, xfered_len=3D0x7f5f3= 1c5f220) at /home/smarchi/src/binutils-gdb/gdb/remote.c:11438 #10 0x000055a49f4595b1 in target_xfer_partial (ops=3D0x61b00003f080, object=3DTARGET_OBJECT_AUXV, annex=3D0x0, readbuf=3D0x62100057f900 '\276' <= repeats 200 times>..., writebuf=3D0x0, offset=3D0, len=3D4096, xfered_len=3D0x7f5f3= 1c5f220) at /home/smarchi/src/binutils-gdb/gdb/target.c:1717 #11 0x000055a49f45aed9 in target_read_partial (ops=3D0x61b00003f080, object=3DTARGET_OBJECT_AUXV, annex=3D0x0, buf=3D0x62100057f900 '\276' ..., offset=3D0, len=3D4096, xfered_len=3D0x7f5f31c5f220) at /home/smarchi/src/binutils-gdb/gdb/target.c:1951 #12 0x000055a49f501472 in target_read_alloc_1 (ops=3D0x61b00003f080, object=3DTARGET_OBJECT_AUXV, annex=3D0x0) at /home/smarchi/src/binutils-gdb/gdb/target.c:2286 #13 0x000055a49f45c9c2 in target_read_alloc (ops=3D0x61b00003f080, object=3DTARGET_OBJECT_AUXV, annex=3D0x0) at /home/smarchi/src/binutils-gdb/gdb/target.c:2315 #14 0x000055a49c920733 in target_read_auxv_raw (ops=3D0x61b00003f080) at /home/smarchi/src/binutils-gdb/gdb/auxv.c:379 #15 0x000055a49c920501 in target_read_auxv () at /home/smarchi/src/binutils-gdb/gdb/auxv.c:368 #16 0x000055a49c920c06 in target_auxv_search (match=3D0, valp=3D0x7f5f3= 1a2fc60) at /home/smarchi/src/binutils-gdb/gdb/auxv.c:415 #17 0x000055a49e13e669 in linux_is_uclinux () at /home/smarchi/src/binutils-gdb/gdb/linux-tdep.c:433 #18 0x000055a49e13e6fa in linux_has_shared_address_space (gdbarch=3D0x61c00001e080) at /home/smarchi/src/binutils-gdb/gdb/linux-tdep= .c:440 #19 0x000055a49c720d6f in gdbarch_has_shared_address_space (gdbarch=3D0x61c00001e080) at /home/smarchi/src/binutils-gdb/gdb/gdbarch.c:= 4889 #20 0x000055a49e7ce076 in program_space::~program_space (this=3D0x61300004af00, __in_chrg=3D) at /home/smarchi/src/binutils-gdb/gdb/progspace.c:124 #21 0x000055a49de5d91e in delete_inferior (inf=3D0x61800007f080) at /home/smarchi/src/binutils-gdb/gdb/inferior.c:290 #22 0x000055a49de604b7 in prune_inferiors () at /home/smarchi/src/binutils-gdb/gdb/inferior.c:480 #23 0x000055a49debd2d9 in fetch_inferior_event () at /home/smarchi/src/binutils-gdb/gdb/infrun.c:4558 --=20 You are receiving this mail because: You are on the CC list for the bug.=