Bug 77002

Summary: DB_File resets file timestamps when it should not
Product: [Retired] Red Hat Linux Reporter: Need Real Name <gauthier>
Component: perlAssignee: Warren Togami <wtogami>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-28 07:07:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2002-10-30 20:12:18 UTC
Description of Problem:
(2002.10.30, 14:38)

I have a problem with Perl and DB_File under RedHat 7.3. This problem
occurs with programs which used to run fine in 7.1.

Whenever I open a dbm file using DB_File and with 0444 access
permission (read only), the datestamp of the file is updated, even
though no change was made to the file! The following Perl script
provokes that problem on my system (as well as on a friend's system
which uses 7.3 as well).

Are we the only one with this problem? Is there a solution?

Version-Release number of selected component (if applicable):


How Reproducible:
#! /usr/bin/perl
use DB_File;
$file = $ARGV[0];
if ( not $file ) { print "..Syntax: $0 filename\n"; exit; }
if (not dbmopen %basedbm,$file,0444) { print "..Can't open file $file\n"; 
exit; }
$n = scalar keys %basedbm;
dbmclose %basedbm;
print "$n records\n";

This only opens the file; it does not change it. Yet, it changes the timestamp 
on the file.

Steps to Reproduce:
1. 
2. 
3. 

Actual Results:
Timestamp change.

Expected Results:
No timestamp change.

Additional Information:

Comment 1 Chip Turner 2002-11-06 16:38:25 UTC
can you confirm the file on disk remained the same?  it is possibly berkeley db
doing some housekeeping on the file itself.  the md5sum program can determine if
a change takes place between invocations

Comment 2 Chip Turner 2002-11-06 16:41:23 UTC
(moving to perl component; it isn't actually a DBI bug itself)

Comment 3 Warren Togami 2005-05-28 07:07:08 UTC
Closing due to lack of activity and likely fixed in modern perl.  If this is
still an issue in RHEL4, FC3 or FC4 please open a new bug with new test
information and exact versions of packages.