Bug 817564
Summary: | Unable to debug programs with gdb | ||
---|---|---|---|
Product: | OKD | Reporter: | 0xe2.0x9a.0x9b |
Component: | Containers | Assignee: | Miciah Dashiel Butler Masters <mmasters> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 2.x | CC: | dmcphers, jhou, jinzhang, kraman, mpatel, ramr |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-11-06 18:49:43 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
0xe2.0x9a.0x9b
2012-04-30 14:02:24 UTC
Interesting request. We'll have to look at this in a few phases. 1) Is this something safe for us to allow? (Security related) 2) How do we actually do this? (Would we have to install debug packages for lots of stuff?) 3) Is this something we want to offer by default in the hosted product. We'll get started on 1 right now. 1) You are already allowing gdb to attach to a running process (gdb --pid N). Workaround would be to just set the SHELL variable before you invoke gdb. (export SHELL=/bin/bash) -- that should make it work. I put in a fix to master earlier last week -- SHELL is now set to bash instead of trap-user and this works now (you can run /bin/ls via gdb or run :!ls from within vi). Until the fix is released to prod, use the above mentioned workaround. Verified on devenv_2242 Steps: 1. Create a diy app and ssh into it 2. Check what SHELL it is using 3. gdb /bin/ls Result: [diy1-2242t.dev.rhcloud.com ~]\> echo $SHELL /bin/bash [diy1-2242t.dev.rhcloud.com ~]\> gdb /bin/ls GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 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: <http://www.gnu.org/software/gdb/bugs/>... .............. (gdb) run Starting program: /bin/ls [Thread debugging using libthread_db enabled] app-root diy-0.1 diy1 git Program exited normally. |