This sounds like you are using non-native threads as I've seen this
behaviour in other languages besides Java if you don't use the native
threads model.
If non-native threads are being used when a thread reschedule arrives
it causes recv operations to be interrupted with an errno of EINTR
(interrupted system call) this will presumably throw a Java exception.
The correct behaviour is usually to recall the operation following this
error number being produced.

This may not be the problem at all of course!

Rob Kirkbride

> -----Original Message-----
> From: Santosh Dawara
> Sent: 15 December 2000 11:08
> To: udo k schuermann; KIRKBRIDE Rob ([EMAIL PROTECTED])
> Cc: [EMAIL PROTECTED]
> Subject: Re: Socket Exception out of Nowhere !!
>
>
>
> Phew, I thought someone unsubscribed me from the list because of
> the question, I had not received any reply for four days straight.
>
> To be honest I can't retry the read operation because I would
> go into a Hard loop if a real SocketException occured due to
> some other reason. So I will use a count to keep track of the
> number of times it occured.
>
> Anyhow, the reason why this happens is still not clear.
> Someone here must have something to say about this. I have
> never seen this happen on Windows.
>
> Thanks,
> Santosh Dawara.
> http://cravelinux.cjb.net
>
> Udo K Schuermann wrote:
> >
> > I don't know if my own experience has a significantly
> different cause,
> > but I get a SocketException with a "Resource temporarily
> unavailable"
> > message if I'm waiting for input and the thread is
> interrupted. Merely
> > catching the exception and retrying the read operation is
> all that is
> > required; what the interruption allows you to do is respond to the
> > interrupt if necessary.
> >
> > Perhaps that helps?
> >
> > -- -
> >  |._.|_  Udo K. Schuermann        "The future's not what it
> used to be."
> >  |( )| ) [EMAIL PROTECTED]         -- G'Kar, Babylon 5,
> "The Long Dark"
> >  |_:_|/  Senior Software Engineer, Blackboard Inc.      Sum
> ergo cogito!
> >  Blackboard - Bringing Education Online ----->
> http://www.Blackboard.com
> >
> > > Date: Tue, 12 Dec 2000 11:51:11 +0530
> > > From: Santosh Dawara <[EMAIL PROTECTED]>
> > > Subject: Socket Exception out of Nowhere !!
> > >
> > > Hi All,
> > > ...
> > >  I noticed that, if one session is active, and
> > >  If I open another session with the Server, a SocketException
> > >  is thrown in the existing session.
> > >
> > >  Reproduced below is the relevant stack trace:
> > >  java.net.SocketException: Interrupted system call
> > >       at java.net.SocketInputStream.socketRead(Native Method)
> > >       at
> java.net.SocketInputStream.read(SocketInputStream.java:90)
> > >       at
> java.net.SocketInputStream.read(SocketInputStream.java:71)
> > >       at
> java.io.InputStreamReader.fill(InputStreamReader.java:163)
> > >       at
> java.io.InputStreamReader.read(InputStreamReader.java:239)
> > >       at java.io.BufferedReader.fill(BufferedReader.java:137)
> > >       at java.io.BufferedReader.read(BufferedReader.java:154)
> >
> >
> ----------------------------------------------------------------------
> > To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>
> <<< ====================  Original Email Header
> ==================== >>>
>
> Received: from punt-1.mail.demon.net by mailstore for
> [EMAIL PROTECTED]
>           id 976861832:10:08084:7; Fri, 15 Dec 2000 06:30:32 GMT
> Received: from karlasha.2kweb.net ([192.41.21.66]) by
> punt-1.mail.demon.net
>            id aa1105140; 15 Dec 2000 6:30 GMT
> Received: (karlasha@localhost) by karlasha.2kweb.net (8.8.5)
> id WAA28965; Thu, 14 Dec 2000 22:36:31 -0700 (MST)
> Resent-Date: Thu, 14 Dec 2000 22:36:31 -0700 (MST)
> Sender: [EMAIL PROTECTED]
> Message-ID: <[EMAIL PROTECTED]>
> Date: Fri, 15 Dec 2000 11:08:47 +0530
> From: Santosh Dawara <[EMAIL PROTECTED]>
> Organization: Persistent Systems
> X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.16-3 i686)
> X-Accept-Language: en
> MIME-Version: 1.0
> To: Udo K Schuermann <[EMAIL PROTECTED]>
> CC: [EMAIL PROTECTED]
> Subject: Re: Socket Exception out of Nowhere !!
> References: <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> Resent-Message-ID: <[EMAIL PROTECTED]>
> Resent-From: [EMAIL PROTECTED]
> X-Mailing-List: <[EMAIL PROTECTED]> archive/latest/4959
> X-Loop: [EMAIL PROTECTED]
> Precedence: list
> Resent-Sender: [EMAIL PROTECTED]
>
>




----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to