1

If a program crashes inside a Docker container and reports "core dumped", no core dump is actually created. Instead, there's just an entry in /var/log/apport.log saying sth. like host pid 21500 crashed in a container without apport support.

The container OS is Ubuntu 18.04.4 with apport 2.20.9-0ubuntu7.13 and the host OS is Ubuntu 19.10 with apport 2.20.11-0ubuntu8.6. Apport is enabled in both OS as described in the Ubuntu wiki.

1 Answer 1

1

It seems like apport relies on systemd in the container as well.

So either the container has to run systemd or some other software has to listen on /var/run/apport.socket. I'll use a patched apport for this purpose.

2
  • Hi there, could you go into detail how you used a patched apport?
    – swongu
    Apr 7, 2020 at 23:08
  • Sure: If LISTEN_FDS is in the environment, apport will listen on that socket and wait for a coredump; it relies on systemd managing the socket. All you have to do is change this code to create that socket yourself. Apport will only read one coredump at once and then exit, so you should wrap it in a script that starts it again and also makes sure the socket is deleted after each run. Apr 10, 2020 at 4:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .