From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18415 invoked by alias); 8 May 2015 09:49:55 -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 18386 invoked by uid 48); 8 May 2015 09:49:54 -0000 From: "raghu.prabhu13 at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/18368] gdb with nsenter attaches to wrong process Date: Fri, 08 May 2015 09:49: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: raghu.prabhu13 at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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/msg00246.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=18368 --- Comment #6 from Raghavendra --- For unprivileged container (ie. without --privileged or --cap-add sys_ptrace): I see gdb -p 1 GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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 "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: . Attaching to process 1 ptrace: Operation not permitted. (gdb) bt No stack. (gdb) ========= >I'm not sure. The way libthread_db works I think everything should be >consistent, but I'm still experimenting. Does this require just the gdb to be installed or any other binutil components updated as well? Regarding >You do need to have GDB or gdbserver inside the container if you're going to >use nsenter. (If just gdbserver, start GDB with no options and do "target >remote | nsenter ... gdbserver - --attach 1") I haven't been able to get this working since it required gdbserver inside container. Can you show how this is done? -- You are receiving this mail because: You are on the CC list for the bug.