From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E9EDC38537AF; Thu, 15 Dec 2022 20:09:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E9EDC38537AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671134968; bh=NliIyA+dUkV6LKgrQpb0OoW7fBp/2DA29vOOPUwEtJI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Xk7ujUmilKnlxvI2r2bhAfM8yM+EZjgv77mJJLBA/4Deq39BDgLZhMu0odR1jWVVW zh09up6m5zwbgIwfilgPJkCxlDzgf/SRotff8H2O5L81jsD6iJkqNLcgfvXzEVyw22 WC6S/AQMWO9Aoh+N6cdVlAulIAVsWGMoSYlCaDh0= From: "simon.marchi at polymtl dot ca" To: gdb-prs@sourceware.org Subject: [Bug backtrace/29395] blockframe.c:79: internal-error: get_frame_block: Assertion `bl != NULL' failed. Date: Thu, 15 Dec 2022 20:09:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: backtrace X-Bugzilla-Version: 11.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simon.marchi at polymtl dot ca X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29395 --- Comment #5 from Simon Marchi --- Ok, I got it to crash by installing the Arch Linux packages you provided on Arch Linux system, and then: $ /usr/bin/gdb /usr/bin/kicad -c kicad-core-gdb-crasher I then tried using my own build of GDB, it wouldn't crash. I rebuilt the A= rch package with debug info to understand where it crashes, it's within a frame-filter implementation. To reproduce the crash, we need this to be loaded: (gdb) info frame-filter=20 objfile /usr/lib/libgobject-2.0.so.0 frame-filters: Priority Enabled Name 100 Yes glib So, I was able to get the crash on master with: $ /home/simark/build/binutils-gdb-opt/gdb/gdb -nx --data-directory=3D/home/simark/build/binutils-gdb-opt/gdb/data-directory -= iex "add-auto-load-scripts-directory /usr/share/gdb/auto-load" -iex "set auto-l= oad safe-path /" -q /usr/bin/kicad -c ../gdb-29395/kicad-core-gdb-crasher -ex bt -batch (top-gdb) bt #0 internal_error_loc (file=3Dfile@entry=3D0x555555b56080 "/home/simark/src/binutils-gdb/gdb/blockframe.c", line=3Dline@entry=3D79, fmt=3Dfmt@entry=3D0x555555b55d40 "%s: Assertion `%s' failed.") at /home/simark/src/binutils-gdb/gdbsupport/errors.cc:54 #1 0x00005555560c2129 in get_frame_block (frame=3D..., addr_in_block=3Daddr_in_block@entry=3D0x0) at /home/simark/src/binutils-gdb/gdb/blockframe.c:79 #2 0x00005555560c2d84 in get_frame_function (frame=3D...) at /home/simark/src/binutils-gdb/gdb/blockframe.c:120 #3 0x0000555556d4ff8b in find_frame_funname (frame=3D..., funlang=3Dfunlang@entry=3D0x7fffffffaa20, funcp=3Dfuncp@entry=3D0x7fffffffa= a30) at /home/simark/src/binutils-gdb/gdb/stack.c:1288 #4 0x0000555556aff348 in frapy_function (self=3D, args=3D) at /home/simark/src/binutils-gdb/gdb/python/py-frame.c:329 #5 0x00007ffff7358204 in method_vectorcall_NOARGS (func=3D0x7ffff201f420, args=3D0x7ffff20eb2b8, nargsf=3D, kwnames=3D)= at Objects/descrobject.c:432 #6 0x00007ffff7344f4a in _PyObject_VectorcallTstate (kwnames=3D0x0, nargsf=3D, args=3D0x7ffff20eb2b8, callable=3D0x7ffff201f420, tstate=3D0x6120000c5ec0) at ./Include/cpython/abstract.h:114 #7 PyObject_Vectorcall (kwnames=3D0x0, nargsf=3D, args=3D0x7ffff20eb2b8, callable=3D0x7ffff201f420) at ./Include/cpython/abstract.h:123 #8 call_function (kwnames=3D0x0, oparg=3D, pp_stack=3D, trace_info=3D0x7fffffffacf0, tstate=3D) at Python/ceval.c:5891 #9 _PyEval_EvalFrameDefault (tstate=3D, f=3D0x7ffff20eb130, throwflag=3D) at Python/ceval.c:4198 #10 0x00007ffff7355959 in _PyEval_EvalFrame (throwflag=3D0, f=3D0x7ffff20eb= 130, tstate=3D0x6120000c5ec0) at ./Include/internal/pycore_ceval.h:46 #11 _PyEval_Vector (kwnames=3D, argcount=3D, args=3D, locals=3D0x0, con=3D0x7ffff20ec560, tstate=3D0x6120= 000c5ec0) at Python/ceval.c:5065 #12 _PyFunction_Vectorcall (func=3D0x7ffff20ec550, stack=3D, nargsf=3D, kwnames=3D) at Objects/call.c:342 #13 0x00007ffff7344f4a in _PyObject_VectorcallTstate (kwnames=3D0x0, nargsf=3D, args=3D0x7fffe94f1398, callable=3D0x7ffff20ec550, tstate=3D0x6120000c5ec0) at ./Include/cpython/abstract.h:114 #14 PyObject_Vectorcall (kwnames=3D0x0, nargsf=3D, args=3D0x7fffe94f1398, callable=3D0x7ffff20ec550) at ./Include/cpython/abstract.h:123 #15 call_function (kwnames=3D0x0, oparg=3D, pp_stack=3D, trace_info=3D0x7fffffffaeb0, tstate=3D) at Python/ceval.c:5891 #16 _PyEval_EvalFrameDefault (tstate=3D, f=3D0x7fffe94f1220, throwflag=3D) at Python/ceval.c:4198 #17 0x00007ffff7355959 in _PyEval_EvalFrame (throwflag=3D0, f=3D0x7fffe94f1= 220, tstate=3D0x6120000c5ec0) at ./Include/internal/pycore_ceval.h:46 #18 _PyEval_Vector (kwnames=3D, argcount=3D, args=3D, locals=3D0x0, con=3D0x7fffe9555130, tstate=3D0x6120= 000c5ec0) at Python/ceval.c:5065 #19 _PyFunction_Vectorcall (func=3D0x7fffe9555120, stack=3D, nargsf=3D, kwnames=3D) at Objects/call.c:342 #20 0x00007ffff7344b16 in _PyObject_VectorcallTstate (kwnames=3D0x0, nargsf=3D, args=3D, callable=3D0x7fffe9555120, tstate=3D0x6120000c5ec0) at ./Include/cpython/abstract.h:114 #21 PyObject_Vectorcall (kwnames=3D0x0, nargsf=3D, args=3D, callable=3D0x7fffe9555120) at ./Include/cpython/abstract.h:123 #22 call_function (kwnames=3D0x0, oparg=3D, pp_stack=3D, trace_info=3D0x7fffffffb070, tstate=3D) at Python/ceval.c:5891 #23 _PyEval_EvalFrameDefault (tstate=3D, f=3D0x7ffff20eaf80, throwflag=3D) at Python/ceval.c:4213 #24 0x00007ffff7355959 in _PyEval_EvalFrame (throwflag=3D0, f=3D0x7ffff20ea= f80, tstate=3D0x6120000c5ec0) at ./Include/internal/pycore_ceval.h:46 #25 _PyEval_Vector (kwnames=3D, argcount=3D, args=3D, locals=3D0x0, con=3D0x7fffe9555a30, tstate=3D0x6120= 000c5ec0) at Python/ceval.c:5065 #26 _PyFunction_Vectorcall (func=3D0x7fffe9555a20, stack=3D, nargsf=3D, kwnames=3D) at Objects/call.c:342 #27 0x00007ffff7344f4a in _PyObject_VectorcallTstate (kwnames=3D0x0, nargsf=3D, args=3D0x7ffff2086b90, callable=3D0x7fffe9555a20, tstate=3D0x6120000c5ec0) at ./Include/cpython/abstract.h:114 #28 PyObject_Vectorcall (kwnames=3D0x0, nargsf=3D, args=3D0x7ffff2086b90, callable=3D0x7fffe9555a20) at ./Include/cpython/abstract.h:123 #29 call_function (kwnames=3D0x0, oparg=3D, pp_stack=3D, trace_info=3D0x7fffffffb230, tstate=3D) at Python/ceval.c:5891 #30 _PyEval_EvalFrameDefault (tstate=3D, f=3D0x7ffff20869f0, throwflag=3D) at Python/ceval.c:4198 #31 0x00007ffff7355959 in _PyEval_EvalFrame (throwflag=3D0, f=3D0x7ffff2086= 9f0, tstate=3D0x6120000c5ec0) at ./Include/internal/pycore_ceval.h:46 #32 _PyEval_Vector (kwnames=3D, argcount=3D, args=3D, locals=3D0x0, con=3D0x7fffe9555ac0, tstate=3D0x6120= 000c5ec0) at Python/ceval.c:5065 #33 _PyFunction_Vectorcall (func=3D0x7fffe9555ab0, stack=3D, nargsf=3D, kwnames=3D) at Objects/call.c:342 #34 0x00007ffff7344f4a in _PyObject_VectorcallTstate (kwnames=3D0x0, nargsf=3D, args=3D0x7ffff2090b10, callable=3D0x7fffe9555ab0, tstate=3D0x6120000c5ec0) at ./Include/cpython/abstract.h:114 #35 PyObject_Vectorcall (kwnames=3D0x0, nargsf=3D, args=3D0x7ffff2090b10, callable=3D0x7fffe9555ab0) at ./Include/cpython/abstract.h:123 #36 call_function (kwnames=3D0x0, oparg=3D, pp_stack=3D, trace_info=3D0x7fffffffb3f0, tstate=3D) at Python/ceval.c:5891 #37 _PyEval_EvalFrameDefault (tstate=3D, f=3D0x7ffff20909a0, throwflag=3D) at Python/ceval.c:4198 #38 0x00007ffff73ad757 in _PyEval_EvalFrame (throwflag=3D0, f=3D0x7ffff2090= 9a0, tstate=3D0x6120000c5ec0) at ./Include/internal/pycore_ceval.h:46 #39 _PyEval_Vector (kwnames=3D0x0, argcount=3D, args=3D, locals=3D0x0, con=3D0x7fffe9555b50, tstate=3D0x6120000c5ec0) at Python/ceval.c:5065 #40 _PyFunction_Vectorcall (kwnames=3D0x0, nargsf=3D1, stack=3D, func=3D0x7fffe9555b40) at Objects/call.c:342 #41 _PyObject_VectorcallTstate (kwnames=3D0x0, nargsf=3D, args=3D, callable=3D0x7fffe9555b40, tstate=3D0x6120000c5ec0)= at ./Include/cpython/abstract.h:114 #42 vectorcall_unbound (nargs=3D, args=3D, func=3D, unbound=3D, tstate=3D= ) at Objects/typeobject.c:1629 #43 vectorcall_method (name=3D, args=3D, nargs=3D) at Objects/typeobject.c:1661 #44 0x00007ffff73dbab0 in slot_tp_iternext (self=3D) at Objects/typeobject.c:7672 #45 0x00007ffff73e134d in islice_next (lz=3D0x7fffe95c5030) at ./Modules/itertoolsmodule.c:1729 #46 0x00007ffff7339894 in PyIter_Next (iter=3D) at Objects/abstract.c:2874 #47 0x0000555556b0bbbf in gdbpy_apply_frame_filter (extlang=3D, frame=3D..., flags=3D..., args_type=3D, out=3D, frame_low=3D, frame_high=3D-1) at /home/simark/src/binutils-gdb/gdb/python/py-framefilter.c:1205 #48 0x00005555565aff8d in apply_ext_lang_frame_filter (frame=3D..., flags= =3D..., args_type=3Dargs_type@entry=3DCLI_SCALAR_VALUES, out=3Dout@entry=3D0x60b000= 041800, frame_low=3Dframe_low@entry=3D0, frame_high=3Dframe_high@entry=3D-1) at /home/simark/src/binutils-gdb/gdb/extension.c:541 #49 0x0000555556d5f6e2 in backtrace_command_1 (from_tty=3D0, count_exp=3D0x= 0, bt_opts=3D..., fp_opts=3D...) at /home/simark/src/binutils-gdb/gdb/stack.c:= 2051 #50 backtrace_command (arg=3D, from_tty=3D) at /home/simark/src/binutils-gdb/gdb/stack.c:2192 #51 0x000055555625e667 in cmd_func (cmd=3D0x61200008bcc0, args=3D, from_tty=3D) at /home/simark/src/binutils-gdb/gdb/cli/cli-decode.c:2543 #52 0x0000555556eebc83 in execute_command (p=3D, from_tty=3D) at /home/simark/src/binutils-gdb/gdb/top.c:697 #53 0x00005555569151d6 in catch_command_errors (command=3D, arg=3D, from_tty=3D, do_bp_actions=3Ddo_bp_actions@entry=3Dtrue) at /home/simark/src/binutils-gdb/gdb/main.c:513 #54 0x00005555569154cf in execute_cmdargs (cmdarg_vec=3Dcmdarg_vec@entry=3D0x7fffffffce90, file_type=3Dfile_type@entry=3DCMDARG_FILE, cmd_type=3Dcmd_type@entry=3DCMDA= RG_COMMAND, ret=3Dret@entry=3D0x7fffffffca50) at /home/simark/src/binutils-gdb/gdb/main= .c:608 #55 0x000055555691c610 in captured_main_1 (context=3Dcontext@entry=3D0x7fffffffd490) at /home/simark/src/binutils-gdb/gdb/main.c:1299 #56 0x000055555691d9eb in captured_main (data=3Ddata@entry=3D0x7fffffffd490= ) at /home/simark/src/binutils-gdb/gdb/main.c:1320 #57 gdb_main (args=3Dargs@entry=3D0x7fffffffd490) at /home/simark/src/binutils-gdb/gdb/main.c:1345 #58 0x0000555555f639bb in main (argc=3D14, argv=3D0x7fffffffd638) at /home/simark/src/binutils-gdb/gdb/gdb.c:32 PS: I think you'll find the master branch of GDB (to be GDB 13) much faster= to initially load the debug info, thanks to Tom Tromey's DWARF reader refactor= . I can really see the difference with binaries of this size, between 12 and master. --=20 You are receiving this mail because: You are on the CC list for the bug.=