Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / October 2007

Tip: Looking for answers? Try searching our database.

Bug Hotspot accelerates Windows system clock

Thread view: 
FutureScalper - 30 Oct 2007 13:19 GMT
This bug has been present way back, and has never been fixed.

Running the Hotspot Server VM Java 6 Update 3, I am getting seriously
accelerated system clock times which can be as much as a minute over a
couple of hours.

Gateway GT5636E Quad processor Windows Vista Home Premium OS.

This is just unacceptable for Java to have the side-effect of altering
the system clock.

I have removed ALL Thread.sleep calls and have created my own facility
using wait, as the bug was originally with the sleep call.  This helps
most of the time, but there is still an alteration of the windows
system clock.

It has something to do with Java moving the system clock back so that
threads which are waiting on time will be awakened.

Yes, I use the ForceTimeHighResolution argument to the VM...  Doesn't
fix it, apparently under all circumstances.

I provide the argument under Java Web Start, and can only assume it
gets passed properly to the underlying VM.
Gordon Beaton - 30 Oct 2007 13:20 GMT
> This bug has been present way back, and has never been fixed.
>
[quoted text clipped - 6 lines]
> This is just unacceptable for Java to have the side-effect of altering
> the system clock.

While I can sympathize, I do wonder what kind of operating system
allows its system clock to be changed by an unprivileged user process?

/gordon

--
FutureScalper - 30 Oct 2007 13:33 GMT
> > This bug has been present way back, and has never been fixed.
>
[quoted text clipped - 13 lines]
>
> --

Well, that's a good point.  I wonder why it is necessary to alter the
clock anyway.  Ironic that Java has no facilities at the user level
for altering the system clock, but that the runtime alters it as a
bug.
FutureScalper - 30 Oct 2007 13:36 GMT
> > > This bug has been present way back, and has never been fixed.
>
[quoted text clipped - 20 lines]
>
> - Show quoted text -

OK, let me add one thing.  I am actually running within a privileged
user process, and I guess I can run unprivileged although I would
assume it will still alter the clock since it has something to do with
low level thread seheduling, as best I can understand.
Gordon Beaton - 30 Oct 2007 13:37 GMT
> OK, let me add one thing. I am actually running within a privileged
> user process, and I guess I can run unprivileged although I would
> assume it will still alter the clock since it has something to do
> with low level thread seheduling, as best I can understand.

I still claim that the real problem here is not Java, but Windows.

/gordon

--
FutureScalper - 30 Oct 2007 13:30 GMT
I should also say that another Java program is also running under the
same Server VM, to which I also provide the ForceTimeHighResolution VM
flag, so that all Java VM's running on the system have that, which is
supposedly the "fix" to the Bug.  So I cannot say whether the system
clock alteration comes from my own code or the other Java code which
is not mine.  Windows time synchronization service is switched OFF, so
once I synch the clock I assume the only alteration will be due to
Java execution.

> This bug has been present way back, and has never been fixed.
>
[quoted text clipped - 20 lines]
> I provide the argument under Java Web Start, and can only assume it
> gets passed properly to the underlying VM.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.