Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-7328

gdb: “info func” results in internal-error: LONGEST dynamic_prop::const_val() const: Assertion `m_kind == PROP_CONST' failed.

    • sst_pt_perf_debug
    • ssg_platform_tools
    • 7
    • 11
    • 1
    • False
    • Hide

      None

      Show
      None
    • No
    • If docs needed, set a value

      Installed package versions:

      gdb-10.2-11.el9.x86_64
      openblas-threads-0.3.21-2.el9.x86_64
      openblas-debugsource-0.3.21-2.el9.x86_64
      openblas-debuginfo-0.3.21-2.el9.x86_64

      Reproducer:

      1. gdb -batch -ex "info func l2" /usr/lib64/libopenblasp.so.0
        All functions matching regular expression "l2":

      File cgeql2.f:
      122: ../../gdb/gdbtypes.h:527: internal-error: LONGEST dynamic_prop::const_val() const: Assertion `m_kind == PROP_CONST' 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://www.gnu.org/software/gdb/bugs/>.

      ../../gdb/gdbtypes.h:527: internal-error: LONGEST dynamic_prop::const_val() const: Assertion `m_kind == PROP_CONST' 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]
      Aborted (core dumped)

      The crash doesn't reproduce with gcc-toolset-13-gdb-12.1-3.el9.x86_64, but I don't know if the bug has actually been fixed, or if it is just flaky. The crash still happens with gcc-toolset-12-gdb-11.2-4.el9.x86_64.

      This doesn't block me, I just encountered it when I wanted to look at some disassembly.

      Backtrace:

      #0 0x00007f8e4e8a156c in __pthread_kill_implementation ()
      from /lib64/libc.so.6
      #1 0x00007f8e4e854d26 in raise () from /lib64/libc.so.6
      #2 0x00007f8e4e8287f3 in abort () from /lib64/libc.so.6
      #3 0x00005562feebfffd in dump_core () at ../../gdb/utils.c:204
      #4 0x00005562feec5b85 in internal_vproblem(internal_problem *, const char *, int, const char *, typedef __va_list_tag __va_list_tag *) (
      problem=0x5562ff4677a0 <internal_error_problem>, file=<optimized out>,
      line=<optimized out>, fmt=<optimized out>, ap=<optimized out>)
      at ../../gdb/utils.c:414
      #5 0x00005562feec5d51 in internal_verror (file=<optimized out>,
      line=<optimized out>, fmt=<optimized out>, ap=ap@entry=0x7ffd434044c0)
      at ../../gdb/utils.c:439
      #6 0x00005562ff02f0d5 in internal_error (
      file=file@entry=0x5562ff06da7e "../../gdb/gdbtypes.h",
      line=line@entry=527, fmt=<optimized out>) at ../../gdbsupport/errors.cc:55
      #7 0x00005562fec28646 in dynamic_prop::const_val (this=<optimized out>)
      at ../../gdb/gdbtypes.h:527
      #8 0x00005562fec28c0e in dynamic_prop::const_val (this=<optimized out>)
      at ../../gdb/gdbtypes.h:1044
      #9 f77_get_upperbound (type=<optimized out>) at ../../gdb/f-valprint.c:69
      #10 f77_get_upperbound (type=<optimized out>) at ../../gdb/f-valprint.c:57
      #11 0x00005562fec28520 in f_type_print_varspec_suffix (type=0x55630071fc90,
      stream=stream@entry=0x7ffd434046d0, passed_a_ptr=passed_a_ptr@entry=0,
      arrayprint_recurse_level=2, arrayprint_recurse_level@entry=1,
      print_rank_only=<optimized out>, demangled_args=<optimized out>, show=0)
      at ../../gdb/f-typeprint.c:230
      #12 0x00005562fec2840a in f_type_print_varspec_suffix (demangled_args=0,
      print_rank_only=<optimized out>, arrayprint_recurse_level=1,
      passed_a_ptr=0, show=0, stream=0x7ffd434046d0, type=<optimized out>)
      at ../../gdb/f-typeprint.c:181
      #13 f_type_print_varspec_suffix (type=0x55630071fd30,
      stream=stream@entry=0x7ffd434046d0, passed_a_ptr=passed_a_ptr@entry=0,
      arrayprint_recurse_level=1, arrayprint_recurse_level@entry=0,
      print_rank_only=<optimized out>, print_rank_only@entry=false,
      demangled_args=<optimized out>, show=-1) at ../../gdb/f-typeprint.c:211
      #14 0x00005562fec280e6 in f_type_print_varspec_suffix (
      demangled_args=<optimized out>, print_rank_only=false,
      arrayprint_recurse_level=0, passed_a_ptr=0, show=-1,
      stream=0x7ffd434046d0, type=<optimized out>) at ../../gdb/f-typeprint.c:100
      #15 0x00005562fec2834b in f_type_print_varspec_suffix (type=0x5563014175b0,
      stream=0x7ffd434046d0, passed_a_ptr=<optimized out>,
      arrayprint_recurse_level=<optimized out>, print_rank_only=<optimized out>,
      demangled_args=<optimized out>, show=<optimized out>)
      at ../../gdb/f-typeprint.c:276
      #16 0x00005562feeacf21 in type_print (type=<optimized out>,
      varstring=<optimized out>, stream=stream@entry=0x7ffd434046d0,
      show=show@entry=0) at ../../gdb/typeprint.c:382
      #17 0x00005562fee4570f in symbol_to_info_string[abi:cxx11](symbol*, int, search_domain) (sym=0x55630071fdf0, block=<optimized out>, kind=FUNCTIONS_DOMAIN)
      at ../../gdb/symtab.c:4859
      #18 0x00005562fee45a65 in print_symbol_info (kind=FUNCTIONS_DOMAIN,
      sym=0x55630071fdf0, block=0, last=<optimized out>)
      at ../../gdb/symtab.c:4908
      #19 0x00005562fee46694 in symtab_symbol_info (quiet=false,
      exclude_minsyms=<optimized out>, regexp=<optimized out>,
      kind=FUNCTIONS_DOMAIN, t_regexp=<optimized out>, from_tty=<optimized out>)
      at ../../gdb/symtab.c:5004
      #20 0x00005562fee4698e in info_functions_command (args=<optimized out>,
      from_tty=<optimized out>) at ../../gdb/symtab.c:5112

            blarsen@redhat.com Guinevere Larsen
            fweimer@redhat.com Florian Weimer
            Guinevere Larsen Guinevere Larsen
            Michal Kolar Michal Kolar
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: