From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 203173857346; Wed, 22 Jun 2022 19:20:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 203173857346 From: "guillaume at morinfr dot org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/29277] New: jit_event_handler: Assertion `jiter->jiter_data != nullptr' failed with separate debug files Date: Wed, 22 Jun 2022 19:20:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: guillaume at morinfr dot org 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2022 19:20:12 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29277 Bug ID: 29277 Summary: jit_event_handler: Assertion `jiter->jiter_data !=3D nullptr' failed with separate debug files Product: gdb Version: 12.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: breakpoints Assignee: unassigned at sourceware dot org Reporter: guillaume at morinfr dot org Target Milestone: --- Similar to https://sourceware.org/bugzilla/show_bug.cgi?id=3D27889, we are hitting the same assertion handler with separate debug files. This is just by running the program. No bp set but it does crash in the breakpoint code: ----- Backtrace -----=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c94740570e gdb_internal_backtrace_1=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 /usr/scratch/tmp/gdb-12.1/gdb/bt-utils.c:122=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c9474057b6 _Z22gdb_internal_backtracev=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20 /usr/scratch/tmp/gdb-12.1/gdb/bt-utils.c:168=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c9479240d6 internal_vproblem=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 /usr/scratch/tmp/gdb-12.1/gdb/utils.c:394=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c947924409 _Z15internal_verrorPKciS0_P13__va_list_tag=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 /usr/scratch/tmp/gdb-12.1/gdb/utils.c:471=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c947a87bcc _Z14internal_errorPKciS0_z=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20 /usr/scratch/tmp/gdb-12.1/gdbsupport/errors.cc:55=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c94766927a _Z17jit_event_handlerP7gdbarchP7objfile=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 /usr/scratch/tmp/gdb-12.1/gdb/jit.c:1252=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c9473d2a40 handle_jit_event=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20 /usr/scratch/tmp/gdb-12.1/gdb/breakpoint.c:5552=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c9473d2dbd _Z20bpstat_run_callbacksP6bpstat=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 /usr/scratch/tmp/gdb-12.1/gdb/breakpoint.c:5753=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c947650b18 process_event_stop_test=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 /usr/scratch/tmp/gdb-12.1/gdb/infrun.c:6452=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0x55c9476509ed handle_signal_stop=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20 /usr/scratch/tmp/gdb-12.1/gdb/infrun.c:6420 0x55c94764ed12 handle_inferior_event /usr/scratch/tmp/gdb-12.1/gdb/infrun.c:5681 0x55c94764ac59 _Z20fetch_inferior_eventv /usr/scratch/tmp/gdb-12.1/gdb/infrun.c:4085 0x55c94762b0bb _Z22inferior_event_handler19inferior_event_type /usr/scratch/tmp/gdb-12.1/gdb/inf-loop.c:41 0x55c947690fbf handle_target_event /usr/scratch/tmp/gdb-12.1/gdb/linux-nat.c:4154 0x55c947a889e1 handle_file_event /usr/scratch/tmp/gdb-12.1/gdbsupport/event-loop.cc:574 0x55c947a88f80 gdb_wait_for_event /usr/scratch/tmp/gdb-12.1/gdbsupport/event-loop.cc:700 0x55c947a87d00 _Z16gdb_do_one_eventv /usr/scratch/tmp/gdb-12.1/gdbsupport/event-loop.cc:212 0x55c9476be153 start_event_loop /usr/scratch/tmp/gdb-12.1/gdb/main.c:421 0x55c9476be287 captured_command_loop /usr/scratch/tmp/gdb-12.1/gdb/main.c:481 0x55c9476bfd5f captured_main /usr/scratch/tmp/gdb-12.1/gdb/main.c:1351 0x55c9476bfdc5 _Z8gdb_mainP18captured_main_args /usr/scratch/tmp/gdb-12.1/gdb/main.c:1366 0x55c9473071fe main /usr/scratch/tmp/gdb-12.1/gdb/gdb.c:32 The objfile is: p *jit_bp_sym.objfile $2 =3D {original_name =3D 0x55c94a129950 "build-id/cb/38660bc052d7379d50faef77e2dec1.debug", addr_low =3D 0, flags = =3D {m_enum_value =3D (OBJF_REORDERED | OBJF_PSYMTABS_READ | OBJF_MAINLINE)}, pspace =3D 0x55c949e5a8b0, compunit_symtabs =3D 0x55c94aea7cc0, obfd =3D 0x55c94a076e50, per_bfd =3D 0x55c94a0e7760, mtime =3D 1655843985, objfile_o= bstack =3D {chunk_size =3D 4064, chunk =3D 0x55c94f504a10, object_base =3D 0x55c94f508f90 "", next_free =3D 0x55c94f508f90 "", chu= nk_limit =3D 0x55c94f508fdb "", temp =3D {i =3D 0, p =3D 0x0}, alignment_mask =3D 15= , chunkfun =3D {plain =3D 0x55c9473716d4 , extra =3D 0x55c9473716d4 }, freefun =3D {plain =3D 0x55c94772b7d2 (void*)>, extra =3D 0x55c94772b7d2 (void*)>}, extra_arg =3D 0x0, use_extra_arg =3D 0, maybe_empty_= object =3D 0, alloc_failed =3D 0}, sf =3D 0x55c947f5f5e0 , qf =3D std::forward_list =3D {[0] =3D std::unique_ptr =3D = {get() =3D 0x55c94a109de0}}, registry_data =3D {data =3D 0x55c94a12ac00, num_data =3D 21}, section_offsets =3D std::vector of length 46, capacit= y 46 =3D {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,= 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, sect_index_text =3D 12, sect_index_data =3D 28, sect_index_bss = =3D 31, sect_index_rodata =3D 15, sections =3D 0x55c94a1299a0, sections_end =3D 0x55c94a129df0, separate_debug_objfile =3D 0x0, separate_debug_objfile_backlink =3D 0x55c94a024d80, separate_debug_objfil= e_link =3D 0x0, stats =3D {n_syms =3D 34783, n_stabs =3D 0, n_types =3D 31535, sz_= strtab =3D 0}, template_symbols =3D 0x55c94f402c90, static_links =3D std::unique_ptr =3D {get() =3D 0x0}, jiter_data =3D std::unique_ptr =3D {get() =3D 0x0}, jited_data =3D std::unique_ptr =3D {get() =3D 0x0}, skip_jit_symbol_lookup =3D false} A member of our team suggested here that the code should be calling jit_event_handler should be called with the jit_bp_sym.objfile->separate_debug_objfile_backlink if it is set. With this change, gdb does not crash anymore but we're unfamiliar with the gdb code so this might be incorrect. Thanks in advance. --=20 You are receiving this mail because: You are on the CC list for the bug.=