public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/25939] New: [10 regression] run fails with ICE on Solaris
@ 2020-05-07 11:11 ro at gcc dot gnu.org
  2020-05-07 11:11 ` [Bug gdb/25939] " ro at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: ro at gcc dot gnu.org @ 2020-05-07 11:11 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 25939
           Summary: [10 regression] run fails with ICE on Solaris
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: ro at gcc dot gnu.org
                CC: palves at sourceware dot org
  Target Milestone: ---
              Host: *-*-solaris2.11
            Target: *-*-solaris2.11
             Build: *-*-solaris2.11

After quite some time, I just built gdb master on Solaris 11.4 (both SPARC and
x86)
and found that, while it still compiles thanks to the buildbot, every single
execution test FAILs with an assertion failure:

$ ./gdb -D ./data-directory ./hello
GNU gdb (GDB) 10.0.50.20200106-git
[...]
Reading symbols from ./hello...
(gdb) run
Starting program: /vol/obj/gnu/gdb/gdb/reghunt/no-resync/122448/gdb/hello 
/vol/src/gnu/gdb/hg/master/reghunt/gdb/thread.c:336: internal-error:
thread_info::thread_info(inferior*, ptid_t): Assertion `inf_ != NULL' failed.

Looing at the changes to procfs.c within the last half year, I came across the
Multi-target patch as a likely culprit.  Indeed, the revision before it tested
ok (well, just as bad as always), while the multi-target one showed the problem
above, which renders gdb useless.

Since I know nothing about this code, I'd be greatful for suggestions where to
look.  A very first attempt found the following (debugging with gdb 9.1):

(top-gdb) run -D data-directory hello
Starting program: /vol/obj/gnu/gdb/gdb/reghunt/no-resync/122448/gdb/gdb -D
data-directory hello
[...]
GNU gdb (GDB) 10.0.50.20200106-git
[...]
Reading symbols from hello...
(gdb) run
Starting program: /vol/obj/gnu/gdb/gdb/reghunt/no-resync/122448/gdb/hello 
[New Thread 2        ]
[...]
[New Thread 25        ]
[Switching to Thread 1 (LWP 1)]

Thread 2 hit Breakpoint 1, internal_error (During symbol reading: incomplete
CFI data; unspecified registers (e.g., rax) at 0xc34524
file=file@entry=0x966150 "/vol/src/gnu/gdb/hg/master/reghunt/gdb/thread.c",
line=line@entry=336, fmt=0x9ddb94 "%s: Assertion `%s' failed.") at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/gdbsupport/errors.c:51
51      {
(top-gdb) where
#0  internal_error (
    file=file@entry=0x966150 "/vol/src/gnu/gdb/hg/master/reghunt/gdb/thread.c",
line=line@entry=336, fmt=0x9ddb94 "%s: Assertion `%s' failed.")
    at /vol/src/gnu/gdb/hg/master/reghunt/gdb/gdbsupport/errors.c:51
#1  0x0000000000ef81f4 in thread_info::thread_info (this=0x1212020, 
    inf_=<optimized out>, ptid_=...)
    at /vol/src/gnu/gdb/hg/master/reghunt/gdb/thread.c:344
#2  0x0000000000ef82cd in new_thread (inf=inf@entry=0x0, ptid=...)
    at /vol/src/gnu/gdb/hg/master/reghunt/gdb/thread.c:239
#3  0x0000000000efac3c in add_thread_silent (
    targ=targ@entry=0x11b0940 <the_procfs_target>, ptid=...)
    at /vol/src/gnu/gdb/hg/master/reghunt/gdb/thread.c:304
#4  0x0000000000d90692 in procfs_target::create_inferior (
    this=0x11b0940 <the_procfs_target>, 
    exec_file=0x13dbef0
"/vol/obj/gnu/gdb/gdb/reghunt/no-resync/122448/gdb/hello", allargs="",
env=0x13c48f0, from_tty=<optimized out>)
    at /vol/src/gnu/gdb/hg/master/reghunt/gdb/gdbsupport/ptid.h:47
#5  0x0000000000c84e64 in run_command_1 (args=<optimized out>, from_tty=1, 
    run_how=run_how@entry=RUN_NORMAL)
    at /vol/gcc-9/include/c++/9.1.0/bits/basic_string.h:263
#6  0x0000000000c85007 in run_command (args=<optimized out>, 
    from_tty=<optimized out>)
    at /vol/src/gnu/gdb/hg/master/reghunt/gdb/infcmd.c:687
#7  0x0000000000b006c7 in do_const_cfunc (c=<optimized out>, args=<optimized
out>, from_tty=<optimized out>) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/cli/cli-decode.c:107
#8  0x0000000000b02839 in cmd_func (During symbol reading: block at 0xa22919
out of order
cmd=cmd@entry=0x1338a30, args=args@entry=0x0, from_tty=from_tty@entry=1) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/cli/cli-decode.c:1952
#9  0x0000000000f07212 in execute_command (p=<optimized out>, p@entry=0x120b320
"", from_tty=1) at /vol/src/gnu/gdb/hg/master/reghunt/gdb/top.c:653
#10 0x0000000000c00bf2 in command_handler (command=0x120b320 "") at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/event-top.c:587
#11 0x0000000000c01df7 in command_line_handler (rl=...) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/event-top.c:772
#12 0x0000000000c0172c in gdb_rl_callback_handler (rl=0x1211c80 "run") at
/vol/gcc-9/include/c++/9.1.0/bits/unique_ptr.h:153
#13 0x0000000000fccba2 in rl_callback_read_char () at
/vol/src/gnu/gdb/hg/master/reghunt/readline/readline/callback.c:281
#14 0x0000000000c012ad in gdb_rl_callback_read_char_wrapper_noexcept () at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/event-top.c:176
#15 gdb_rl_callback_read_char_wrapper (client_data=<optimized out>) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/event-top.c:193
#16 0x0000000000c004e5 in stdin_event_handler (error=<optimized out>,
client_data=0x12109b0) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/event-top.c:515
#17 0x0000000000bff700 in handle_file_event (file_ptr=0x13f6fe0,
ready_mask=<optimized out>) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/event-loop.c:731
#18 0x0000000000bff9ba in gdb_wait_for_event (block=block@entry=1) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/event-loop.c:857
#19 0x0000000000bffd1e in gdb_do_one_event () at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/event-loop.c:346
#20 0x0000000000c003cd in start_event_loop () at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/event-loop.c:370
#21 0x0000000000ce5fff in captured_command_loop () at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/main.c:360
#22 0x0000000000ce8ec9 in captured_main (data=0x7fffbfffecc0) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/main.c:1203
#23 gdb_main (args=args@entry=0x7fffbfffecf0) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/main.c:1218
#24 0x0000000000a1ca59 in main (argc=<optimized out>, argv=<optimized out>) at
/vol/src/gnu/gdb/hg/master/reghunt/gdb/gdb.c:32

One thing immediately sticks out as fishy here: when starting the inferior
(hello)
24 threads are created.  For one, this didn't happen before and the test
program
doesn't create any threads by itself.  24 happens to be the number of cores on
the test system, btw.

I turned out that debugging this is useful with an optimized gdb binary, so
will
rebuild with -g3 -O0 next.

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

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

end of thread, other threads:[~2020-06-22 18:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 11:11 [Bug gdb/25939] New: [10 regression] run fails with ICE on Solaris ro at gcc dot gnu.org
2020-05-07 11:11 ` [Bug gdb/25939] " ro at gcc dot gnu.org
2020-05-18 15:57 ` cvs-commit at gcc dot gnu.org
2020-05-19  8:04 ` cvs-commit at gcc dot gnu.org
2020-06-14  1:44 ` brobecker at gnat dot com
2020-06-14 15:12 ` ro at CeBiTec dot Uni-Bielefeld.DE
2020-06-21 16:34 ` cvs-commit at gcc dot gnu.org
2020-06-22 10:18 ` cvs-commit at gcc dot gnu.org
2020-06-22 10:20 ` palves at redhat dot com
2020-06-22 18:19 ` brobecker at gnat dot com

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).