Thread.sleep() returns too early
David Holmes - Sun Microsystems
David.Holmes at Sun.COM
Mon Oct 13 05:51:56 PDT 2008
There are some issues with Thread.sleep on Solaris but they involve a
number of factors. I'm presently investigating an issue where the system
time changes and then a signal is sent to the process and is apparently
handled by the sleeping thread which then returns immediately from sleep.
Is your problem readily reproducible? (The test behaved somewhat
erratically when I tried it, but there was no timeout message.)
On 13/10/08 09:59 PM, Artem Ananiev wrote:
> Hi, HotSpot team,
> I have faced a problem with Thread.sleep(), which looks very weird from
> my perspective. The test is attached. It first forks a new thread and
> then performs some actions on the main and EDT threads. The first
> (forked) thread is a kind of timeout/hang/deadlock prevention stuff and
> contains a single sleep(600000) call, but I found it may return from it
> at any arbitrary moment without any exceptions, causing the test to fail
> with "timeout".
> This only happens on Solaris. Any ideas?
More information about the hotspot-runtime-dev