[LU-14019] sanity test_39l: @@@@@@ FAIL: atime is not updated Created: 08/Oct/20  Updated: 15/Nov/23

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.14.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Maloo Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

This issue was created by maloo for Vladimir Saveliev <c17830@cray.com>

This issue relates to the following test suite run: https://testing.whamcloud.com/test_sets/6bf04d76-1386-4340-9901-b90a0ff7e8c5

test_39l failed with the following error:

'atime is not updated  : 1596474526, should be 1596474527'

Other instance:
https://testing.whamcloud.com/sub_tests/2be49be1-b96d-4b71-96c7-c61a9d74bf7b

This is probably related to LU-1783 and LU-4765, although, test output is somewhat different.

VVVVVVV DO NOT REMOVE LINES BELOW, Added by Maloo for auto-association VVVVVVV
sanity test_39l - 'atime is not updated : 1596474526, should be 1596474527'



 Comments   
Comment by Xiaolin Zang [ 15/Apr/21 ]

Part of test 39l:
 
        do_facet $SINGLEMDS lctl set_param -n mdd.MDT0000.atime_diff=2
        sleep 3
 
        # test setting directory atime when now > dir atime + atime_diff                                                                                                                                  
        local d1=$(date +%s)
        ls $DIR/$tdir
        local d2=$(date +%s)
        cancel_lru_locks mdc 
        atime=$(stat -c %X $DIR/$tdir)
        [ "$atime" -ge "$d1" -a "$atime" -le "$d2" ] ||
                error "atime is not updated  : $atime, should be $d2”   <=== The message is wrong.  Should be "must meet condition d1 <= atime <= d2"
 
In our test, we see sanity test_39l: @@@@@@ FAIL: atime is not updated  : 1618155458, should be 1618155459 (d2 - atime == 1)
 
That indicates the value of d1 fails to meet the condition "$atime" -ge "$d1" but d1 is not logged unfortunately.
 
Observation: It's inherently unstable to check local time against the timestamps from a distributed file system.  It's quite possible that local time d1 is larger than file's atime, if the clocks are slightly out of sync.  Using atime as an example, we want to test:
 
1. The atime increments (or stays the same depending on the granularity of the timestamp) with each access.
2. The atime falls into a reasonable range of the local time (say plus/minor a second).

Generated at Sat Feb 10 03:06:09 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.