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)
Thu, Dec 5, 11:09 AM
Unknown Object (File)
Nov 21 2024, 3:23 PM
Unknown Object (File)
Nov 21 2024, 3:23 PM
Unknown Object (File)
Nov 21 2024, 3:23 PM
Unknown Object (File)
Nov 21 2024, 3:03 PM
Unknown Object (File)
Nov 8 2024, 3:07 AM
Unknown Object (File)
Nov 4 2024, 10:17 PM
Unknown Object (File)
Oct 28 2024, 4:51 AM
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?