Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging binaries within another sysroot on newer kernels #208

Open
oxr463 opened this issue Jan 8, 2020 · 0 comments
Open

Debugging binaries within another sysroot on newer kernels #208

oxr463 opened this issue Jan 8, 2020 · 0 comments

Comments

@oxr463
Copy link
Collaborator

oxr463 commented Jan 8, 2020

We used proot and gdb to debug binaries within another sysroot. While it worked with the master branch and with an older kernel it doesn't work with a more recent kernel and/or this patch.

You can reproduce it with this command:

$ proot -R / gdb /bin/true
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 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-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 /bin/true...(no debugging symbols found)...done.
(gdb) run
Starting program: /bin/true 
warning: linux_check_ptrace_features: failed to kill child

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000000000000003 in ?? ()
#2  0x00007fffffffcffb in ?? ()
#3  0x00007fffffffd005 in ?? ()
#4  0x00007fffffffd008 in ?? ()
#5  0x0000000000000000 in ?? ()

With an older kernel and the master branch it works fine and when the application throws a segmentation fault we can catch it in gdb.

With a more recent kernel and the master branch we have to use PROOT_NO_SECCOMP=1 but gdb freezes when the application terminates. With a more recent kernel and this PR we get a segmentation fault as documented above.

Originally posted by @walterbrebels in #130 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant