Bug 1730938 - Run the command with gdb option is not working: /usr/lib/snapd/snap-exec: No such file or directory.
Summary: Run the command with gdb option is not working: /usr/lib/snapd/snap-exec: No ...
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: snapd
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zygmunt Krynicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-17 23:35 UTC by Eugene Kanter
Modified: 2019-07-17 23:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Eugene Kanter 2019-07-17 23:35:33 UTC
Description of problem:
Unable to debug snap packaged application as instructed in its manual page

Version-Release number of selected component (if applicable):
snapd-2.39.2-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. sudo snap install anyapp
2. snap run --gdb anyapp

Actual results:

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-114.el7
Copyright (C) 2013 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/>...
Reading symbols from /usr/libexec/snapd/snap-confine...Reading symbols from /usr/libexec/snapd/snap-confine...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Starting program: /usr/libexec/snapd/snap-confine snap.anyapp.anyapp /usr/lib/snapd/snap-exec --command=gdb anyapp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Detaching after fork from child process 26555.
Detaching after fork from child process 26556.
process 26551 is executing new program: /usr/lib/snapd/snap-exec
/usr/lib/snapd/snap-exec: No such file or directory.
Catchpoint 1 (exec)
Continuing.
process 26551 is executing new program: /usr/lib/snapd/snap-gdb-shim
/usr/lib/snapd/snap-gdb-shim: No such file or directory.
Missing separate debuginfos, use: debuginfo-install snap-confine-2.39.2-1.el7.x86_64
(gdb)


Expected results, as seen on Fedora 29 for example:

GNU gdb (GDB) Fedora 8.2-7.fc29
Copyright (C) 2018 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/libexec/snapd/snap-confine...(no debugging symbols found)...done.
Starting program: /usr/libexec/snapd/snap-confine snap.anyapp.anyapp /usr/lib/snapd/snap-exec --command=gdb anyapp
warning: Loadable section ".note.gnu.property" outside of ELF segments
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
...
...
process 746 is executing new program: /usr/lib/snapd/snap-exec
Missing separate debuginfos, use: dnf debuginfo-install snap-confine-2.39.1-1.fc29.x86_64
Missing separate debuginfo for target:/usr/lib/snapd/snap-exec
...
...
process 746 is executing new program: /usr/lib/snapd/snap-gdb-shim
Missing separate debuginfo for target:/usr/lib/snapd/snap-gdb-shim
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/06/f4b175e50662f76d5d23b8a895c5fab1798827.debug
Missing separate debuginfo for target:/lib64/ld-linux-x86-64.so.2
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/c0/adbad6f9a33944f2b3567c078ec472a1dae98e.debug
Missing separate debuginfo for target:/lib/x86_64-linux-gnu/libc.so.6
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/1c/a54a6e0d76188105b12e49fe6b8019bf08803a.debug


Welcome to `snap run --gdb`.
You are right before your application is execed():
- set any options you may need
- use 'cont' to start



Thread 1 "snap-gdb-shim" received signal SIGTRAP, Trace/breakpoint trap.
0x00007fdf0e840428 in raise () from target:/lib/x86_64-linux-gnu/libc.so.6
Catchpoint 1 (exec)
Continuing.
process 746 is executing new program: /bin/dash
Missing separate debuginfo for target:/lib64/ld-linux-x86-64.so.2
Try: dnf --enablerepo='*debug*' install /usr/lib/debug/.build-id/c0/adbad6f9a33944f2b3567c078ec472a1dae98e.debug

Thread 1 "command-anyapp" hit Catchpoint 1 (exec'd /bin/dash), 0x00007fbb2c12ac30 in ?? ()
   from target:/lib64/ld-linux-x86-64.so.2
(gdb)


Note You need to log in before you can comment on or make changes to this bug.