From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 038263858C32; Fri, 5 Apr 2024 11:16:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 038263858C32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1712315814; bh=LeR/4vQRUlCbOi687dcAdPdpxSDwUH4lbxOP6czZ2Uc=; h=From:To:Subject:Date:From; b=pwLr6Epf954jY/e0byDfpNQT2ISq/F3Ij8SXFZ29QZpKzYNbipFW/T+ZuhBUG+Hwr LzHkk2QNKJ8M/5LX2d61ZZ3EGHQwLcC+83GV62fATiLKpTxWZrwlKrfVyWjhdIOWD0 wVA6fxV26Rm2MgFbNyllsj+WhnR10ViRsrAyYETo= From: "brandon.belew at zetier dot com" To: gdb-prs@sourceware.org Subject: [Bug record/31610] New: Abort when stepping through a restored recording Date: Fri, 05 Apr 2024 11:16:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: record X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: brandon.belew at zetier dot com X-Bugzilla-Status: UNCONFIRMED 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=3D31610 Bug ID: 31610 Summary: Abort when stepping through a restored recording Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: record Assignee: unassigned at sourceware dot org Reporter: brandon.belew at zetier dot com Target Milestone: --- Gdb crashes due to a failed assertion if trying to step through a restored recording.=20 In one gdb session, generate a recording and save it to a file:=20 - record full=20 - step, step, continue, etc....=20 - record save /tmp/my_recording=20 - quit In a new gdb instance, try to load the recording and then step through it:= =20 - record restore /tmp/my_recording - stepi=20 This immediately crashes gdb with a failed assertion in gdb/inferior.c, in = the `find_inferior_pid` function, which does a `gdb_assert (pid !=3D 0)`.=20 This crash reproduces on the 13.2, 14.1, and latest git HEAD commit 0ffdc37b98964477e70bfd63ca28f374193dcdb2. I'm running on an x86_64 Ubuntu 1= 8.04 system and configured gdb with `./configure --enable-targets=3Dall`. The is= sue does *not* reproduce with either the gdb or gdb-multiarch version in the Ub= untu 18.04 repository: GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1. On that older vers= ion, I can step or continue through the restore recording as I would expect.=20 The full backtrace, from my git HEAD build, follows:=20 ``` ../../gdb/inferior.c:405: internal-error: find_inferior_pid: Assertion `pid= !=3D 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. ----- Backtrace ----- 0x55b4989bd997 gdb_internal_backtrace_1 ../../gdb/bt-utils.c:121 0x55b4989bd997 _Z22gdb_internal_backtracev ../../gdb/bt-utils.c:167 0x55b498e9c3dc internal_vproblem ../../gdb/utils.c:420 0x55b498e9c63a _Z15internal_verrorPKciS0_P13__va_list_tag ../../gdb/utils.c:500 0x55b4993f894e _Z18internal_error_locPKciS0_z ../../gdbsupport/errors.cc:57 0x55b498b5ff65 _Z17find_inferior_pidP22process_stratum_targeti ../../gdb/inferior.c:405 0x55b498b5ff65 _Z17find_inferior_pidP22process_stratum_targeti ../../gdb/inferior.c:400 0x55b498c94004 _ZN22process_stratum_target11find_threadE6ptid_t ../../gdb/process-stratum-target.c:190 0x55b498e2c434 _Z16switch_to_threadP22process_stratum_target6ptid_t ../../gdb/thread.c:1437 0x55b498cfa09d record_full_wait_1 ../../gdb/record-full.c:1288 0x55b498cfa09d _ZN23record_full_base_target4waitE6ptid_tP17target_waitstatus10enum_flagsI1= 6target_wait_flagE ../../gdb/record-full.c:1469 0x55b498e267a7 _Z11target_wait6ptid_tP17target_waitstatus10enum_flagsI16target_wait_flagE ../../gdb/target.c:2570 0x55b498b6a685 do_target_wait_1 ../../gdb/infrun.c:4139 0x55b498b7c5dc operator() ../../gdb/infrun.c:4201 0x55b498b7c5dc do_target_wait ../../gdb/infrun.c:4220 0x55b498b7c5dc _Z20fetch_inferior_eventv ../../gdb/infrun.c:4661 0x55b498976e20 _Z26check_async_event_handlersv ../../gdb/async-event.c:337 0x55b4993f9f68 _Z16gdb_do_one_eventi ../../gdbsupport/event-loop.cc:220 0x55b498bdf1b6 start_event_loop ../../gdb/main.c:400 0x55b498bdf1b6 captured_command_loop ../../gdb/main.c:464 0x55b498be1044 captured_main``` --=20 You are receiving this mail because: You are on the CC list for the bug.=