[llvm] [Support] Fix Process::PreventCoreFiles() when coredumps are piped (PR #83703)

Alexander Richardson via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 22:54:49 PST 2024


arichardson wrote:

Further debugging shows that the systemd-coredumpd config file has a hardcoded RLIMIT_INFINITY value:
```
❯ sysctl kernel.core_pattern                            
kernel.core_pattern = |/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h
```

After changing the value to use %c as it should be in the default config file (https://github.com/systemd/systemd/blob/main/sysctl.d/50-coredump.conf.in) `coredumpctl list -r` now lists the failed tests, but no longer blocks streaming the gigabytes of data trying to generate a coredump.
```
TIME                           PID    UID   GID SIG     COREFILE  EXE                  SIZE
Mon 2024-03-04 22:45:51 PST 393894 928191 89939 SIGABRT none      .../stack-uas.c.tmp  -
Mon 2024-03-04 22:45:10 PST 393458 928191 89939 SIGABRT none      .../stack-uas.c.tmp  -
```

I will file a bug with the people configuring the system, so that it gets fixed for all my coworkers but even though this is a misconfigured system, I think setting the value to 1 is still beneficial since these are expected coredumps that don't need to show up coredumpctl.

https://github.com/llvm/llvm-project/pull/83703


More information about the llvm-commits mailing list