Opened 7 months ago
Closed 7 months ago
#22047 closed defect (fixed)
On Tumbleweed, Slowroll and Fedora time and date on shared folders are wrong
Reported by: | os-larryr | Owned by: | |
---|---|---|---|
Component: | shared folders | Version: | VirtualBox-7.0.16 |
Keywords: | Cc: | ||
Guest type: | Linux | Host type: | Linux |
Description (last modified by )
On both Tumbleweed and Leap 15.5 hosts running 7.0.14 or 7.0.16 the guests have the wrong date and time all are with Oracle Guest additions installed (not vendor guest additions) /tmpx/a is the mount point for all guests tested. All failures are with kernel 6.8.6
Good Leap 15.5 with 7.0.16 guest additions VM4:~ # uname -a Linux VM4 5.14.21-150500.55.52-default #1 SMP PREEMPT_DYNAMIC Tue Mar 5 16:53:41 UTC 2024 (a62851f) x86_64 x86_64 x86_64 GNU/Linux VM4:~ # ll /tmpx/a total 389064 -rwxrwx--- 1 root vboxsf 222883840 Feb 29 14:42 6.6.11.tar drwxrwx--- 1 root vboxsf 0 Jan 16 17:48 Leap drwxrwx--- 1 root vboxsf 0 Apr 1 19:38 TW -rwxrwx--- 1 root vboxsf 4597839 Apr 17 07:23 UserManual.pdf -rwxrwx--- 1 root vboxsf 170897951 Apr 17 07:23 VirtualBox-7.0.16.tar.bz2 -rwxrwx--- 1 root vboxsf 98 Feb 4 15:15 avb.repo -rwxrwx--- 1 root vboxsf 34 May 1 2023 doit -rwxrwx--- 1 root vboxsf 3157 Apr 17 08:46 oracle_vbox_2016.asc -rwxrwx--- 1 root vboxsf 288 Apr 18 17:35 virtualbox.repo VM4:~ # Tumbleweed with 7.0.16 guest additions TW2022:~ # uname -a Linux TW2022 6.8.6-1-default #1 SMP PREEMPT_DYNAMIC Mon Apr 15 06:36:47 UTC 2024 (605b284) x86_64 x86_64 x86_64 GNU/Linux TW2022:~ # ll /tmpx/a total 389064 -rwxrwx--- 1 root vboxsf 222883840 Apr 18 07:10 6.6.11.tar drwxrwx--- 1 root vboxsf 0 Apr 18 07:10 Leap drwxrwx--- 1 root vboxsf 0 Apr 18 07:10 TW -rwxrwx--- 1 root vboxsf 4597839 Apr 18 07:18 UserManual.pdf -rwxrwx--- 1 root vboxsf 170897951 Apr 18 07:10 VirtualBox-7.0.16.tar.bz2 -rwxrwx--- 1 root vboxsf 98 Apr 18 07:10 avb.repo -rwxrwx--- 1 root vboxsf 34 Apr 18 07:18 doit -rwxrwx--- 1 root vboxsf 3157 Apr 18 Slowroll with 7.0.16 guest additions slowroll:~ # uname -a Linux slowroll 6.8.5-1-default #1 SMP PREEMPT_DYNAMIC Thu Apr 11 04:31:19 UTC 2024 (542f698) x86_64 x86_64 x86_64 GNU/Linux slowroll:~ # ll /tmpx/a total 389064 -rwxrwx--- 1 root vboxsf 222883840 Apr 18 07:11 6.6.11.tar drwxrwx--- 1 root vboxsf 0 Apr 18 07:11 Leap drwxrwx--- 1 root vboxsf 0 Apr 18 07:11 TW -rwxrwx--- 1 root vboxsf 4597839 Apr 18 07:11 UserManual.pdf -rwxrwx--- 1 root vboxsf 170897951 Apr 18 07:11 VirtualBox-7.0.16.tar.bz2 -rwxrwx--- 1 root vboxsf 98 Apr 18 07:11 avb.repo -rwxrwx--- 1 root vboxsf 34 Apr 18 07:11 doit -rwxrwx--- 1 root vboxsf 3157 Apr 18 07:17 oracle_vbox_2016.asc -rwxrwx--- 1 root vboxsf 288 Apr 18 17:47 virtualbox.repo slowroll:~ # Fedora with 7.0.16 guest additions [root@fedora ~]# uname -a Linux fedora 6.8.6-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Apr 13 15:14:23 UTC 2024 x86_64 GNU/Linux [root@fedora ~]# ll /tmpx/a total 389064 -rwxrwx---. 1 root vboxsf 222883840 Apr 17 10:57 6.6.11.tar -rwxrwx---. 1 root vboxsf 98 Apr 17 10:57 avb.repo -rwxrwx---. 1 root vboxsf 34 Apr 17 10:57 doit drwxrwx---. 1 root vboxsf 0 Apr 17 10:57 Leap -rwxrwx---. 1 root vboxsf 3157 Apr 18 11:21 oracle_vbox_2016.asc drwxrwx---. 1 root vboxsf 0 Apr 17 10:57 TW -rwxrwx---. 1 root vboxsf 4597839 Apr 18 11:21 UserManual.pdf -rwxrwx---. 1 root vboxsf 170897951 Apr 18 11:21 VirtualBox-7.0.16.tar.bz2 -rwxrwx---. 1 root vboxsf 288 Apr 18 11:21 virtualbox.repo [root@fedora ~]#
Attachments (1)
Change History (8)
by , 7 months ago
comment:1 by , 7 months ago
Description: | modified (diff) |
---|
comment:2 by , 7 months ago
Hi Larry,
What is the wrong and what is the expected time in listing from the description?
comment:3 by , 7 months ago
Full details of fairly thorough testing are available starting with the following post on another forum. Include is likely the first kernel where the file time problems started:
https://forums.opensuse.org/t/files-in-the-virtualbox-share-show-wrong-timestamp/172718/46
comment:4 by , 7 months ago
Hy guys,
I confirm can that it was an issue on our side. Fix will be available with the next release. Thank you for pointing out.
comment:5 by , 7 months ago
Hi Galitsyn, please include in 7.0.16, once the big crasher bug is fixed.
comment:6 by , 7 months ago
After waiting for over a week for this to get fixed. I looked into it myself and fixed it by making the following change in the Guest Additions (Line numbers based on a 7.0.15 dev build of Virtualbox)
This is for informational purposes, only. If you use this to patch your own Guest Additions, you will do so at your own risk!
Patch file: vbox-file-timestamps-fix.patch
File (patch) contents are as follows:
--- vboxsf/utils.c 2024-03-21 06:53:07.000000000 -0500 +++ vboxsf/utils.c 2024-04-30 14:12:07.000000000 -0500 @@ -299,9 +299,13 @@ static void vbsf_update_inode_timestamps(struct inode *pInode, PSHFLFSOBJINFO pObjInfo) { #if RTLNX_VER_MIN(6,6,0) - struct timespec64 ts; - vbsf_time_to_linux(&ts, &pObjInfo->ChangeTime); - inode_set_ctime_to_ts(pInode, ts); + struct timespec64 ats, cts, mts; + vbsf_time_to_linux(&ats, &pObjInfo->AccessTime); + inode_set_atime_to_ts(pInode, ats); + vbsf_time_to_linux(&cts, &pObjInfo->ChangeTime); + inode_set_ctime_to_ts(pInode, cts); + vbsf_time_to_linux(&mts, &pObjInfo->ModificationTime); + inode_set_mtime_to_ts(pInode, mts); #else vbsf_time_to_linux(&pInode->i_atime, &pObjInfo->AccessTime); vbsf_time_to_linux(&pInode->i_ctime, &pObjInfo->ChangeTime);
To apply, after installing guest additions and assuming that you're using 7.0.15 and the line numbers line up (otherwise, above patch file content will need to be edited):
# Create the vbox-file-timestamps-fix.patch file with the contents above, and # place the patch file into the /tmp directory vbox_version=7.0.15 # Whatever version of virtualbox you are using # Go the the root dir from which the patch should be applied cd "/opt/VBoxGuestAdditions-${vbox_version}/src/vboxguest-${vbox_version}" # Check the patch for validity to make sure line numbers line up and you are in the # correct working directory to apply the patch... sudo patch --dry-run -p0 /tmp/vbox-file-timestamps-fix.patch # Assuming no errors arose from above line, apply the patch to fix up Guest Additions # file modified and access time handling for shared folders on newer Linux kernel based # guests sudo patch -p0 /tmp/vbox-file-timestamps-fix.patch # Regen Vbox Guest Additions for your kernel (and any other kernels you have installed # that are affected) # Set the kernel version to apply this to (you can use: uname -a # And get it from that) my_kernel_version=6.8.4-060804-generic sudo /etc/kernel/postinst.d/vboxadd "$my_kernel_version" # Repeat the Guest Addition update procedure (i.e., my_kernel_version=... and the command that follows) for any other kernels that this change should apply to # Reboot to reload Linux and the latest built guest additions sudo reboot
Check any host shared directories you have for files with correct timestamps and hopefully, you're good to go.
E.g.,
cd /media/sf_D_DRIVE stat some_file.txt
..., then compare the file times in the output of the stat command with the file times on the Windows host.
Be careful when updating Virtualbox or reinstalling Guest Additions from (virtual) CD, because you will likely wipe the above patch and need to reapply it, at least until it's officially fixed by Oracle.
comment:7 by , 7 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Hi guys,
We just released VirtualBox 7.0.18. This issue should be fixed in this release. It can be downloaded from here. Thank you for reporting the issue.
readable file of issue