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)
Mar 7 2024, 2:00 AM
Unknown Object (File)
Mar 7 2024, 2:00 AM
Unknown Object (File)
Mar 7 2024, 12:55 AM
Unknown Object (File)
Mar 7 2024, 12:00 AM
Unknown Object (File)
Feb 24 2024, 10:35 PM
Unknown Object (File)
Dec 20 2023, 6:51 AM
Unknown Object (File)
Dec 13 2023, 3:59 AM
Unknown Object (File)
Nov 14 2023, 8:55 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?