public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/31061] New: [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed
@ 2023-11-13 12:55 vries at gcc dot gnu.org
  2023-11-13 12:55 ` [Bug gdb/31061] " vries at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2023-11-13 12:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31061

            Bug ID: 31061
           Summary: [gdb] intrusive_list.h:458: internal-error:
                    erase_element: Assertion `elem_node->prev !=
                    INTRUSIVE_LIST_UNLINKED_VALUE' failed
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

I build a recent trunk (commit ae86085027a Automatic date update in version.in)
on pinebook (64-bit kernel, 32-bit userland) with gcc 10.2.1 and ran into:
...
/home/rock/gdb/src/gdb/../gdbsupport/intrusive_list.h:458: internal-error:
erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE'
failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
----- Backtrace --FAIL: gdb.base/gdb-sigterm.exp: pass=1: expect eof (GDB
internal error)
Resyncing due to internal error.
---^M
0xaae39795 gdb_internal_backtrace_1^M
        /home/rock/gdb/src/gdb/bt-utils.c:122^M
0xaae3982f _Z22gdb_internal_backtracev^M
        /home/rock/gdb/src/gdb/bt-utils.c:168^M
0xab277015 internal_vproblem^M
        /home/rock/gdb/src/gdb/utils.c:396^M
0xab27738b _Z15internal_verrorPKciS0_St9__va_list^M
        /home/rock/gdb/src/gdb/utils.c:476^M
0xab426c17 _Z18internal_error_locPKciS0_z^M
        /home/rock/gdb/src/gdbsupport/errors.cc:58^M
0xaae2ec2f
_ZN14intrusive_listI10breakpoint19intrusive_base_nodeIS0_EE13erase_elementERS0_^M
        /home/rock/gdb/src/gdb/../gdbsupport/intrusive_list.h:458^M
0xaae2a87f ???^M
0xaae1d42b _Z17delete_breakpointP10breakpoint^M
        /home/rock/gdb/src/gdb/breakpoint.c:12636^M
0xab1ed045 delete_thread_breakpoint^M
        /home/rock/gdb/src/gdb/thread.c:98^M
0xab1ed0ab _Z30delete_single_step_breakpointsP11thread_info^M
        /home/rock/gdb/src/gdb/thread.c:123^M
0xab021e81 delete_thread_infrun_breakpoints^M
        /home/rock/gdb/src/gdb/infrun.c:3733^M
0xab021edd for_each_just_stopped_thread^M
        /home/rock/gdb/src/gdb/infrun.c:3752^M
0xab021f79 delete_just_stopped_threads_infrun_breakpoints^M
        /home/rock/gdb/src/gdb/infrun.c:3768^M
0xaae2c629 _ZN10scope_exitIPFvvEE7on_exitEv^M
        /home/rock/gdb/src/gdb/../gdbsupport/scope-exit.h:150^M
0xaae28533 _ZN15scope_exit_baseI10scope_exitIPFvvEEED2Ev^M
        /home/rock/gdb/src/gdb/../gdbsupport/scope-exit.h:68^M
---------------------^M
  [infrun] infrun_async: enable=0^M
/home/rock/gdb/src/gdb/../gdbsupport/intrusive_list.h:458: internal-error:
erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE'
failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
Quit this debugging session? (y or n)   [infrun] scoped_disable_commit_resumed:
reason=killing^M
  [infrun] reset: reason=killing^M
n^M
ERROR: Could not resync from internal error (eof)
gdb.base/gdb-sigterm.exp: pass=1: expect eof: stepped 5 times
UNRESOLVED: gdb.base/gdb-sigterm.exp: 50 SIGTERM passes
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/31061] [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed
  2023-11-13 12:55 [Bug gdb/31061] New: [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed vries at gcc dot gnu.org
@ 2023-11-13 12:55 ` vries at gcc dot gnu.org
  2023-11-13 15:25 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2023-11-13 12:55 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31061

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Fixed by the usual:
...
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index fe09dbcbeee..0a58821fc00 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -12633,7 +12633,8 @@ delete_breakpoint (struct breakpoint *bpt)
   if (bpt->number)
     notify_breakpoint_deleted (bpt);

-  breakpoint_chain.erase (breakpoint_chain.iterator_to (*bpt));
+  if (bpt->is_linked ())
+    breakpoint_chain.erase (breakpoint_chain.iterator_to (*bpt));

   /* Be sure no bpstat's are pointing at the breakpoint after it's
      been freed.  */
...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/31061] [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed
  2023-11-13 12:55 [Bug gdb/31061] New: [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed vries at gcc dot gnu.org
  2023-11-13 12:55 ` [Bug gdb/31061] " vries at gcc dot gnu.org
@ 2023-11-13 15:25 ` vries at gcc dot gnu.org
  2023-11-13 15:26 ` vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2023-11-13 15:25 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31061

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
https://sourceware.org/pipermail/gdb-patches/2023-November/204066.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/31061] [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed
  2023-11-13 12:55 [Bug gdb/31061] New: [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed vries at gcc dot gnu.org
  2023-11-13 12:55 ` [Bug gdb/31061] " vries at gcc dot gnu.org
  2023-11-13 15:25 ` vries at gcc dot gnu.org
@ 2023-11-13 15:26 ` vries at gcc dot gnu.org
  2023-11-29 11:58 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2023-11-13 15:26 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31061

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |---

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Undo accidental marking as resolved-fixed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/31061] [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed
  2023-11-13 12:55 [Bug gdb/31061] New: [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-11-13 15:26 ` vries at gcc dot gnu.org
@ 2023-11-29 11:58 ` vries at gcc dot gnu.org
  2024-01-24 15:00 ` sam at gentoo dot org
  2024-01-24 15:00 ` sam at gentoo dot org
  5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2023-11-29 11:58 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31061

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Created attachment 15231
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15231&action=edit
Demonstrator patch that allows to reproduce the problem on amd64

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/31061] [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed
  2023-11-13 12:55 [Bug gdb/31061] New: [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-11-29 11:58 ` vries at gcc dot gnu.org
@ 2024-01-24 15:00 ` sam at gentoo dot org
  2024-01-24 15:00 ` sam at gentoo dot org
  5 siblings, 0 replies; 7+ messages in thread
From: sam at gentoo dot org @ 2024-01-24 15:00 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31061

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug gdb/31061] [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed
  2023-11-13 12:55 [Bug gdb/31061] New: [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-01-24 15:00 ` sam at gentoo dot org
@ 2024-01-24 15:00 ` sam at gentoo dot org
  5 siblings, 0 replies; 7+ messages in thread
From: sam at gentoo dot org @ 2024-01-24 15:00 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=31061

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=31281

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-01-24 15:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-13 12:55 [Bug gdb/31061] New: [gdb] intrusive_list.h:458: internal-error: erase_element: Assertion `elem_node->prev != INTRUSIVE_LIST_UNLINKED_VALUE' failed vries at gcc dot gnu.org
2023-11-13 12:55 ` [Bug gdb/31061] " vries at gcc dot gnu.org
2023-11-13 15:25 ` vries at gcc dot gnu.org
2023-11-13 15:26 ` vries at gcc dot gnu.org
2023-11-29 11:58 ` vries at gcc dot gnu.org
2024-01-24 15:00 ` sam at gentoo dot org
2024-01-24 15:00 ` sam at gentoo dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).