Bug 1318049 - 7.11 regression: non-stop gdb -p <process from a container>: internal error
Summary: 7.11 regression: non-stop gdb -p <process from a container>: internal error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gdb
Version: DTS 4.1 RHEL 7
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: beta1
: 4.1
Assignee: Pedro Alves
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-15 21:09 UTC by Jan Kratochvil
Modified: 2016-05-31 08:40 UTC (History)
4 users (show)

Fixed In Version: devtoolset-4-gdb-7.11-65.el7,devtoolset-4-gdb-7.11-65.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-31 08:40:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
threadit.c (353 bytes, text/plain)
2016-03-15 21:09 UTC, Jan Kratochvil
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1144 0 normal SHIPPED_LIVE devtoolset-4-gdb bug fix and enhancement update 2016-05-31 12:35:10 UTC
Sourceware 19828 0 None None None 2016-03-15 21:09:50 UTC

Description Jan Kratochvil 2016-03-15 21:09:51 UTC
Created attachment 1136764 [details]
threadit.c

Description of problem:
Attaching to a multithreaded process PID which is running inside a container will crash GDB.  It is not correct to attach to a containerized PID this way - one should use gdbserver instead due to a missing GDB feature.  Still it can happen by an accident and GDB should not crash.

Version-Release number of selected component (if applicable):
devtoolset-4-gdb-7.11-57.el7.x86_64

How reproducible:
Always.

Steps to Reproduce:
# docker run -ti -v /root:/root docker.io/centos bash
Inside docker:
# /root/threadit
Outside docker:
# gdb -p `pidof threadit`
(gdb) q

Actual results:
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) _

Expected results:
A debugging session is active.
        Inferior 1 [process 7483] will be detached.
Quit anyway? (y or n) y
Detaching from program: target:/root/redhat/threadit, process 7483

Additional info:
Bug #1: The internal error should not happen.
Bug #2: One cannot entry anything ('y' or 'n'), GDB does not respond.
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.

Comment 6 errata-xmlrpc 2016-05-31 08:40:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1144


Note You need to log in before you can comment on or make changes to this bug.