Date: Thu, 5 Sep 1996 01:19:34 +0200 (MET DST) From: Tor Egge <Tor.Egge@idt.ntnu.no> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/1569: savecore calculates wrong value for free disk space Message-ID: <199609042319.BAA00598@ikke.idt.unit.no> Resent-Message-ID: <199609050630.XAA25163@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1569 >Category: bin >Synopsis: savecore calculates wrong value for free disk space >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 4 23:30:01 PDT 1996 >Last-Modified: >Originator: Tor Egge >Organization: Norwegian University of Science and Technology, Trondheim, Norway >Release: FreeBSD 2.2-CURRENT i386 >Environment: FreeBSD ikke.idt.unit.no 2.2-CURRENT FreeBSD 2.2-CURRENT #6: Wed Sep 4 21:44:38 MET DST 1996 root@ikke.idt.unit.no:/usr/src/sys/compile/TEGGE i386 >Description: When there is more than 2 GB free space on the partition where the coredump sould be dumped, an overflow occurs when calculating the free disk space. --- Sep 5 00:56:11 ikke savecore: reboot after panic: vm_page_free: freeing busy page Sep 5 00:56:11 ikke savecore: no dump, not enough free space on device --- >How-To-Repeat: Trigger a kernel bug that causes a dump, e.g. by misuse of madvise. When the system comes up, try a savecore to a directory on a partition where you have more than 2GB free space (but less than 4 GB free space). >Fix: Index: savecore.c =================================================================== RCS file: /export/akg1/cvs/src/sbin/savecore/savecore.c,v retrieving revision 1.13 diff -c -r1.13 savecore.c *** savecore.c 1996/08/20 20:49:39 1.13 --- savecore.c 1996/09/04 22:59:56 *************** *** 548,554 **** syslog(LOG_ERR, "%s: %m", dirname); exit(1); } ! spacefree = (fsbuf.f_bavail * fsbuf.f_bsize) / 1024; (void)snprintf(path, sizeof(path), "%s/minfree", dirname); if ((fp = fopen(path, "r")) == NULL) --- 548,554 ---- syslog(LOG_ERR, "%s: %m", dirname); exit(1); } ! spacefree = ((off_t) fsbuf.f_bavail * fsbuf.f_bsize) / 1024; (void)snprintf(path, sizeof(path), "%s/minfree", dirname); if ((fp = fopen(path, "r")) == NULL) ------------- >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609042319.BAA00598>