Page MenuHomeFreeBSD

savecore(8) reporting when insufficient disk space
Needs ReviewPublic

Authored by farhan_farhan.codes on Mar 8 2022, 6:12 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 28, 4:51 AM
Unknown Object (File)
Sat, Oct 19, 12:13 AM
Unknown Object (File)
Tue, Oct 8, 7:53 AM
Unknown Object (File)
Sep 29 2024, 7:09 PM
Unknown Object (File)
Sep 22 2024, 6:12 PM
Unknown Object (File)
Sep 22 2024, 6:33 AM
Unknown Object (File)
Sep 7 2024, 8:32 PM
Unknown Object (File)
Sep 7 2024, 8:02 PM
Subscribers

Details

Summary

Spent 2-3 days trying to figure out why savecore(8) was not writing /var/crash dumps. It was due to insufficient disk space. However, this was not reported as the reason from savecore(8). This patch prints out an error message.

Test Plan

Fill up disk beyond what minfree requires, trigger a kernel panic and dump the core, observe error message from savecore.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I don't have an objection to changing the LOG_WARNING to LOG_ERR, but I'm confused about what this actually changes. I looked at man 3 syslog and vsyslog1() to see if we printed to stderr by default for LOG_ERR but I'm not seeing that. So, what does this actually do?

I don't have an objection to changing the LOG_WARNING to LOG_ERR, but I'm confused about what this actually changes. I looked at man 3 syslog and vsyslog1() to see if we printed to stderr by default for LOG_ERR but I'm not seeing that. So, what does this actually do?

I am willing to acknowledge that this is a mistake on my end, but running savecore with verbosity did not seem to print out the warning when disk space was full.
The objective is to print out a warning/error message. If this can be done through another means then my commit is a moot point.

Were you uncompressing a compressed kernel dump?