Bug 573210
Summary: | [utrace] gdb can't debug bash inside an LXC container | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Robin Green <greenrd> | ||||
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 14 | CC: | anton, dougsland, gansalmon, itamar, jonathan, keithlscott, kernel-maint, onestero, roland | ||||
Target Milestone: | --- | Keywords: | Regression | ||||
Target Release: | --- | ||||||
Hardware: | i686 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | kernel-2.6.35.14-96.fc14 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2011-09-06 23:58:46 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Robin Green
2010-03-13 12:41:33 UTC
Workaround: use an older kernel, e.g. kernel-PAE-2.6.31.12-174.2.22.fc12.i686 Correction: This bug essentially *does* still occur on Fedora 13 (with a minimal Fedora 13 installed inside the chroot). But unlike in Fedora 12, bash.exherbo starts apparently successfully, and the error message "Waiting for child: no such process" only appears when you try to run an external command such as /bin/ls inside of bash.exherbo. So the manifestation of the bug is slightly different. And it turns out this bug also occurs with Fedora 13's /bin/bash on Fedora 13, in the same way I stated in comment#2 - so you don't need to use another distro's bash binary to reproduce this. Does the bug happen if you use an upstream kernel instead of the fedora kernel? I would suspect the utrace patches as the cause if it doesn't happen on an unmodified kernel. With upstream kernel 2.6.33.7 (the closest released version available) I get a different error message from gdb: bash-4.1# ls Couldn't write debug register: No such process I've filed that bug upstream as https://bugzilla.kernel.org/show_bug.cgi?id=17281 I didn't add it to the upstream bug field of this bug because it's not necessarily the same issue. The upstream bug is now fixed in head, by http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=068e35eee9ef98eb4cab55181977e24995d273be and is also fixed in 2.6.35.6. Can this patch be applied to the Fedora kernel, please, to see if it fixes this bug as well? Issue still exists in F14 with kernel-PAE-2.6.35.6-39.fc14.i686 (note: I tested with the same F13 installation inside the chroot - I only upgraded the host, not the guest). If I am reading the RPM version correctly, the upstream patch should be in that version (unless it's overridden by some Fedora patch), so this looks like it's probably NOT the same bug as the upstream bug. (In reply to comment #4) > Does the bug happen if you use an upstream kernel instead of the fedora kernel? > I would suspect the utrace patches as the cause if it doesn't happen on an > unmodified kernel. Yup, I commented out the utrace patches and rebuilt kernel-PAE-2.6.35.11-82.fc14.i686, and this bug disappeared. Without those patches commented out, this bug occurs. sorry, -83, not -82. I get the same error (waiting for child: No child processes.) from a very simple pthreads example program, using 2.6.35.12-90.fc14.i686 -- This happens immediately after the call to pthread_create() Oleg, any thoughts on this? See comment #8. I am puzzled. And I don't know what exactly fails. OK, perhaps gdb tries to attach (or auto-attach) to the forked task. I don't think http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=068e35eee9ef98eb4cab55181977e24995d273be can make any difference. And yes, we have the problems with the pid_ns here, but utrace looks bug-compatible in this respect. I'll try to investigate when I reserve the testing machine. (In reply to comment #10) > I get the same error (waiting for child: No child processes.) from a very > simple pthreads example program, using 2.6.35.12-90.fc14.i686 -- This happens > immediately after the call to pthread_create() Aha, I didn't notice this message. So, yes, it seems that something is wrong with pids... May be. Any chance you can confirm that this doesn't happen without CONFIG_UTRACE or with upstream kernel? (In reply to comment #12) > > And yes, we have the problems with the pid_ns here, but utrace > looks bug-compatible in this respect. Ooh, it is not. Can't understand how I didn't notice this before. > I'll try to investigate > when I reserve the testing machine. unneeded. I'm pretty sure I understand the problem. [PATCH F-14] bz#573210: ptrace-utrace: fix PTRACE_GETEVENTMSG(pid) in LXC http://lists.fedoraproject.org/pipermail/kernel/2011-August/003340.html I've committed the patch from comment #15. This should be in the next F14 kernel build. kernel-2.6.35.14-96.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/kernel-2.6.35.14-96.fc14 Package kernel-2.6.35.14-96.fc14: * should fix your issue, * was pushed to the Fedora 14 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing kernel-2.6.35.14-96.fc14' as soon as you are able to, then reboot. Please go to the following url: https://admin.fedoraproject.org/updates/kernel-2.6.35.14-96.fc14 then log in and leave karma (feedback). kernel-2.6.35.14-96.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. |