You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Torstein Olsen <To...@nb.no> on 2003/12/09 14:44:43 UTC

Possible deadlock

We have a curious problem that we can reproduce and pinpoint where it
happens, but haven't been able to fix.

We try to use Axis to transfer quite large files as attachments > 2Gb.

When the transfer is nearly complete both client and server hang.

We have narrowed the problem down to the following areas:

Server:
  In class "org.apache.axis.attachments.BoundaryDelimitedStream" the
server hangs on the line (266):

	br = is.read(b, brTotal + start, length - brTotal);

in the method "ReadFromStream"

Client:
  In class "org.apache.axis.transport.http.HTTPSender" the client hangs
on the line (508):

	b = (byte) inp.read();

in the method "readHeadersFromSocket"

When we look through the code it looks as though the client has finished
writing the data to the outputstream and waits for a reply from the
server. 

At the same time the servers hasn't received the last block of the file
and waits for "eos".

This only occurs when the attachment is over 2Gb which leads us to a
possible conclision that there is and int value involved somewhere that
should have been a long.

We have found and fixed a similar error in the ManagedMemoryDataSource
class, but obviously there is at least one more.

Any suggestions as to where we should look will be appreciated.

tia
-- 
Torstein Olsen <to...@nb.no>
NB

Re: Possible deadlock

Posted by Davanum Srinivas <di...@yahoo.com>.
Can you please send us the patch for "fixed a similar error in the ManagedMemoryDataSource"?
Usually we use bugzilla to report problems so that we don't lose track of it. 

http://ws.apache.org/axis/bugs.html
http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/SubmitPatches

Thanks,
dims

--- Torstein Olsen <To...@nb.no> wrote:
> We have a curious problem that we can reproduce and pinpoint where it
> happens, but haven't been able to fix.
> 
> We try to use Axis to transfer quite large files as attachments > 2Gb.
> 
> When the transfer is nearly complete both client and server hang.
> 
> We have narrowed the problem down to the following areas:
> 
> Server:
>   In class "org.apache.axis.attachments.BoundaryDelimitedStream" the
> server hangs on the line (266):
> 
> 	br = is.read(b, brTotal + start, length - brTotal);
> 
> in the method "ReadFromStream"
> 
> Client:
>   In class "org.apache.axis.transport.http.HTTPSender" the client hangs
> on the line (508):
> 
> 	b = (byte) inp.read();
> 
> in the method "readHeadersFromSocket"
> 
> When we look through the code it looks as though the client has finished
> writing the data to the outputstream and waits for a reply from the
> server. 
> 
> At the same time the servers hasn't received the last block of the file
> and waits for "eos".
> 
> This only occurs when the attachment is over 2Gb which leads us to a
> possible conclision that there is and int value involved somewhere that
> should have been a long.
> 
> We have found and fixed a similar error in the ManagedMemoryDataSource
> class, but obviously there is at least one more.
> 
> Any suggestions as to where we should look will be appreciated.
> 
> tia
> -- 
> Torstein Olsen <to...@nb.no>
> NB


=====
Davanum Srinivas - http://webservices.apache.org/~dims/