commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [commit-cp] [bugs #10969] Classpath (+VM) terminates with "broken pi


From: Archie Cobbs
Subject: Re: [commit-cp] [bugs #10969] Classpath (+VM) terminates with "broken pipe"
Date: Thu, 11 Nov 2004 11:38:01 -0600 (CST)

anonymous wrote:
> Original Submission:  System: Linux 2.6.8.1, Big Endian XScale
> Java Env: JamVM 1.2.0 + Classpath 0.11
> 
> We're working on some networking applications on the XScale. From
> time to time we have the problem that JamVM hangs (terminates) with
> a "broken pipe" error message. This happens occasionally when a
> client disconnects from the server (implemented in java, running
> on the XScale). At first we tought that there might be something
> wrong with our java code. But some more testing (along with a code
> review) with Sun's JRE showed that our code seems to be stable (no
> broken pipes or whatever with JRE).
> 
> So I started diging a little into Classpath and managed to nail
> down the location where the "broken pipe" error occurs. It is the
> _javanet_sendto function in native/jni/java-net/javanet.c . There
> the TARGET_NATIVE_NETWORK_SOCKET_SEND (or better: the send function)
> results in a "broken pipe". I'm now thinking that there is something
> going wrong with network data being sent after the socket was taken
> down or something like that.
> 
> What I did as a workaround was adding a signal handler for SIGPIPE.
> There I throw an IO exception to inform the java code that something
> went wrong (see attached patch).

This brings up a good point. In my applications (especially threaded ones)
I've always had to ignore SIGPIPE to avoid this problem by invoking
"signal(SIEPIPE, SIG_IGN);" at the start of the application.

But is ignoring SIGPIPE Classpath's job or the VM's job? I'd guess that
it's really the VM's job to ignore it (or it and throw an IOException,
or whatever).

If so, then should we document this somewhere for VM implementers... ?

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com


*
Confidentiality Notice: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain confidential and 
privileged information. Any unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies of 
the original message.
*





reply via email to

[Prev in Thread] Current Thread [Next in Thread]