Bug 609 - [RouterStation] The timestamp of new file created under /home/root doesn't correct after adjusting the time.
Summary: [RouterStation] The timestamp of new file created under /home/root doesn't co...
Status: RESOLVED INVALID
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-runtime (show other bugs)
Version: 1.0
Hardware: Other mips
: Medium normal
Target Milestone: 1.1
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard: waiting for debug update. lower prior...
Depends on:
Blocks:
 
Reported: 2010-12-21 22:37 UTC by Liang Wang
Modified: 2011-06-30 01:05 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Liang Wang 2010-12-21 22:37:35 UTC
Testing Env:

Host: Routerstationpro
Kernel: Linux version 2.6.34.7-yocto-standard-00017-g2ec2eda
Image location: http://autobuilder.pokylinux.org/milestone/20101218-1/qemu/qemurouterstationpro/


Steps:

1. download and boot up routerstation hardware with sdk-routerstationpro rootfs and kernel
2. adjust the time and then touch a new file.

logs:

root@routerstationpro:~# pwd
/home/root
root@routerstationpro:~# date
Sun Dec 19 14:20:37 UTC 2010
root@routerstationpro:~# 
root@routerstationpro:~# touch 2010abc
root@routerstationpro:~# ls -l
total 0
-rw-r--r-- 1 root root 0 Dec 22  2010 2010abc
root@routerstationpro:~# sudo date -s "20120808"
Wed Aug  8 00:00:00 UTC 2012
root@routerstationpro:~# pwd
/home/root
root@routerstationpro:~# date
Wed Aug  8 00:00:05 UTC 2012
root@routerstationpro:~# touch 2012abc
root@routerstationpro:~# ls -l
total 0
-rw-r--r-- 1 root root 0 Dec 22  2010 2010abc
-rw-r--r-- 1 root root 0 Dec 22  2010 2012abc

more info:
1. This issue doesn't occur under /tmp directory.

root@routerstationpro:~# cd /tmp/
root@routerstationpro:/var/volatile/tmp# date
Wed Aug  8 00:04:33 UTC 2012
root@routerstationpro:/var/volatile/tmp# touch under_tmp_directory
root@routerstationpro:/var/volatile/tmp# ls -l
total 0
-rw-r--r-- 1 root root 0 Aug  8 00:04 under_tmp_directory

2. 
root@routerstationpro:~# mount
rootfs on / type rootfs (rw)
/dev/root on / type nfs (rw,relatime,vers=2,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=udp,port=65535,timeo=11,retrans=3,sec=sys,mountport=65535,mountproto=,addr=128.224.178.20)
proc on /proc type proc (rw,relatime)
tmpfs on /mnt/.psplash type tmpfs (rw,relatime,size=40k)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /var/volatile type tmpfs (rw,relatime)
tmpfs on /media/ram type tmpfs (rw,relatime)
root@routerstationpro:~#
Comment 1 Bruce Ashfield 2010-12-22 06:45:57 UTC
There's nothing unique (well perhaps the clock) about the routerstation
that should cause this. Is the same test passing on other boards ?
Comment 2 Yi Zhao 2010-12-23 00:25:58 UTC
In beagleboard, there is no this issue.

Testing Env:

Host: Beagleboard
Kernel: Linux beagleboard 2.6.34.7-yocto-standard #1 PREEMPT Sun Dec 19 01:59:10 PST 2010 armv7l GNU/Linux
Image location:
http://autobuilder.pokylinux.org/milestone/20101218-1/qemu/qemubeagleboard/

