From: Sam James <sam@gentoo.org>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: [PATCH v3 0/8] Correctly handle inline functions with dwz
Date: Mon, 23 Feb 2026 13:32:07 +0000 [thread overview]
Message-ID: <87cy1vmvqg.fsf@gentoo.org> (raw)
In-Reply-To: <87ldgjmvtv.fsf@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 5965 bytes --]
Sam James <sam@gentoo.org> writes:
> Tom Tromey <tom@tromey.com> writes:
>
>> The new indexer does not correctly handle inline functions when 'dwz'
>> is used to compress the DWARF. This series fixes the bug, cleaning up
>> a number of other things on the way.
>>
>> I've separately regression tested each patch in this series on x86-64
>> Fedora 41. I've also regression tested the series as a whole with the
>> dwz, gdb-index, and debug-names boards.
>>
>> Even with that I messed up somehow, so v1 didn't actually fix the bug
>> in question. I must have modified the patches after testing..?
>>
>> Anyway in v2 I've moved the line recording the CU inclusion and added
>> a comment explaining the placement. I re-ran the aformentioned tests
>> and didn't touch anything.
>
> With this, I get a crash when creating an index:
> ```
> $ /usr/bin/gdb --batch -nx -iex set\ auto-load\ no -iex set\ debuginfod\
> enabled\ off -ex file\
> \'/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin/gdb\' -ex save\
> gdb-index\ -dwarf-5\
> \'/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin\'
> dwarf2/index-write.c:818: internal-error: build: Assertion `offset_inserted' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> ----- Backtrace -----
> 0x561db97db67e ???
> 0x561db9fd8a04 ???
> 0x561dba59b487 ???
> 0x561db9918fe0 ???
> 0x561db991fb47 ???
> 0x561db9927e99 ???
> 0x561db99282e0 ???
> 0x561db9f12f56 ???
> 0x561db9b6612c ???
> 0x561db9b6cbfb ???
> 0x561db9644baf ???
> 0x7f8b51c03649 ???
> 0x7f8b51c03765 ???
> 0x561db96648d0 ???
> 0xffffffffffffffff ???
> ---------------------
> dwarf2/index-write.c:818: internal-error: build: Assertion `offset_inserted' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n) [answered Y; input not from terminal]
>
> This is a bug, please report it. For instructions, see:
> <https://bugs.gentoo.org/>.
>
> dwarf2/index-write.c:818: internal-error: build: Assertion `offset_inserted' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Create a core file of GDB? (y or n) [answered Y; input not from
> terminal]
> ```
Core was generated by `/usr/bin/gdb -nx -iex set\ auto-load\ no -iex set\ debuginfod\ enabled\ off -ex file\ \'/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin/gdb\' -ex save\ gdb-index\ -dwarf-5\ \'/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin\''.
Program terminated with signal SIGABRT, Aborted.
Downloading 4.48 K source file /usr/src/debug/sys-libs/glibc-2.43.9999/glibc-2.43.9999/nptl/pthread_kill.c
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at pthread_kill.c:44
44 return INTERNAL_SYSCALL_ERROR_P (ret) ? INTERNAL_SYSCALL_ERRNO (ret) : 0;
[Current thread is 1 (Thread 0x7f1321442280 (LWP 385388))]
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=6, no_tid=0) at pthread_kill.c:44
#1 __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at pthread_kill.c:100
#3 0x00007f1321220442 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0x00007f13212013e9 in __GI_abort () at abort.c:77
#5 0x000055f113294bad in dump_core () at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/utils.c:224
#6 0x000055f11329dbe5 in internal_vproblem(internal_problem *, const char *, int, const char *, typedef __va_list_tag __va_list_tag *) (problem=<optimized out>, file=<optimized out>, line=<optimized out>,
fmt=0x55f1139e8c6c "%s: Assertion `%s' failed.", ap=<optimized out>) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/utils.c:476
#7 0x000055f113860488 in internal_verror (file=<optimized out>, line=<optimized out>, fmt=<optimized out>, ap=0x7ffc562e60c0) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/utils.c:502
#8 internal_error_loc (file=<optimized out>, line=<optimized out>, fmt=<optimized out>) at ../gdbsupport/errors.cc:57
#9 0x000055f112bddfe1 in debug_names::build (this=<optimized out>) at dwarf2/index-write.c:818
#10 0x000055f112be4b48 in write_debug_names (per_bfd=per_bfd@entry=0x55f132cea0e0, table=table@entry=0x55f132cf6e40, out_file=0x55f132764db0, out_file_str=0x55f132ccf7a0) at dwarf2/index-write.c:1529
#11 0x000055f112bece9a in write_dwarf_index (per_bfd=0x55f132cea0e0, dir=0x55f1328a9110 "/var/tmp/portage/dev-debug/gdb-9999/image/usr/bin", basename=0x55f1329512c2 "gdb", dwz_basename=0x0,
index_kind=index_kind@entry=dw_index_kind::DEBUG_NAMES) at dwarf2/index-write.c:1696
#12 0x000055f112bed2e1 in save_gdb_index_command (args=<optimized out>, from_tty=<optimized out>) at dwarf2/index-write.c:1794
#13 0x000055f1131d7f57 in cmd_func (cmd=0x55f13264a020, args=<optimized out>, from_tty=1) at cli/cli-decode.c:2811
#14 execute_command (p=<optimized out>, from_tty=<optimized out>) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/top.c:632
#15 0x000055f112e2b12d in catch_command_errors (command=<optimized out>, arg=<optimized out>, from_tty=<optimized out>, do_bp_actions=true) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:507
#16 execute_cmdargs (cmdarg_vec=cmdarg_vec@entry=0x7ffc562e6c30, file_type=file_type@entry=CMDARG_FILE, cmd_type=cmd_type@entry=CMDARG_COMMAND, ret=ret@entry=0x7ffc562e6c14)
at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:606
#17 0x000055f112e31bfc in captured_main_1(captured_main_args*) [clone .constprop.0] (context=context@entry=0x7ffc562e6f00) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:1342
#18 0x000055f112909bb0 in captured_main (context=0x7ffc562e6f00) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:1365
#19 gdb_main (args=0x7ffc562e6f00) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/main.c:1394
#20 main (argc=10, argv=0x7ffc562e7058) at /usr/src/debug/dev-debug/gdb-9999/gdb-9999/gdb/gdb.c:38
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 418 bytes --]
next prev parent reply other threads:[~2026-02-23 13:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-20 20:42 Tom Tromey
2026-02-20 20:42 ` [PATCH v3 1/8] Don't call add_dependence from index_imported_unit Tom Tromey
2026-02-20 20:42 ` [PATCH v3 2/8] Skip partial units in process_psymtab_comp_unit Tom Tromey
2026-02-20 20:42 ` [PATCH v3 3/8] Don't consider DW_TAG_inlined_subroutine as interesting Tom Tromey
2026-02-20 20:42 ` [PATCH v3 4/8] Combine two cases in cooked_index_functions::search Tom Tromey
2026-02-20 20:42 ` [PATCH v3 5/8] Remove C++ special case from process_imported_unit_die Tom Tromey
2026-02-20 20:42 ` [PATCH v3 6/8] Have iterate_over_one_compunit_symtab search included symtabs Tom Tromey
2026-02-20 20:42 ` [PATCH v3 7/8] Handle inline functions with dwz Tom Tromey
2026-02-20 20:42 ` [PATCH v3 8/8] Update .debug_names documentation Tom Tromey
2026-02-23 13:30 ` [PATCH v3 0/8] Correctly handle inline functions with dwz Sam James
2026-02-23 13:32 ` Sam James [this message]
2026-02-23 13:34 ` Simon Marchi
2026-02-23 13:48 ` Sam James
2026-02-23 22:31 ` Tom Tromey
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=87cy1vmvqg.fsf@gentoo.org \
--to=sam@gentoo.org \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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