systemd-coredump - Invalid argument

I'm trying to force a core dump using systemd-coredump, however, when I check my journal I see the following error:

[email protected]: Failed at step NETWORK spawning /lib/systemd/systemd-coredump: Invalid argument

and coredumpctl reports no cores.

My core_pattern is:

|/lib/systemd/systemd-coredump %P %u %g %s %t %c %e

/lib/systemd/systemd-coredump does exist and is executable. I have noticed that in the /etc/systemd/coredump.conf, everything is commented out.


...which strikes me as odd...

Is there a way of "previewing" the arguments from core_pattern having been expanded that are fed into systemd-coredump - that way I could see if there is anything odd going on there... Otherwise, any idea what the problem could be?


I've also tried setting the core_pattern to point to a file like

bash -c 'echo "/home/root/core.%e.%p" > /proc/sys/kernel/core_pattern'


ulimit -c unlimited

But that doesn't work either - the core file doesn't get created.

Answers 1

  • I managed to get a core out of this (I think!) with a workaround. This still doesn't answer the question but at least gets me over this hump.

    I created my own script:

    echo [email protected] > /home/root/arguments.txt
    if [ -p /dev/stdin ]; then
        echo "Data was piped to this script!" >> /home/root/arguments.txt
        cat > /home/root/core.bin 
        echo "No data received" >> /home/root/arguments.txt

    And set the core_pattern to pipe through this script rather than systemd-coredump

    This allows me to both see the arguments passed into the script (so it does answer that part of the question!) contained in arguments.txt and the core itself is written to core.bin

    (At least I think it's the core - it's not giving me a huge amount of info but I'm a bit of a newbie at gdb so that could be the reason.)

Related Questions