[Bugme-new] [Bug 17281] New: [lxc] gdb cannot debug bash properly in an LXC container
bugzilla-daemon at bugzilla.kernel.org
bugzilla-daemon at bugzilla.kernel.org
Sun Aug 29 02:35:51 PDT 2010
https://bugzilla.kernel.org/show_bug.cgi?id=17281
Summary: [lxc] gdb cannot debug bash properly in an LXC
container
Product: Process Management
Version: 2.5
Kernel Version: 2.6.33.7
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: Other
AssignedTo: process_other at kernel-bugs.osdl.org
ReportedBy: greenrd at greenrd.org
CC: lizf at cn.fujitsu.com, menage at google.com
Regression: Yes
(I couldn't find a kernel bugzilla component for LXC bugs, so I picked
something that sounded vaguely related.)
gdb is unable to debug bash once the command "ls" is typed in, but only inside
an LXC container (outside the container, it works). The error message from gdb
is:
Couldn't write debug register: No such process
Steps to Reproduce:
1. Set up an LXC chroot containing gdb and bash (on Fedora Linux, this can be
done fairly easily by installing and configuring mach and then using "mach yum
install gdb bash". mach also supports apt-get.) I also installed the separate
-debuginfo packages inside the container, but I don't think this matters.
2. I use the libvirt command-line tools to actually start the LXC container,
because I couldn't manage to get the LXC userspace tools to create a container.
Define the LXC chroot in virsh, e.g. virsh define foo.xml for some libvirt
configuration file foo.xml
3. virsh --connect lxc:/// start foo && virsh --connect lxc:/// console foo
4. export PATH=/usr/bin:$PATH
5. gdb /bin/bash
6. Type 'r' to run bash
7. Inside that bash process, type 'ls' and hit the enter key
At this point it says
Couldn't write debug register: No such process
FYI, I get a slightly different error message if I use the Fedora kernel
instead of the mainline kernel:
Waiting for child: no such process
Regarding the regression flag: I am *guessing* this is a regression, because
the very similar bug that I just mentioned in the Fedora kernel tree is
definitely a regression. I plan to test older and newer mainline kernel
versions at a later date.
--
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Bugme-new
mailing list