[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commit-cp] [bugs #10969] Classpath (+VM) terminates with "broken pipe"
From: |
anonymous |
Subject: |
[commit-cp] [bugs #10969] Classpath (+VM) terminates with "broken pipe" |
Date: |
Thu, 11 Nov 2004 12:23:16 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041030 Firefox/1.0RC1 (Debian package 0.99+1.0RC1-2) |
This mail is an automated notification from the bugs tracker
of the project: classpath.
/**************************************************************************/
[bugs #10969] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=10969>
Project: classpath
Submitted by: 0
On: Thu 11/11/2004 at 17:16
Category: classpath
Severity: 5 - Average
Resolution: None
Privacy: Public
Assigned to: None
Status: Open
Platform Version: None
Summary: Classpath (+VM) terminates with "broken pipe"
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).
I'm very well aware that this is just a workaround but no real solution.
In my opinion it is not ok that Classpath fails the way it does. Even if
someone attempts to send data over a closed socket (what we think we are not
doing - at least not a the java level and the Sun JRE doesn't say anything like
that either) Classpath shouldn't and take down the whole VM with it. What I
would have expected is throwing some kind of
exception to let the java programmer know that there is something going wrong.
Tom Winkler
address@hidden
File Attachments
-------------------
-------------------------------------------------------
Date: Thu 11/11/2004 at 17:16 Name: classpath_sigpipe_handler.patch Size:
1.34KB By: None
The attached patch catches the SIGPIPE signal and throws an IO_EXCEPTION
instead of hanging the VM.
http://savannah.gnu.org/bugs/download.php?item_id=10969&item_file_id=1865
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=10969>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [commit-cp] [bugs #10969] Classpath (+VM) terminates with "broken pipe",
anonymous <=