Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2038851 | 1.4.0 | Michael McMahon | P3 | Resolved | Fixed | beta |
Name: krC82822 Date: 11/23/2000
23 Nov 2000, eval1127@eng -- the current merlin sources indicate that
skip() is now called ONLY if it won't block (see Comments section).
This may eliminate the cited problem. Am filing a bug only to
make sure the user's problem is addressed by the merlin changes.
------------
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
We have encountered a really strange problem with
sun.net.www.http.KeepAliveStream. It seems that under certain network
condition (ie proxy server goes down), KeepAliveStream.close() goes into an
infinite loop and never exits. Upon further investigation, it seems that the
following code inside that function is the reason.
for (long l_0_ = 0L; l_0_ < l; l_0_ = skip(l)) {
l -= l_0_;
}
Apparently under some network circumstances, skip() will return 0. As a result
l never changes and the loop does not exit. Has anyone else encountered this
problem? Can you tell us how you get around it? Thanks.
It seems that this problem only happens when my program is reading from an
inputstream gotten from a URLConnection and the connection somehow dies. I am
going through a MS proxy 2.0 running on NT 4 sp6. But this problem happens
even if we connect directly to the Internet.
(Review ID: 112749)
======================================================================
- backported by
-
JDK-2038851 Infinite loop in sun.net.www.http.KeepAliveStream [due to skip()]
-
- Resolved
-
- relates to
-
JDK-4211025 InputStream.close() takes time proportional to bytes left to read
-
- Resolved
-