root@beagleboard:~# mount
rootfs on / type rootfs (rw)
/dev/root on / type ext3 (rw,relatime,errors=continue,data=writeback)
proc on /proc type proc (rw,relatime)
tmpfs on /mnt/.psplash type tmpfs (rw,relatime,size=40k)
sysfs on /sys type sysfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
tmpfs on /var/volatile type tmpfs (rw,relatime)
tmpfs on /media/ram type tmpfs (rw,relatime)
root@beagleboard:~# 
root@beagleboard:~# pwd
/home/root
root@beagleboard:~# date
Sun Dec 19 13:15:44 UTC 2010
root@beagleboard:~#  touch 2010abc
root@beagleboard:~# ls -l
total 0
-rw-r--r-- 1 root root 0 Dec 19 13:15 2010abc
root@beagleboard:~# date -s "20120808"
INFO: RCU detected CPU 0 stall (t=13108 jiffies)
Wed Aug  8 00:00:00 UTC 2012
root@beagleboard:~# date
Wed Aug  8 00:02:36 UTC 2012
root@beagleboard:~# touch 2012abc
root@beagleboard:~# ls -l
total 0
-rw-r--r-- 1 root root 0 Dec 19  2010 2010abc
-rw-r--r-- 1 root root 0 Aug  8 00:02 2012abc
root@beagleboard:~#
Comment 3 liang li 2011-01-05 00:06:55 UTC
also happend on mpc8315e-rdb,
Kernel: Linux version 2.6.34.7-yocto-standard
Image exists:
http://autobuilder.pokylinux.org/milestone/20110101-1/qemu/qemumpc8315e-rdb/
rootfs file are manually created .
logs :
root@mpc8315e-rdb:~# date -s '20080808'                                        
Fri Aug  8 00:00:00 UTC 2008                                                   
root@mpc8315e-rdb:~# touch a                                                   
root@mpc8315e-rdb:~# ls -l                                                     
total 24                                                                       
drwxr-xr-x 2 root root  4096 Jan  5  2011 C                                    
root@mpc8315e-rdb:~# ls -l a                                                   
-rw-r--r-- 1 root root 0 Jan  5  2011 a                                        
root@mpc8315e-rdb:~# date                                                      
Fri Aug  8 00:00:17 UTC 2008
root@mpc8315e-rdb:~# cd /tmp                                              
root@mpc8315e-rdb:/var/volatile/tmp# touch b                                   
root@mpc8315e-rdb:/var/volatile/tmp# ls -l b                                   
-rw-r--r-- 1 root root 0 Aug  8 00:10 b                                        
root@mpc8315e-rdb:/var/volatile/tmp# date                                      
Fri Aug  8 00:10:11 UTC 2008
Comment 4 Liang Wang 2011-01-05 00:18:40 UTC
1. This bug also occurs on mpc8315e-rdb with build 20110101-01. 
2. This bug does NOT occur on beagleboard.
Comment 5 Jingdong Lu 2011-06-30 01:01:30 UTC
This bug is related to our test environment. We use NFS as rootfs to run test and get the different timestamp between a new created file and local time setting just like the above result.

1) I use the hard disk as its rootfs and test it again. We can get the correct result.
* adjust the time and then touch a new file.
logs:

root@mpc8315e-rdb:~# pwd
/home/root
root@mpc8315e-rdb:~# date
Thu Jun 30 13:04:31 HKT 2011
root@mpc8315e-rdb:~# touch 2011abc
root@mpc8315e-rdb:~# ls -l
total 0
-rw-r--r-- 1 root root 0 Jun 30 13:04 2011abc
root@mpc8315e-rdb:~# date -s "20120808"
Wed Aug  8 00:00:00 HKT 2012
root@mpc8315e-rdb:~# date
Wed Aug  8 00:00:03 HKT 2012
root@mpc8315e-rdb:~# touch 2012abc
root@mpc8315e-rdb:~# ls -l
total 0
-rw-r--r-- 1 root root 0 Jun 30  2011 2011abc
-rw-r--r-- 1 root root 0 Aug  8 00:00 2012abc

2) I use two machines (Ubuntu), one as nfs server, another as nfs client. On client side, I create a new file and find its timestamp is same as the server side even if I changed the date on the client. The result is as same as what this bug mentioned. So NFS protocol provides for both server-based and client-based timestamps. Linux defaults to server-side timestamps without any way to change it.

So I changed the status into RESOLVED(INVALID)
Comment 6 Jingdong Lu 2011-06-30 01:05:19 UTC
Our test environment:
Routerstation and mpc8351e: use NFS as rootfs 
beagleboard: use local SD card as rootfs

So this bug occurs on mpc8315e-rdb and routerstation. But it dose not occur on beagleboard.