public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug exp/31231] New: [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed.
@ 2024-01-11 10:29 vries at gcc dot gnu.org
2024-01-11 10:44 ` [Bug exp/31231] " vries at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-11 10:29 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31231
Bug ID: 31231
Summary: [gdb, ppc64le] frame.c:2088: internal-error:
get_next_frame_sentinel_okay: Assertion
`!is_sentinel_frame_id (this_frame->this_id.value)'
failed.
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: exp
Assignee: unassigned at sourceware dot org
Reporter: vries at gcc dot gnu.org
Target Milestone: ---
When running the gdb testsuite using trunk on powerpc64le-linux, power10, I run
into:
...
(gdb) PASS: gdb.base/store.exp: var float l; print old r, expecting -2
set variable l = 4^M
/home/vries/gdb/src/gdb/frame.c:2088: internal-error:
get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id
(this_frame->this_id.value)' failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
----- Backtrace -----^M
FAIL: gdb.base/store.exp: var float l; setting l to 4 (GDB internal error)
Resyncing due to internal error.
0x1029c1f3 gdb_internal_backtrace_1^M
/home/vries/gdb/src/gdb/bt-utils.c:122^M
0x1029c363 _Z22gdb_internal_backtracev^M
/home/vries/gdb/src/gdb/bt-utils.c:168^M
0x10df425b internal_vproblem^M
/home/vries/gdb/src/gdb/utils.c:396^M
0x10df4797 _Z15internal_verrorPKciS0_Pc^M
/home/vries/gdb/src/gdb/utils.c:476^M
0x1183664f _Z18internal_error_locPKciS0_z^M
/home/vries/gdb/src/gdbsupport/errors.cc:58^M
0x10618ab7 _Z28get_next_frame_sentinel_okay14frame_info_ptr^M
/home/vries/gdb/src/gdb/frame.c:2088^M
0x10b1f063 rs6000_value_to_register^M
/home/vries/gdb/src/gdb/rs6000-tdep.c:2747^M
0x1015c237 _Z25gdbarch_value_to_registerP7gdbarch14frame_info_ptriP4typePKh^M
/home/vries/gdb/src/gdb/gdbarch.c:2549^M
0x10e1b1cb _Z12value_assignP5valueS0_^M
/home/vries/gdb/src/gdb/valops.c:1247^M
0x101fafef ???^M
0x105aee33 _ZN10expression8evaluateEP4type6noside^M
/home/vries/gdb/src/gdb/eval.c:111^M
0x1095520f set_command^M
/home/vries/gdb/src/gdb/printcmd.c:1477^M
0x10324c23 do_simple_func^M
/home/vries/gdb/src/gdb/cli/cli-decode.c:95^M
0x1032bfb7 _Z8cmd_funcP16cmd_list_elementPKci^M
/home/vries/gdb/src/gdb/cli/cli-decode.c:2735^M
0x10d05663 _Z15execute_commandPKci^M
/home/vries/gdb/src/gdb/top.c:575^M
0x105c0083 _Z15command_handlerPKc^M
/home/vries/gdb/src/gdb/event-top.c:566^M
0x105c0867 _Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE^M
/home/vries/gdb/src/gdb/event-top.c:802^M
0x10d4c083 tui_command_line_handler^M
/home/vries/gdb/src/gdb/tui/tui-interp.c:104^M
0x105bf4d3 gdb_rl_callback_handler^M
/home/vries/gdb/src/gdb/event-top.c:259^M
0x10ed2b2b rl_callback_read_char^M
/home/vries/gdb/src/readline/readline/callback.c:290^M
0x105bf193 gdb_rl_callback_read_char_wrapper_noexcept^M
/home/vries/gdb/src/gdb/event-top.c:195^M
0x105bf30b gdb_rl_callback_read_char_wrapper^M
/home/vries/gdb/src/gdb/event-top.c:234^M
0x10d95f9b stdin_event_handler^M
/home/vries/gdb/src/gdb/ui.c:155^M
0x11837d7f handle_file_event^M
/home/vries/gdb/src/gdbsupport/event-loop.cc:573^M
0x118382f3 gdb_wait_for_event^M
/home/vries/gdb/src/gdbsupport/event-loop.cc:694^M
0x11836d5b _Z16gdb_do_one_eventi^M
/home/vries/gdb/src/gdbsupport/event-loop.cc:264^M
0x107f248b start_event_loop^M
/home/vries/gdb/src/gdb/main.c:408^M
0x107f2703 captured_command_loop^M
/home/vries/gdb/src/gdb/main.c:472^M
0x107f4aff captured_main^M
/home/vries/gdb/src/gdb/main.c:1342^M
0x107f4c07 _Z8gdb_mainP18captured_main_args^M
/home/vries/gdb/src/gdb/main.c:1361^M
0x1001c887 main^M
/home/vries/gdb/src/gdb/gdb.c:39^M
...
--
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 exp/31231] [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed.
2024-01-11 10:29 [Bug exp/31231] New: [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed vries at gcc dot gnu.org
@ 2024-01-11 10:44 ` vries at gcc dot gnu.org
2024-01-11 10:52 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-11 10:44 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31231
--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Minimal reproducer:
...
$ cat gdb.in
file /home/vries/gdb/build/gdb/testsuite/outputs/gdb.base/store/store
b 110
run
set variable l = 4
...
Backtrace at abort:
...
(gdb) bt
#0 0x00007ffff6eacb68 in __pthread_kill_implementation () from
/lib64/glibc-hwcaps/power10/libc.so.6
#1 0x00007ffff6e4f2e0 in raise () from /lib64/glibc-hwcaps/power10/libc.so.6
#2 0x00007ffff6e2a834 in abort () from /lib64/glibc-hwcaps/power10/libc.so.6
#3 0x0000000010df3d20 in dump_core () at /home/vries/gdb/src/gdb/utils.c:198
#4 0x0000000010df4658 in internal_vproblem (problem=0x12a282b0
<internal_error_problem>,
file=0x11925710 "/home/vries/gdb/src/gdb/frame.c", line=2088,
fmt=0x11925680 "%s: Assertion `%s' failed.",
ap=0x7fffffffd318 "0d\222\021") at /home/vries/gdb/src/gdb/utils.c:450
#5 0x0000000010df4798 in internal_verror (file=0x11925710
"/home/vries/gdb/src/gdb/frame.c", line=2088,
fmt=0x11925680 "%s: Assertion `%s' failed.", ap=0x7fffffffd318
"0d\222\021")
at /home/vries/gdb/src/gdb/utils.c:476
#6 0x0000000011836650 in internal_error_loc (file=0x11925710
"/home/vries/gdb/src/gdb/frame.c", line=2088,
fmt=0x11925680 "%s: Assertion `%s' failed.") at
/home/vries/gdb/src/gdbsupport/errors.cc:58
#7 0x0000000010618ab8 in get_next_frame_sentinel_okay (this_frame=...) at
/home/vries/gdb/src/gdb/frame.c:2088
#8 0x0000000010b1f064 in rs6000_value_to_register (frame=..., regnum=63,
type=0x130e8a70, from=0x132d1470 "")
at /home/vries/gdb/src/gdb/rs6000-tdep.c:2747
#9 0x000000001015c238 in gdbarch_value_to_register (gdbarch=0x130d9ea0,
frame=..., regnum=63, type=0x130e8a70,
buf=0x132d1470 "") at /home/vries/gdb/src/gdb/gdbarch.c:2549
#10 0x0000000010e1b1cc in value_assign (toval=0x131c5aa0, fromval=0x132b56c0)
at /home/vries/gdb/src/gdb/valops.c:1247
#11 0x00000000101faff0 in expr::assign_operation::evaluate (this=0x132d0340,
expect_type=0x0, exp=0x132aad70,
noside=EVAL_NORMAL) at /home/vries/gdb/src/gdb/expop.h:1911
#12 0x00000000105aee34 in expression::evaluate (this=0x132aad70,
expect_type=0x0, noside=EVAL_NORMAL)
at /home/vries/gdb/src/gdb/eval.c:111
#13 0x0000000010955210 in set_command (exp=0x130db57d "l = 4", from_tty=0) at
/home/vries/gdb/src/gdb/printcmd.c:1477
#14 0x0000000010324c24 in do_simple_func (args=0x130db57d "l = 4", from_tty=0,
c=0x12eea520)
at /home/vries/gdb/src/gdb/cli/cli-decode.c:95
#15 0x000000001032bfb8 in cmd_func (cmd=0x12eea520, args=0x130db57d "l = 4",
from_tty=0)
at /home/vries/gdb/src/gdb/cli/cli-decode.c:2735
#16 0x0000000010d05664 in execute_command (p=0x130db581 "4", from_tty=0) at
/home/vries/gdb/src/gdb/top.c:575
#17 0x00000000105c0084 in command_handler (command=0x130db570 "set variable l =
4")
at /home/vries/gdb/src/gdb/event-top.c:566
#18 0x0000000010d0496c in read_command_file (stream=0x1308e980) at
/home/vries/gdb/src/gdb/top.c:342
#19 0x00000000103436d0 in script_from_file (stream=0x1308e980,
file=0x7ffffffff117 "gdb.in")
at /home/vries/gdb/src/gdb/cli/cli-script.c:1642
#20 0x0000000010317848 in source_script_from_stream (stream=0x1308e980,
file=0x7ffffffff117 "gdb.in",
file_to_open=0x7fffffffe280 "gdb.in") at
/home/vries/gdb/src/gdb/cli/cli-cmds.c:730
#21 0x0000000010317a18 in source_script_with_search (file=0x7ffffffff117
"gdb.in", from_tty=0, search_path=0)
at /home/vries/gdb/src/gdb/cli/cli-cmds.c:775
#22 0x0000000010317ad8 in source_script (file=0x7ffffffff117 "gdb.in",
from_tty=0)
at /home/vries/gdb/src/gdb/cli/cli-cmds.c:784
#23 0x00000000107f2868 in catch_command_errors (command=0x10317a9c
<source_script(char const*, int)>,
arg=0x7ffffffff117 "gdb.in", from_tty=0, do_bp_actions=false) at
/home/vries/gdb/src/gdb/main.c:514
#24 0x00000000107f2b84 in execute_cmdargs (cmdarg_vec=0x7fffffffe598,
file_type=CMDARG_FILE,
cmd_type=CMDARG_COMMAND, ret=0x7fffffffe5c8) at
/home/vries/gdb/src/gdb/main.c:610
#25 0x00000000107f4870 in captured_main_1 (context=0x7fffffffe840) at
/home/vries/gdb/src/gdb/main.c:1311
#26 0x00000000107f4afc in captured_main (data=0x7fffffffe840) at
/home/vries/gdb/src/gdb/main.c:1332
#27 0x00000000107f4c08 in gdb_main (args=0x7fffffffe840) at
/home/vries/gdb/src/gdb/main.c:1361
#28 0x000000001001c888 in main (argc=7, argv=0x7fffffffecb8) at
/home/vries/gdb/src/gdb/gdb.c:39
(gdb)
...
--
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 exp/31231] [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed.
2024-01-11 10:29 [Bug exp/31231] New: [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed vries at gcc dot gnu.org
2024-01-11 10:44 ` [Bug exp/31231] " vries at gcc dot gnu.org
@ 2024-01-11 10:52 ` vries at gcc dot gnu.org
2024-01-11 16:35 ` simark at simark dot ca
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: vries at gcc dot gnu.org @ 2024-01-11 10:52 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31231
Tom de Vries <vries at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simon.marchi at polymtl dot ca
--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
The assert reads as follows:
...
/* Note that, due to the manner in which the sentinel frame is
constructed, this_frame->next still works even when this_frame
is the sentinel frame. But we disallow it here anyway because
calling get_next_frame_sentinel_okay() on the sentinel frame
is likely a coding error. */
if (this_frame->this_id.p == frame_id_status::COMPUTED)
gdb_assert (!is_sentinel_frame_id (this_frame->this_id.value));
...
Possibly triggered by recent commit:
...
commit 584468de6c4c305eac9e89801b82406a3fdb3c3b
Author: Simon Marchi <simon.marchi@efficios.com>
Date: Fri Dec 1 11:27:23 2023 -0500
gdb: make put_frame_register take the next frame
...
which does:
...
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index cbbaf6d83a1..c43039302bc 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2744,7 +2744,7 @@ rs6000_value_to_register (frame_info_ptr frame,
struct type *to_type = builtin_type (gdbarch)->builtin_double;
target_float_convert (from, type, to, to_type);
auto to_view = gdb::make_array_view (to, to_type->length ());
- put_frame_register (frame, regnum, to_view);
+ put_frame_register (get_next_frame_sentinel_okay (frame), regnum, to_view);
}
...
--
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 exp/31231] [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed.
2024-01-11 10:29 [Bug exp/31231] New: [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed vries at gcc dot gnu.org
2024-01-11 10:44 ` [Bug exp/31231] " vries at gcc dot gnu.org
2024-01-11 10:52 ` vries at gcc dot gnu.org
@ 2024-01-11 16:35 ` simark at simark dot ca
2024-01-11 16:51 ` simark at simark dot ca
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: simark at simark dot ca @ 2024-01-11 16:35 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31231
Simon Marchi <simark at simark dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |simark at simark dot ca
--- Comment #3 from Simon Marchi <simark at simark dot ca> ---
Thanks, reproduced. We are indeed passing the wrong frame somewhere.
--
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 exp/31231] [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed.
2024-01-11 10:29 [Bug exp/31231] New: [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed vries at gcc dot gnu.org
` (2 preceding siblings ...)
2024-01-11 16:35 ` simark at simark dot ca
@ 2024-01-11 16:51 ` simark at simark dot ca
2024-01-11 18:12 ` cvs-commit at gcc dot gnu.org
2024-01-11 18:12 ` simark at simark dot ca
5 siblings, 0 replies; 7+ messages in thread
From: simark at simark dot ca @ 2024-01-11 16:51 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31231
--- Comment #4 from Simon Marchi <simark at simark dot ca> ---
Patch:
https://inbox.sourceware.org/gdb-patches/20240111165125.134100-1-simon.marchi@efficios.com/T/#u
--
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 exp/31231] [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed.
2024-01-11 10:29 [Bug exp/31231] New: [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed vries at gcc dot gnu.org
` (3 preceding siblings ...)
2024-01-11 16:51 ` simark at simark dot ca
@ 2024-01-11 18:12 ` cvs-commit at gcc dot gnu.org
2024-01-11 18:12 ` simark at simark dot ca
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-11 18:12 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31231
--- Comment #5 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Simon Marchi <simark@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=47ff07a6c283a39fa3b8c92d823c8851678dfc0f
commit 47ff07a6c283a39fa3b8c92d823c8851678dfc0f
Author: Simon Marchi <simon.marchi@efficios.com>
Date: Thu Jan 11 11:41:04 2024 -0500
gdb: fix frame passed to gdbarch_value_to_register in value_assign
Commit 78f2fd84e83 ("gdb: remove VALUE_REGNUM, add value::regnum")
introduced an unexpected change in value_assign. It replaced
`get_prev_frame_always (next_frame)` with `next_frame`in the call to
gdbarch_value_to_register.
This is the result of a merge error, since I previously had a patch to
change gdbarch_value_to_register to take the next frame, and later
decided to drop it. Revert that change.
Add a test based on the DWARF assembler to expose the problem and test
the fix. I also tested on ppc64le to make sure the problem reported in
PR 31231 was fixed.
Change-Id: Ib8b851287ac27a4b2e386f7b680cf65865e6aee6
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31231
--
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 exp/31231] [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed.
2024-01-11 10:29 [Bug exp/31231] New: [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed vries at gcc dot gnu.org
` (4 preceding siblings ...)
2024-01-11 18:12 ` cvs-commit at gcc dot gnu.org
@ 2024-01-11 18:12 ` simark at simark dot ca
5 siblings, 0 replies; 7+ messages in thread
From: simark at simark dot ca @ 2024-01-11 18:12 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=31231
Simon Marchi <simark at simark dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Simon Marchi <simark at simark dot ca> ---
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
end of thread, other threads:[~2024-01-11 18:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11 10:29 [Bug exp/31231] New: [gdb, ppc64le] frame.c:2088: internal-error: get_next_frame_sentinel_okay: Assertion `!is_sentinel_frame_id (this_frame->this_id.value)' failed vries at gcc dot gnu.org
2024-01-11 10:44 ` [Bug exp/31231] " vries at gcc dot gnu.org
2024-01-11 10:52 ` vries at gcc dot gnu.org
2024-01-11 16:35 ` simark at simark dot ca
2024-01-11 16:51 ` simark at simark dot ca
2024-01-11 18:12 ` cvs-commit at gcc dot gnu.org
2024-01-11 18:12 ` simark at simark dot ca
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).