Bug 41476 - tmpwatch can't handle files larger than 2GB
Summary: tmpwatch can't handle files larger than 2GB
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tmpwatch
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Preston Brown
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
: 42672 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-05-21 03:44 UTC by Hao Li
Modified: 2007-04-18 16:33 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2001-05-21 03:45:01 UTC


Attachments (Terms of Use)

Description Hao Li 2001-05-21 03:44:57 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3 i686; Nav)

Description of problem:
When a directory has file(s) larger than 2GB tmpwatch will fail with 

error: failed to lstat /home/tmp//big: Value too large for defined data
type


How reproducible:
Always

Steps to Reproduce:
1. Create a file larger than 2GB (eg. dd if=/dev/zero of=big bs=1024k
count=2049)
2. Use tmpwatch to scratch the directory where this file resides.


Actual Results:  % /usr/sbin/tmpwatch --mtime 1 /home/tmp/
error: failed to lstat /home/tmp//big: Value too large for defined data
type


Additional info:

Recompiling this RPM with "-D_FILE_OFFSET_BITS=64" fixes the problem. The
same problem is present in tmpwatch for earlier RedHat versions as well.

--- tmpwatch.spec.orig  Sun May 20 20:44:04 2001
+++ tmpwatch.spec       Sun May 20 20:44:14 2001
@@ -20,7 +20,7 @@
 %setup -q
 
 %build
-make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
+make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
 
 %install
 rm -rf %{buildroot}

Comment 1 Preston Brown 2001-07-02 18:13:56 UTC
changed in 2.7.2 and later.


Comment 2 Preston Brown 2001-07-02 18:14:17 UTC
*** Bug 42672 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.