Bug 178445 - java.net.ProtocolException
java.net.ProtocolException
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Tromey
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-20 12:03 EST by Andrew Overholt
Modified: 2014-08-11 01:46 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-23 13:36:12 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test case (ripped out of eclipse{,-bugzilla}) (18.90 KB, text/plain)
2006-01-20 12:03 EST, Andrew Overholt
no flags Details
explanation (2.91 KB, text/plain)
2006-01-20 14:45 EST, Andrew Haley
no flags Details

  None (edit)
Description Andrew Overholt 2006-01-20 12:03:55 EST
Description of problem:
eclipse-bugzilla grabs the bugzilla components from the query page.  This fails
with gcc 4.1 where it does not fail with 4.0.x.  We isolated the parts that do
this (hackily and not very precisely, might I add ;) and I will attach that test
case.

Version-Release number of selected component (if applicable):
gcc-4.1.0-0.15.i386

How reproducible:
Always.

Steps to Reproduce:
1. javac FetchError.java
2. java FetchError
3.
  
Actual results:
java.net.ProtocolException: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
   at gnu.java.net.protocol.http.Request.readResponse (libgcj.so.7)
   at gnu.java.net.protocol.http.Request.dispatch (libgcj.so.7)
   at gnu.java.net.protocol.http.HTTPURLConnection.connect (libgcj.so.7)
   at FetchError$ConnectingThread.run (FetchError.java:478)


Expected results:
No output (like gij 4.0.x and Sun).

Additional info:
There is another error that we were attempting to duplicate, but we hit this bug
first.  Hopefully once this is fixed, we will be able to investigate the next bug.

Andrew Haley (on IRC) thinks this might be the same as the https issue (bug
177733).  This is http vs. https, but it might be the same.
Comment 1 Andrew Overholt 2006-01-20 12:03:55 EST
Created attachment 123493 [details]
Test case (ripped out of eclipse{,-bugzilla})
Comment 2 Andrew Haley 2006-01-20 14:45:09 EST
Created attachment 123502 [details]
explanation
Comment 3 Tom Tromey 2006-01-20 15:18:51 EST
I think what was happening previously was that the http protocol
handler was eagerly reading the entire response body into a byte[].
This meant that we didn't have to handle flushing the body anywhere
else.
Comment 4 Tom Tromey 2006-01-20 15:46:58 EST
Testing a patch.
Comment 5 Igor Foox 2006-01-20 16:09:31 EST
As Andrew said in the original report we were trying to reproduce another bug in
which the connection timed out, so if the patch fixes this, it might trigger the
other bug. Unless they are related of course.
Comment 6 Tom Tromey 2006-01-20 17:05:53 EST
I've checked in the fix to gcc cvs, on the 4.1 branch.
It is purely a libgcj change and won't require any application rebuilds.

Even with the patch, the attached test case fails -- it times out
when reading.  However, if I comment out the call to getTimedInputStream
(so that we're reading from the raw un-timed-out underlying input stream),
then it works.  I suspect that there is a timing bug of some kind
in the timed input stream code, but I have not looked into it deeply.
Comment 7 Igor Foox 2006-01-20 17:17:24 EST
Thanks a lot for the quick fix!

The timeout bug is the one we were originally after. Now we can try and dig out
the timeout bug.
Comment 8 Andrew Overholt 2006-01-23 11:50:22 EST
I have verified that the first bug is indeed fixed.  I have opened a new one for
the timeout:  bug 178703.  Thanks!

Note You need to log in before you can comment on or make changes to this bug.