Created attachment 401605 [details] patch to improve error messages related to low disk space $ df -k /var/cache Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/os-cache 1032088 312212 667448 32% /var/cache $ grep Max /etc/abrt/abrt.conf # Max size for crash storage [MiB] MaxCrashReportsSize = 1000 But: 2010-03-21T16:51:19.001856-04:00 farslayer abrt[7759]: Low free disk space detected, aborting dump I am seeing this problem on multiple systems. But: this error message is next to useless, as it doesn't even say what filesystem it is considering, let alone what the threshold value for a "low free disk" space condition is. To try to get to the bottom of this, I created the attached patch. It applies cleanly to F12/F13/rawhide abrt, and makes the check_free_space() return useful error messages: in particular, check_free_space() now warns in statvfs() fails, and will say exactly how much free space it wants where. But here's the curious thing: when I built and installed local abrt-* packages with this patch, I no longer get the erroneous "Low free disk space detected" messages! But I cannot see how the code after my patch is *effectively* any different than the code before the patch! At any rate, not only does this patch make abrt's error messages useful, it appears to fix a bug with erroneous "Low free disk space detected" messages that I (and perhaps others) are experienced. This bug prevents abrt from working at all. Please apply this patch and rebuild for F12/F13/rawhide. Thanks.
Created attachment 401606 [details] patch to improve error messages related to low disk space Stupid Bugzilla didn't realize original attachment was a patch; reattaching.
Ah, forgot to mention: abrt-1.0.8-2.fc12 is the version that has the "Low free disk space detected" bug. I built a local version, abrt-1.0.8-2.0.fc12, with this patch, and it works fine. I don't have any F13alpha/rawhide hosts at the moment, so I can't test them.
# patch -p1 </tmp/attachment.patch --dry-run can't find file to patch at input line 3 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |--- abrt-1.0.8/src/Hooks/hooklib.cpp.check_free_space 2010-02-11 17:52:28.000000000 -0500 |+++ abrt-1.0.8/src/Hooks/hooklib.cpp.check_free_space 2010-03-21 17:47:44.723231289 -0400 -------------------------- File to patch: + perror_msg_and_die ("aborting dump: statvfs() failed for %s: %s", DEBUG_DUMPS_DIR, strerror(errno)); perror_xyz() already prints strerror(errno), you are doing it twice here. + fs_actual_free_mb = vfs.f_bfree * vfs.f_bsize / (1024 * 1024); long * long can easily overflow on 32 bits. + perror_msg_and_die ("aborting dump: want %uMiB (MaxCrashReportsSize / 4) free space on %s, but only %uMiB is available\n", fs_want_free_mb, DEBUG_DUMPS_DIR, fs_actual_f... *p*error? why? it will print errno, which will contain something bogus at this point. What patch does change is that f_bfree is not divided by (2^20/4). Apparently that was rounding it down too strongly: if blocksize (f_bsize) is 4k, then (2^20/4) blocks is 1Gb! I propose this: + /* fs_free_mb_x4 ~= vfs.f_bfree * vfs.f_bsize * 4, expressed in MBytes. + * Need to neither overflow nor round f_bfree down too much. */ + unsigned long fs_free_mb_x4 = ((unsigned long long)vfs.f_bfree / (1024/4)) * vfs.f_bsize / 1024; + if (fs_free_mb_x4 < setting_MaxCrashReportsSize) + { + error_msg_and_die("aborting dump: only %uMiB is available on %s\n", fs_free_mb_x4 / 4, DEBUG_DUMPS_DIR); } This rounds down only to nearest 256 blocks.
Replaced %u with %lu and applied to git.
abrt-1.0.9-1.fc13 has been submitted as an update for Fedora 13. http://admin.fedoraproject.org/updates/abrt-1.0.9-1.fc13
abrt-1.0.9-1.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update abrt'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/abrt-1.0.9-1.fc13
abrt-1.0.9-1.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report.
abrt-1.0.9-1.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/abrt-1.0.9-1.fc12
abrt-1.0.9-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.