Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb <gdb@sourceware.org>
To: Carsten Grzemba <grzemba@contac-dt.de>, gdb@sourceware.org
Subject: Re: Isuse using GDB 16.3 on Illumos
Date: Wed, 6 Aug 2025 22:14:10 -0400	[thread overview]
Message-ID: <23a81415-fb21-4786-aceb-66be264a0bb3@simark.ca> (raw)
In-Reply-To: <bf51be106049.689391ae@contac-dt.de>

On 8/6/25 11:32 AM, Carsten Grzemba via Gdb wrote:
> On Openindiana we have GDB 14.2 working.
> 
> I attempt to udate the gdb package to the recent version 16.3 
> It builds well but I get problems with debugging corefiles (multi htread):
> 
> 
> -- $ gdb
> GNU gdb (GDB) 16.3
> Copyright (C) 2024 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Type "show copying" and "show warranty" for details.
> This GDB was configured as "x86_64-pc-solaris2.11".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <https://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
>  <http://www.gnu.org/software/gdb/documentation/>.
> 
> For help, type "help".
> Type "apropos word" to search for commands related to "word".
> (gdb) file /usr/lib/tracker-store
> Reading symbols from /usr/lib/tracker-store...
> (No debugging symbols found in /usr/lib/tracker-store)
> (gdb) core-file /var/tmp/core.tracker-store.16526 
> [New LWP 1]
> [New LWP 2]
> [New LWP 3]
> [New LWP 4]
> [New LWP 5]
> [New LWP 6]
> [New LWP 7]
> [New LWP 8]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> --Type <RET> for more, q to quit, c to continue without paging--c
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> [LWP 1 exited]
> [New LWP 1]
> [LWP 2 exited]
> [New LWP 2]
> [LWP 3 exited]
> [New LWP 3]
> [LWP 4 exited]
> [New LWP 4]
> [LWP 5 exited]
> [New LWP 5]
> [LWP 6 exited]
> [New LWP 6]
> [LWP 7 exited]
> [New LWP 7]
> [LWP 8 exited]
> [New LWP 8]
> [LWP 9 exited]
> [New LWP 9]
> /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/regcache.c:432: internal-error: get_thread_regcache: Assertion `thread->state != THREAD_EXITED' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> ----- Backtrace -----
> 0x7b5d3c gdb_internal_backtrace_1
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/bt-utils.c:121
> 0x7b5d3c _Z22gdb_internal_backtracev
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/bt-utils.c:182
> 0xb95c84 internal_vproblem
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/utils.c:423
> 0xb95fe8 _Z15internal_verrorPKciS0_P13__va_list_tag
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/utils.c:503
> 0xce7bec _Z18internal_error_locPKciS0_z
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdbsupport/errors.cc:57
> 0xa6dfb5 _Z19get_thread_regcacheP11thread_info
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/regcache.c:432
> 0x94455e _Z20post_create_inferiori
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/infcmd.c:255
> 0x82b9a0 core_target_open
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/corelow.c:1154
> 0x7ee65c _Z8cmd_funcP16cmd_list_elementPKci
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/cli/cli-decode.c:2748
> 0xb4e13f _Z15execute_commandPKci
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/top.c:570
> 0x8dbf70 _Z15command_handlerPKc
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/event-top.c:613
> 0x8ddb85 _Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/event-top.c:849
> 0x8dcc3d gdb_rl_callback_handler
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/event-top.c:288
> 0xbe0560 rl_callback_read_char
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/readline/readline/callback.c:302
> 0x8dcdbd gdb_rl_callback_read_char_wrapper_sjlj
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/event-top.c:197
> 0x8dd02b gdb_rl_callback_read_char_wrapper_noexcept
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/event-top.c:240
> 0x8dd02b gdb_rl_callback_read_char_wrapper
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/event-top.c:252
> 0xb8f86f stdin_event_handler
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/ui.c:154
> 0xce8894 gdb_wait_for_event
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdbsupport/event-loop.cc:694
> 0xce9013 gdb_wait_for_event
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdbsupport/event-loop.cc:571
> 0xce9013 _Z16gdb_do_one_eventi
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdbsupport/event-loop.cc:263
> 0x997571 start_event_loop
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/main.c:402
> 0x997571 captured_command_loop
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/main.c:466
> 0x99a264 captured_main
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/main.c:1343
> 0x99a264 _Z8gdb_mainP18captured_main_args
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/main.c:1362
> 0x7140b9 main
>  /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/gdb.c:38
> ---------------------
> /code/github/oi-userland/components/developer/gdb/gdb-16.3/gdb/regcache.c:432: internal-error: get_thread_regcache: Assertion `thread->state != THREAD_EXITED' failed.
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> <signatureafterquotedtext>Quit this debugging session? (y or n)</signatureafterquotedtext>
> 
> 
> The same works with GDB 14.2 in Openindiana package repository. The version 15.2 seems to have te same problem.
> 
> 
> Debugging GDB with GDB seems to be a little bit tricky.
> Can anyone give me a hint whats going wrong here? Which test in the testsuite is related this task?

So it's this assert added here:

https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=249d08128787e4e0a977079aa09516d73f196f77

For some reason, the threads created for your core are marked as exited
(we can even see the [LWP n exited] notifications).  That probably
shouldn't happen for a core.  It's really odd that the same threads keep
exiting and reappearing.  You'll need to dig into that.

Can you open a bug on bugzilla for this?  It would help if you could
attach a core file and the associated binary.

Simon

      reply	other threads:[~2025-08-07  2:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-06 15:32 Carsten Grzemba via Gdb
2025-08-07  2:14 ` Simon Marchi via Gdb [this message]

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=23a81415-fb21-4786-aceb-66be264a0bb3@simark.ca \
    --to=gdb@sourceware.org \
    --cc=grzemba@contac-dt.de \
    --cc=simark@simark.ca \
    /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