VirtualBox

Opened 14 years ago

Closed 9 years ago

#5510 closed defect (obsolete)

Clock loses synchronization — at Version 5

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

Description (last modified by Frank Mehnert)

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.

Change History (9)

by Adam Russell, 14 years ago

Attachment: VBox.log added

Ubuntu run

by Adam Russell, 14 years ago

Attachment: VBox.log.2 added

Arch run 1

by Adam Russell, 14 years ago

Attachment: VBox.log.1 added

Arch run 2

by Adam Russell, 14 years ago

Attachment: VBox.2.log added

Arch run 3

comment:1 by Frank Mehnert, 14 years ago

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 by Adam Russell, 14 years ago

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 by Frank Mehnert, 14 years ago

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 by Adam Russell, 14 years ago

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.

comment:5 by Frank Mehnert, 9 years ago

Description: modified (diff)
Resolution: obsolete
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use