|
Quick Lists
|
|
Bug ID:
|
6670408
|
|
Votes
|
0
|
|
Synopsis
|
testcase panics 1.5.0_12&_14 JVM when java.net.PlainSocketImpl trying to throw an exception
|
|
Category
|
java:classes_net
|
|
Reported Against
|
b03
|
|
Release Fixed
|
7(b29),
5.0u16-rev(b03) (Bug ID:2162300)
|
|
State
|
10-Fix Delivered,
bug
|
|
Priority:
|
2-High
|
|
Related Bugs
|
6343810
,
6382902
,
6680485
,
6704896
|
|
Submit Date
|
03-MAR-2008
|
|
Description
|
Customer's app crashes on 1.5.0_12 in various java.net.PlainSocketImpl functions,
while it was fine on 1.5.0_11. There is no simple crash pattern.
The problem is easily reproducible.
Please run through the following steps:
1. Testcase
-----------
Please find attached the following test case:
5607 Mar 3 16:00 SocketTest.java
5328 Mar 3 16: customer cms_test_client.jar
Please note: you will need to have a WebServer running locally on port 80.
2. Run
------
java -classpath </path/to/>cms_test_client.jar testclient.SocketTest 256 5000 10.13
3. crashes appear on 1.5.0_12, _13, _14, and _15
------------------------------------------------
[ ... ]
Got exception with localhost Invalid argument
Got 179 hanging threads
Got exception with localhost Invalid argument
Got exception with localhost Invalid argument
Got exception with localhost Invalid argument
Got exception with localhost Invalid argument
Active = 256 getCompletedTaskCount 35154 getTaskCount 64516 getPoolSize 256
[thread 266 also had an error]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
4. 1.5.0_11 is fine
-------------------
/data/jdk1.5.0_11/bin/java -classpath /net/redback.germany/data/38045863/testcase/cms_test_client.jar testclient.SocketTest 256 5000 10.13
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
[ ... ]
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
SucessFul localhost 80
Active = 0 getCompletedTaskCount 64516 getTaskCount 64516 getPoolSize 256
Finished
%
Posted Date : 2008-03-03 15:58:07.0
|
|
Work Around
|
N/A
|
|
Evaluation
|
Need to check the UseVMInterruptibleIO value before testing _result against OS_INTRPT.
Posted Date : 2008-03-05 14:58:08.0
Instead we may need to verify a first system call actually happened and actually got interrupted before a 2nd connect is attempted on Solaris.
Posted Date : 2008-03-11 22:19:16.0
The fix above needs to go into Hotspot as a separate bug, but it isn't relevant to this problem. This problem is about something going wrong with Hotspot when the network code tries to throw an exception.
Posted Date : 2008-03-26 18:44:29.0
Quoting Steve Goldman on this.
-------- Original Message --------
Subject: Re: 6670408: testcase panics 1.5.0_12&_14 JVM when java.net.PlainSocketImpl trying to throw an exception
Date: Tue, 06 May 2008 15:19:04 -0400
Ok I found the bug. Dave Dice surmised the problem on Friday. So the
problem is in this code
PlainSocketImpl.c
while (1) {
fd_set wr, ex;
FD_ZERO(&wr);
FD_SET(fd, &wr);
FD_ZERO(&ex);
FD_SET(fd, &ex);
the fd goes well past the end of the bitvectors wr/ex. The limit on the
size on 32bits is 1024 bits. If I truss the program I see it get socket
descriptors well past 1024. It finally trips my memory protection check
when it was around 3000. If I hadn't messed up my protection code I
would have found this on Friday.
I looked at the java/io/FileDescriptor and the fd is in fact to large
for the statically allocated bitmap.
Posted Date : 2008-05-07 11:45:08.0
Yes, this is a clear and well known problem/limitation with the select system call. select should be replaced with poll in this case to avoid the limitation of 1024 file descriptors. This would be the preferred solution rather than defining FD_SETSIZE.
It look like this issue is as of a direct result of the library changes for CR 6343810, and any fix for this CR should be backported to update releases where 6343810 has also been fixed.
Posted Date : 2008-05-08 14:28:33.0
|
|
Comments
|
Submitted On 14-APR-2008
Is the bug reported against .11-b03 or .12-b03?
Submitted On 27-JAN-2010
djch
Could someone answer the following two questions:
1) Is this fix available in the JDK Standard Edition release (non-Business edition that is)? I cannot find any reference to this bug being fixed under the "Java(TM) 2 Platform Standard Edition Development Kit 5.0 Update 22" page (http://java.sun.com/j2se/1.5.0/ReleaseNotes.html). However it is referenced under the "Java(TM) Platform, Standard Edition for Business" page (http://java.sun.com/javase/javaseforbusiness/docs/5.0/overview.html)
2) Is the testcase mentioned in this bug available somewhere? I would like to try it.
Thanks.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |