JDK-4013568 : Although Java API's specify sleep and wait values as 64-bit, we only use 32 bits
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.0.2,1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: solaris_2.5,solaris_2.5.1
  • CPU: sparc
  • Submitted: 1996-11-08
  • Updated: 2000-02-18
  • Resolved: 2000-02-18
Related Reports
Relates :  
Relates :  
Description
The Java API's specify sleep and wait values as 64-bit Java longs, which
leads one to expect that we mean that.  It's not so, as the internal
routines responsible for implementing the waits and sleeps, mainly
monitorWait(), take C int's, and values greater than Integer.MAX_INT are
limited to Integer.MAX_INT.  This means we can't do sleeps longer than
Integer.MAX_INT millis, which is something like a month.  People have
already wanted to do so, say for a time bomb on a server.

I'd thought that this would be a problem to fix because I'd thought that
monitorWait was exported via the JIT API, but that turns out to be not
so.  Instead, it's just a pain having to deal with all these 64-bit
thingies.

Comments
EVALUATION This will just be a matter of chasing down the details. Not for JDK1.1, but for JDk1.1.1. peter.kessler@Eng 1997-01-30 Most os does not support 64-bit timed wait. ###@###.### 2000-02-16 Will not fix, since most operating systems do not support this. A separate bug (4013568) about the fact that timeout values that do not fit into 32 bits are silently treated as infinities. -- mr@eng 2000/2/17
02-08-0183