From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107462 invoked by alias); 5 May 2015 09:18:13 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 107421 invoked by uid 48); 5 May 2015 09:18:12 -0000 From: "gbenson at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/18368] gdb with nsenter attaches to wrong process Date: Tue, 05 May 2015 09:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.9 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gbenson at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q2/txt/msg00219.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18368 --- Comment #1 from Gary Benson --- You're using nsenter to enter the PID namespace but you're not entering the corresponding mount namespace; GDB is looking in the wrong /proc. Try adding "-m" to your nsenter options. Also, I can't imagine how using the docker daemon as a reference can work. As I understand it the docker daemon does not switch namespaces, so "nsenter -t $DOCKERPID" should just stay in whatever namespaces you were already in. If you're building from source, try this branch: git clone -b namespaces https://github.com/gbenson/binutils-gdb.git With that GDB you should be able to attach with "gdb -p $HOSTPID" (where $HOSTPID is 29120 in your example). Let me know if/how you get this working please. -- You are receiving this mail because: You are on the CC list for the bug.