VirtualBox

Ticket #5510 (new defect)

Opened 4 years ago

Last modified 4 years ago

Clock loses synchronization

Reported by: arussell Owned by:
Priority: major Component: guest additions
Version: VirtualBox 3.0.12 Keywords: time clock synchronization sync pause save resume
Cc: Guest type: Linux
Host type: Windows

Description

I am running a Windows XP host with multiple Linux guests, including Arch Linux and Ubuntu. I do not know whether or not this bug affects other hosts and guests. I have installed Guest Additions on all affected guests.

Currently the clock falls out of sync after a guest is paused and resumed. The time remains the same as when the guest was paused. Resetting the guest does not fix the issue -- the guest must be completely shut down and manually started again. Also, the same issue manifests when the machine state is saved and then restored.

I would expect the Guest Additions to detect whenever the machine is restored from a paused or saved state and set the time accordingly.

Attachments

VBox.log Download (53.7 KB) - added by arussell 4 years ago.
Ubuntu run
VBox.log.2 Download (67.2 KB) - added by arussell 4 years ago.
Arch run 1
VBox.log.1 Download (56.5 KB) - added by arussell 4 years ago.
Arch run 2
VBox.2.log Download (53.4 KB) - added by arussell 4 years ago.
Arch run 3

Change History

Changed 4 years ago by arussell

Ubuntu run

Changed 4 years ago by arussell

Arch run 1

Changed 4 years ago by arussell

Arch run 2

Changed 4 years ago by arussell

Arch run 3

comment:1 Changed 4 years ago by frank

If you updated the guest additions to 3.0.12 then the maximum difference between guest and host cannot be more than 20 minutes. If the difference is smaller, adjtime() is used to adjust the guest time to the host time. If the difference is bigger, the guest time is set using settimeofday(). The parameter 20 minutes is configurable, check /usr/sbin/vboxadd-service --help and check the script /etc/init.d/vboxadd-service.sh.

comment:2 Changed 4 years ago by arussell

Thanks for the response. It seems to work if I modify the vboxadd-service script to pass --timesync-set-threshold <ms>. About how long does adjtime() usually take to synchronize the time? I let it run for quite a while, and the time never seemed to catch up. Does adjtime() leave a log entry anywhere?

comment:3 Changed 4 years ago by frank

adjtime() is a Linux syscall which takes the difference to the correct time. The Linux kernel decides himself how quick the time is adjusted. The interval is usually quite small (some milliseconds per interval). You can start the service with -v -v -v --foreground to display debugging output.

comment:4 Changed 4 years ago by arussell

Alright, so it looks like adjtime *is* trying to sync the time, but it just takes an extremely long time. I set the threshold to a lower number, and it works to my satisfaction. I had been having this problem for quite a while now, but only just now reported it...so it looks like it's already been fixed! I'm fine with this ticket being closed. Thanks again for being so helpful.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use