4

I am running docker in the docker container which can be found here. Additionally, I am running this from a new user profile which does not define any environment variables beyond those defined in the container itself. Given the docker configuration, the login scripts defined in a user's home directory will be called. As one can see, the solutions proposed on other threads have been implemented here, yet upon startup of the debugger, gdb immediately exits with the below:

During startup program exited with code 127.

I have attempted to add LD_LIBRARY_PATH to the debugger env vars which has no effect. The valgrind executable is configured properly. SHELL is set. The binary is 64 bit with the appropriate .so available.

For reference, the other similar threads discussing this topic:

If there is no solution is forthcoming, I will create configurations and example source to make the full setup (not just the environment) easily reproducible.

mcguip
  • 5,947
  • 5
  • 25
  • 32
  • 1
    Does it work if you run the container with `--cap-add sys_ptrace`? What is the base image of your container? The complete Dockerfile would help, I guess. – Eldar Abusalimov Mar 27 '18 at 09:59
  • 1
    Apologies, I thought since I have docker cloud autobuilding bitbucket the source would automatically get linked. I tried to link but couldn't figure out how to do so. The repo containing the docker file is [here](https://bitbucket.org/mcguipat/docker/src/master/). – mcguip Mar 27 '18 at 11:55
  • @EldarAbusalimov upvote cannot emphasize enough how much it helped me. How did you figure this out? – DsCpp May 06 '19 at 06:30
  • @DsCpp thanks, I'm glad it helped. I dunno, just came across this suggestion somewhere on the Internet maybe. And we also use Docker for running debugger tests for CLion itself. – Eldar Abusalimov May 06 '19 at 11:59

1 Answers1

6

Adding the --cap-add sys_ptrace option to the docker run command resolves the issue, as per the suggestion made by Eldar Abusalimov in the comments.

mcguip
  • 5,947
  • 5
  • 25
  • 32