This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug corefiles/21395] New: thread.c:1010 internal-error: int is_executing(ptid_t): Assertion `tp' failed.


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

            Bug ID: 21395
           Summary: thread.c:1010 internal-error: int
                    is_executing(ptid_t): Assertion `tp' failed.
           Product: gdb
           Version: 7.12.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: corefiles
          Assignee: unassigned at sourceware dot org
          Reporter: raajeshdasari at gmail dot com
  Target Milestone: ---

When i tried to attach and detach a multi threaded application on mips64 based
environment, I am noticing gdb crash.

when trying to attach "Couldn't write debug register: No such process." erros
is seen and also after attaching the process, corrupt stack error is noticed in
'bt' command output.

(gdb) bt
#0  0xe7a2046c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

when trying to detach gdb crash is observed.

gdb -p 13124
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mips64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 13124
Couldn't write debug register: No such process.
(gdb) quit
A debugging session is active.

        Inferior 1 [process 13124] will be detached.

Quit anyway? (y or n) y
/root/distro/work/shared/gdb-7.12.1/gdb/thread.c:1010: internal-error: int
is_executing(ptid_t): Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

This is a bug, please report it.  For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.

/root/distro/work/shared/gdb-7.12.1/gdb/thread.c:1010: internal-error: int
is_executing(ptid_t): Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
Aborted (core dumped)

[1]+  Stopped                 ./test

file /usr/bin/gdb
/usr/bin/gdb: ELF 64-bit MSB executable, MIPS, MIPS64 version 1 (SYSV),
dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped

here is the backtrace of the core file.

GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mips64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/gdb...done.
[New LWP 13272]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `gdb -p 13124'.
Program terminated with signal SIGABRT, Aborted.
#0  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:58
58      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:58
#1  0x000000ffefdadb2c in __GI_abort () at abort.c:89
#2  0x0000000120301e68 in dump_core () at
/root/distro/work/shared/gdb-7.12.1/gdb/utils.c:561
#3  0x0000000120304ee8 in internal_vproblem (problem=problem@entry=0x1207a3680
<internal_error_problem>, file=<optimized out>, line=<optimized out>, 
    fmt=<optimized out>, ap=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/utils.c:772
#4  0x0000000120304fc0 in internal_verror (file=<optimized out>,
line=<optimized out>, fmt=<optimized out>, ap=<optimized out>)
    at /root/distro/work/shared/gdb-7.12.1/gdb/utils.c:798
#5  0x00000001203527c0 in internal_error (file=<optimized out>, line=<optimized
out>, fmt=<optimized out>)
    at /root/distro/work/shared/gdb-7.12.1/gdb/common/errors.c:55
#6  0x00000001201ebc50 in is_executing (ptid=...) at
/root/distro/work/shared/gdb-7.12.1/gdb/thread.c:1010
#7  0x0000000120097010 in get_detach_signal (lp=lp@entry=0x120894650) at
/root/distro/work/shared/gdb-7.12.1/gdb/linux-nat.c:1334
#8  0x000000012009847c in detach_one_lwp (lp=lp@entry=0x120894650,
signo_p=signo_p@entry=0x0) at
/root/distro/work/shared/gdb-7.12.1/gdb/linux-nat.c:1420
#9  0x0000000120098640 in detach_callback (lp=lp@entry=0x120894650,
data=data@entry=0x0) at
/root/distro/work/shared/gdb-7.12.1/gdb/linux-nat.c:1489
#10 0x000000012009b590 in iterate_over_lwps (filter=...,
callback=callback@entry=0x1200985d8 <detach_callback(lwp_info*, void*)>,
data=data@entry=0x0)
    at /root/distro/work/shared/gdb-7.12.1/gdb/linux-nat.c:984
#11 0x000000012009bbfc in linux_nat_detach (ops=0x120801430, args=0x0,
from_tty=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/linux-nat.c:1511
#12 0x00000001202fe138 in kill_or_detach (inf=inf@entry=0x120884040,
args=args@entry=0xffffe3ebb0) at
/root/distro/work/shared/gdb-7.12.1/gdb/top.c:1540
#13 0x0000000120333134 in iterate_over_inferiors (callback=0x1202fe080
<kill_or_detach(inferior*, void*)>, data=0xffffe3ebb0)
    at /root/distro/work/shared/gdb-7.12.1/gdb/inferior.c:397
#14 0x00000001202ffda8 in quit_force (args=<optimized out>, from_tty=<optimized
out>) at /root/distro/work/shared/gdb-7.12.1/gdb/top.c:1655
#15 0x00000001200e61c0 in quit_command (args=0x0, from_tty=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/cli/cli-cmds.c:351
#16 0x00000001200e2ca4 in cmd_func (cmd=0x12087ade0, args=0x0,
from_tty=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/cli/cli-decode.c:1913
#17 0x00000001202feb30 in execute_command (p=<optimized out>,
from_tty=<optimized out>) at /root/distro/work/shared/gdb-7.12.1/gdb/top.c:674
#18 0x00000001201fe7d8 in command_line_handler (rl=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/event-top.c:822
#19 0x00000001201fd1f0 in gdb_rl_callback_handler (rl=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/event-top.c:213
#20 0x0000000120404478 in rl_callback_read_char () at
/root/distro/work/shared/gdb-7.12.1/readline/callback.c:220
#21 0x00000001201fd0a8 in gdb_rl_callback_read_char_wrapper_noexcept () at
/root/distro/work/shared/gdb-7.12.1/gdb/event-top.c:175
#22 0x00000001201fd160 in gdb_rl_callback_read_char_wrapper
(client_data=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/event-top.c:192
#23 0x00000001201fdb00 in stdin_event_handler (error=<optimized out>,
client_data=0x1207e60f0) at
/root/distro/work/shared/gdb-7.12.1/gdb/event-top.c:568
#24 0x00000001201fbb04 in gdb_wait_for_event (block=block@entry=1) at
/root/distro/work/shared/gdb-7.12.1/gdb/event-loop.c:859
#25 0x00000001201fc0b0 in gdb_do_one_event () at
/root/distro/work/shared/gdb-7.12.1/gdb/event-loop.c:347
#26 0x00000001201fc204 in start_event_loop () at
/root/distro/work/shared/gdb-7.12.1/gdb/event-loop.c:371
#27 0x00000001201f4048 in captured_command_loop (data=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/main.c:324
#28 0x00000001201ef47c in catch_errors (func=0x1201f3ff0
<captured_command_loop(void*)>, func_args=<optimized out>,
errstring=0x12056f900 "", mask=<optimized out>)
    at /root/distro/work/shared/gdb-7.12.1/gdb/exceptions.c:236
#29 0x00000001201f57ec in captured_main (data=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/main.c:1149
#30 gdb_main (args=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/main.c:1159
#31 0x0000000120069a5c in main (argc=<optimized out>, argv=<optimized out>) at
/root/distro/work/shared/gdb-7.12.1/gdb/gdb.c:32
(gdb)

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]