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

Configure systemd-coredump on all nodes #40

Open
LukeHandle opened this issue Jul 16, 2021 · 0 comments
Open

Configure systemd-coredump on all nodes #40

LukeHandle opened this issue Jul 16, 2021 · 0 comments

Comments

@LukeHandle
Copy link
Contributor

Currently the default config is that apport will hijack the core_pattern at start:

root@edge:~# cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c %d %P %E

We can instead make use of systemd-coredump which handily dumps the trace to jounald:

systemd-coredump[1879]: Process 486 (systemd-timesyn) of user 102 dumped core.

                                                           Stack trace of thread 486:
                                                           #0  0x00007f4d846995ce epoll_wait (libc.so.6 + 0x1225ce)
                                                           [...trimmed...]

The original files are still accessible as well:

root@edge:~# ls -al /var/lib/systemd/coredump
total 372
drwxr-xr-x  2 root root   4096 May 12 17:04 .
drwxr-xr-x 10 root root   4096 May 12 17:01 ..
-rw-r-----  1 root root 367543 May 12 17:04 core.systemd-timesyn.102.f033ea8366fd4952944bc4709b561e37.486.1620839062000000000000.lz4

root@edge:~# coredumpctl
TIME                            PID   UID   GID SIG COREFILE  EXE
Wed 2021-05-12 17:04:23 UTC     486   102   104  11 present   /usr/lib/systemd/systemd-timesyncd

root@edge:~# coredumpctl info 486
           PID: 486 (systemd-timesyn)
           UID: 102 (systemd-timesync)
           GID: 104 (systemd-timesync)
        Signal: 11 (SEGV)
     Timestamp: Wed 2021-05-12 17:04:22 UTC (1min 51s ago)
  Command Line: /lib/systemd/systemd-timesyncd
    Executable: /usr/lib/systemd/systemd-timesyncd
[...trimmed...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant