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 threads/20743] New: can't usefully "continue" due to "ptrace: No such process" after gdb switches thread (gdb7.11.1 on FreeBSD 11)


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

            Bug ID: 20743
           Summary: can't usefully "continue" due to "ptrace: No such
                    process" after gdb switches thread (gdb7.11.1 on
                    FreeBSD 11)
           Product: gdb
           Version: 7.11.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: threads
          Assignee: unassigned at sourceware dot org
          Reporter: misc-sourceware at talk2dom dot com
  Target Milestone: ---

FreeBSD kitten 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep 29
01:43:23 UTC 2016     root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC
 amd64

GNU gdb (GDB) 7.11.1 [GDB v7.11.1 for FreeBSD]


Attach to a running, multi-threaded process using --pid 
Set breakpoint
Continue (expecting process to run until breakpoint hit)
For some reason gdb stops with "ptrace: no such process"
Continue (again)
Repeat


(gdb) inf thr
  Id   Target Id         Frame 
* 1    LWP 100638 of process 22406 0x000000080326e0da in _poll () from
/lib/libc.so.7
(gdb) b blockchain_monitor.cpp:187
Breakpoint 1 at 0x4069df: file blockchain_monitor.cpp, line 187.
(gdb) c
Continuing.
[New LWP 101613 of process 22406]
[LWP 101613 of process 22406 exited]
[New LWP 101614 of process 22406]
[Switching to LWP 101614 of process 22406]
0x0000000802640a10 in ?? () from /lib/libthr.so.3
ptrace: No such process.
(gdb) inf thr
  Id   Target Id         Frame 
  1    LWP 100638 of process 22406 0x000000080326e0da in _poll () from
/lib/libc.so.7
* 3    LWP 101614 of process 22406 0x0000000802640a10 in ?? () from
/lib/libthr.so.3
(gdb) bt
#0  0x0000000802640a10 in ?? () from /lib/libthr.so.3
#1  0x00007fffdf9fc000 in ?? ()
Backtrace stopped: Cannot access memory at address 0x7fffdfbfc000
(gdb) c
Continuing.
[LWP 101614 of process 22406 exited]
[New LWP 101028 of process 22406]
[Switching to LWP 101028 of process 22406]
0x0000000802640a10 in ?? () from /lib/libthr.so.3
ptrace: No such process.
(gdb) c
Continuing.
[LWP 101028 of process 22406 exited]
[New LWP 100112 of process 22406]
[Switching to LWP 100112 of process 22406]
0x0000000802640a10 in ?? () from /lib/libthr.so.3
ptrace: No such process.
(gdb) 

[...and so on...]


Here's a more detailed continue using the same process as above:


(gdb) set debug fbsd-lwp on
(gdb) c
Continuing.
FLWP: fbsd_resume for ptid (-1, 0, 0)
FLWP: deleting thread for LWP 100482
[LWP 100482 of process 22406 exited]
FLWP: adding thread for LWP 100841
[New LWP 100841 of process 22406]
FLWP: fbsd_resume for ptid (-1, 0, 0)
[Switching to LWP 100841 of process 22406]
0x0000000802640a10 in ?? () from /lib/libthr.so.3
ptrace: No such process.
(gdb) set debug infrun 1
(gdb) c
Continuing.
infrun: clear_proceed_status_thread (LWP 100638 of process 22406)
infrun: clear_proceed_status_thread (LWP 100841 of process 22406)
infrun: proceed (addr=0xffffffffffffffff, signal=GDB_SIGNAL_DEFAULT)
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread
[LWP 100841 of process 22406] at 0x802640a10
FLWP: fbsd_resume for ptid (-1, 0, 0)
infrun: prepare_to_wait
FLWP: deleting thread for LWP 100841
[LWP 100841 of process 22406 exited]
FLWP: adding thread for LWP 100499
[New LWP 100499 of process 22406]
infrun: target_wait (-1.0.0, status) =
infrun:   22406.100499.0 [LWP 100499 of process 22406],
infrun:   status->kind = spurious
infrun: TARGET_WAITKIND_SPURIOUS
infrun: Switching context from LWP 100841 of process 22406 to LWP 100499 of
process 22406
infrun: resume (step=0, signal=GDB_SIGNAL_0), trap_expected=0, current thread
[LWP 100499 of process 22406] at 0x802640a10
FLWP: fbsd_resume for ptid (-1, 0, 0)
[Switching to LWP 100499 of process 22406]
0x0000000802640a10 in ?? () from /lib/libthr.so.3
ptrace: No such process.
(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]