3

I've got a ESXI-Server and a OpenSuse 10.3 distribution running on it as a guest system. In a java (6_17) application that uses Thread.sleep() to not hog 100% CPU, I noticed that it sometimes never wakes up again, and the application is in a coma. I started logging before going to sleep and noticed that the clock jumps one hour and a few minutes ahead, and the time logged shortly afterwards from some other thread produces the real time again.

There are some Java bugs posted, that all drill down to Linux using the wrong clock to sleep. There are also some virtual machine issues with jumping time. Has someone seen something similar, so I know where I shall start searching?

Even Object.wait() is broken, therefore I can't even shut my application down neatly. Can calling Thread.sleep() to often trigger to many time update from the hareware?

Franz Kafka
  • 237
  • 3
  • 12

1 Answers1

4

Here's a few things to try:

  1. Make sure that you have vmware tools installed.
  2. Read the Timekeeping in VMware Virtual Machines document.
  3. Read the Knowledge Base Article: Timekeeping best practices for Linux guests This has settings specific for SUSE.

Personally, I've found that sleep works reliably with java (1.6.0_16) with VMWare tools providing the time synchronisation but that's been on Redhat and Solaris VM's rather than Suse. The 2 documents above should help.

gm3dmo
  • 10,057
  • 1
  • 42
  • 36