#1029515 gdb: An attempt to debug a mono application gives: Assertion `jiter->jiter_data != nullptr' failed.

Package:
gdb
Source:
gdb
Description:
GNU Debugger
Submitter:
Bernhard Übelacker
Date:
2023-01-23 16:45:04 UTC
Severity:
normal
#1029515#5
Date:
2023-01-23 16:41:04 UTC
From:
To:

Dear Maintainer,
I tried to debug a mono application in another Debian bug.

There I received the assertion below, with just trying to run
the application inside gdb.

I found this gdb upstream bug report:
https://sourceware.org/bugzilla/show_bug.cgi?id=29277

And a gdb package built with the proposed patch from comment 1
does no longer hit this assertion.

Might be just an issue with debug information
separated to external files (mono-runtime-dbg package).

Kind regards,
Bernhard



# with this packages installed: cowbell cowbell-dbgsym mono-dbg mono-runtime-dbg

benutzer@debian:~$ gdb -q --args /usr/bin/mono /usr/lib/cowbell/cowbell.exe
Reading symbols from /usr/bin/mono...
Reading symbols from /usr/lib/debug//usr/bin/mono-sgen...
Mono support loaded.
Mono support loaded.
(gdb) run
Starting program: /usr/bin/mono /usr/lib/cowbell/cowbell.exe
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
/build/gdb-JNEVqL/gdb-12.1/gdb/jit.c:1252: internal-error: jit_event_handler: Assertion `jiter->jiter_data != nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x55c034f2b21e gdb_internal_backtrace_1
         /build/gdb-JNEVqL/gdb-12.1/gdb/bt-utils.c:122
0x55c034f2b21e _Z22gdb_internal_backtracev
         /build/gdb-JNEVqL/gdb-12.1/gdb/bt-utils.c:168
0x55c035259d54 internal_vproblem
         /build/gdb-JNEVqL/gdb-12.1/gdb/utils.c:394
0x55c035259f7a _Z15internal_verrorPKciS0_P13__va_list_tag
         /build/gdb-JNEVqL/gdb-12.1/gdb/utils.c:471
0x55c035398e81 _Z14internal_errorPKciS0_z
         /build/gdb-JNEVqL/gdb-12.1/gdbsupport/errors.cc:55
0x55c03509585c _Z17jit_event_handlerP7gdbarchP7objfile
         /build/gdb-JNEVqL/gdb-12.1/gdb/jit.c:1252
0x55c034f0d0b8 handle_jit_event
         /build/gdb-JNEVqL/gdb-12.1/gdb/breakpoint.c:5552
0x55c034f0d0b8 _Z20bpstat_run_callbacksP6bpstat
         /build/gdb-JNEVqL/gdb-12.1/gdb/breakpoint.c:5753
0x55c035088266 process_event_stop_test
         /build/gdb-JNEVqL/gdb-12.1/gdb/infrun.c:6452
0x55c03508c888 handle_stop_requested
         /build/gdb-JNEVqL/gdb-12.1/gdb/infrun.c:4465
0x55c03508c888 handle_stop_requested
         /build/gdb-JNEVqL/gdb-12.1/gdb/infrun.c:4460
0x55c03508c888 handle_inferior_event
         /build/gdb-JNEVqL/gdb-12.1/gdb/infrun.c:5695
0x55c03508e479 _Z20fetch_inferior_eventv
         /build/gdb-JNEVqL/gdb-12.1/gdb/infrun.c:4085
0x55c035399405 gdb_wait_for_event
         /build/gdb-JNEVqL/gdb-12.1/gdbsupport/event-loop.cc:725
0x55c0353999f6 _Z16gdb_do_one_eventv
         /build/gdb-JNEVqL/gdb-12.1/gdbsupport/event-loop.cc:212
0x55c0350cedec start_event_loop
         /build/gdb-JNEVqL/gdb-12.1/gdb/main.c:421
0x55c0350cedec captured_command_loop
         /build/gdb-JNEVqL/gdb-12.1/gdb/main.c:481
0x55c0350d0a64 captured_main
         /build/gdb-JNEVqL/gdb-12.1/gdb/main.c:1351
0x55c0350d0a64 _Z8gdb_mainP18captured_main_args
         /build/gdb-JNEVqL/gdb-12.1/gdb/main.c:1366
0x55c034e96219 main
         /build/gdb-JNEVqL/gdb-12.1/gdb/gdb.c:32
---------------------

1: *jit_bp_sym.objfile = {original_name = "/usr/lib/debug//usr/bin/mono-sgen" ...
2: *jit_bp_sym.objfile->separate_debug_objfile_backlink = {original_name = "/usr/bin/mono" ...