Skip to content

Commit aae3c9a

Browse files
Krayushkin Konstantinpoettering
authored andcommitted
coredump: fixed bug - some coredump temp files could be lost
If the machine was suddenly shutted down (hard reboot for example) while processing core dump, temp files created manually (not with a O_TEMPFILE flag) stay in the system. After reboot systemd-coredump treat them as usual files, so they wouldn't be rotated and shall pollute the filesystem. Solution is to simply add those temp files to systemd-tmpfiles configs.
1 parent 79e6893 commit aae3c9a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tmpfiles.d/systemd-tmp.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ X /var/tmp/systemd-private-%b-*/tmp
1616
# Remove top-level private temporary directories on each boot
1717
R! /tmp/systemd-private-*
1818
R! /var/tmp/systemd-private-*
19+
20+
# Handle lost systemd-coredump temp files. They could be lost on old filesystems,
21+
# for example, after hard reboot.
22+
x /var/lib/systemd/coredump/.#core*.%b*
23+
r! /var/lib/systemd/coredump/.#*

0 commit comments

Comments
 (0)