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 gdb/19828] New: 7.11 regression: non-stop gdb -p <process from a container>: internal error


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

            Bug ID: 19828
           Summary: 7.11 regression: non-stop gdb -p <process from a
                    container>: internal error
           Product: gdb
           Version: 7.11
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: jan.kratochvil at redhat dot com
  Target Milestone: ---

Created attachment 9097
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9097&action=edit
threadit.c

398e081380a204e3b9fb4eb4da069ccf471f930e is the first bad commit
commit 398e081380a204e3b9fb4eb4da069ccf471f930e
Author: Pedro Alves <palves@redhat.com>
Date:   Wed Sep 30 19:23:39 2015 +0100
    x86/Linux: reenable all-stop on top of non-stop

# docker run -ti -v /root:/root docker.io/centos bash
Inside docker:
# /root/threadit

Outside docker:
# gdb -p `pidof threadit`
warning: Expected absolute pathname for libpthread in the inferior, but got
target:/lib64/libpthread.so.0.
warning: Unable to find libthread_db matching inferior's thread library, thread
debugging will not be available.
Reading symbols from target:/lib64/libc.so.6...(no debugging symbols
found)...done.
Reading symbols from target:/lib64/ld-linux-x86-64.so.2...(no debugging symbols
found)...done.
warning: Target and debugger are in different PID namespaces; thread lists and
other data are likely unreliable
warning: Expected absolute pathname for libpthread in the inferior, but got
target:/lib64/libpthread.so.0.
warning: Unable to find libthread_db matching inferior's thread library, thread
debugging will not be available.
0x00007fdc1026cef7 in pthread_join () from target:/lib64/libpthread.so.0
(gdb) q
A debugging session is active.
        Inferior 1 [process 7483] will be detached.
Quit anyway? (y or n) y
thread.c:980: internal-error: is_executing: Assertion `tp' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) _

Bug #1: The internal error should not happen.
Bug #2: One cannot entry anything ('y' or 'n'), GDB does not respond.

I am aware this is not a correct way to attach to containerized multi-threaded
processes but it can happen by a mistake.

It is not reproducible with non-threaded process.

Attaching a sample multi-threaded process I used for reproducibility.
I guess any multithreaded process would suffice.

-- 
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]