Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2071747 | 5.0 | Poonam Bajaj Parhar | P3 | Resolved | Fixed | b28 |
JDK-2071746 | 1.4.2_04 | Poonam Bajaj Parhar | P3 | Closed | Fixed | 04 |
JDK-2071745 | 1.4.1_07 | Poonam Bajaj Parhar | P3 | Closed | Fixed | 07 |
escalationID is 547065
My ISV experiences the below problem as below
testcase is in SocketBug.jar
start server from ost.ServerSimulator
start client from ost.ClientSimuator
BUG : in multithreads situation, socket improperly reads data instead of
blocking read or throw exceptions, although lock is designed properly.
Platform: J2SE1.3
Senario:
The bug is reproducible only with the setSOtimeout ,without an setSOtimeout
there is no problem
First ServerSimulator Threads generate many sockets in server side, pass those
sockets to SocketReader Threads and put SocketReaders to a thread pool for
reading
also pass those sockets to SocketCloser threads groups for closing sockets by
putting socketcloser threads into a same threadpool and ServerSimuator Threads
group will also setSoTimeout for every
passed socket , SocketReader thread read data from inputstream completely, it
will notfiy SocketCloser thread to close this socket, then it trys to read 4
bytes data again . at this moment
it should block at p = in.read(data, 0, 4), because client doesnot send data
again.
At this moment, socket could be closed or still open, if socket is closed by
SocketCloser , then IOException should happen at p=in.read(data,0,4). if
blocking time expired, then also IOException will
happen at p=in.read(data,0,4), but SocketReader should never be able to read any
data at in.read(data,0,0,4), but in multi threads situation, it does read data
unexpectedly.
My ISV experiences the below problem as below
testcase is in SocketBug.jar
start server from ost.ServerSimulator
start client from ost.ClientSimuator
BUG : in multithreads situation, socket improperly reads data instead of
blocking read or throw exceptions, although lock is designed properly.
Platform: J2SE1.3
Senario:
The bug is reproducible only with the setSOtimeout ,without an setSOtimeout
there is no problem
First ServerSimulator Threads generate many sockets in server side, pass those
sockets to SocketReader Threads and put SocketReaders to a thread pool for
reading
also pass those sockets to SocketCloser threads groups for closing sockets by
putting socketcloser threads into a same threadpool and ServerSimuator Threads
group will also setSoTimeout for every
passed socket , SocketReader thread read data from inputstream completely, it
will notfiy SocketCloser thread to close this socket, then it trys to read 4
bytes data again . at this moment
it should block at p = in.read(data, 0, 4), because client doesnot send data
again.
At this moment, socket could be closed or still open, if socket is closed by
SocketCloser , then IOException should happen at p=in.read(data,0,4). if
blocking time expired, then also IOException will
happen at p=in.read(data,0,4), but SocketReader should never be able to read any
data at in.read(data,0,0,4), but in multi threads situation, it does read data
unexpectedly.
- backported by
-
JDK-2071747 in with J2se1.3 in multithread situation, socket reads data unexpectly
-
- Resolved
-
-
JDK-2071745 in with J2se1.3 in multithread situation, socket reads data unexpectly
-
- Closed
-
-
JDK-2071746 in with J2se1.3 in multithread situation, socket reads data unexpectly
-
- Closed
-