Read only archive ; use for new issues
Bug 858 - after org.omg.CORBA.COMM_FAILURE: IOException: Broken pipe there is no further communication possible between the client and server
Summary: after org.omg.CORBA.COMM_FAILURE: IOException: Brok...
Status: RESOLVED DUPLICATE of bug 708
Alias: None
Product: JacORB
Classification: Unclassified
Component: SSL/IIOP (show other bugs)
Version: 2.3.0 beta 2
Hardware: Sun Solaris
: P2 blocker
Assignee: André Spiegel
: 880 (view as bug list)
Depends on:
Reported: 2009-05-29 20:19 CEST by Abhishek Singh
Modified: 2011-10-06 15:37 CEST (History)
2 users (show)

See Also:

Patch to set do_close back to false before reconnecting (1006 bytes, patch)
2009-09-07 17:42 CEST, Alex Hayward

Note You need to log in before you can comment on or make changes to this bug.
Description Abhishek Singh 2009-05-29 20:19:10 CEST
we have a client and a server. The client at some point of time, during one of the several communications with server gets exceptions:

org.omg.CORBA.COMM_FAILURE: IOException: Socket closed  vmcid: 0x0  minor code: 0  completed: No
        at org.jacorb.orb.etf.ConnectionBase.to_COMM_FAILURE(
        at org.jacorb.orb.giop.GIOPConnection.getMessage(
        at org.jacorb.orb.giop.GIOPConnection.receiveMessages(
        at org.jacorb.orb.giop.MessageReceptor.doWork(


[jacorb.giop.conn] ERROR : Failed to write GIOP message due to COMM_FAILURE
org.omg.CORBA.COMM_FAILURE: IOException: Broken pipe  vmcid: 0x0  minor code: 0  completed: No
        at org.jacorb.orb.etf.ConnectionBase.to_COMM_FAILURE(
        at org.jacorb.orb.etf.StreamConnectionBase.flush(
        at org.jacorb.orb.giop.GIOPConnection.sendMessage(
        at org.jacorb.orb.giop.GIOPConnection.sendRequest(
        at org.jacorb.orb.giop.ClientConnection.sendRequest(
        at org.jacorb.orb.giop.ClientConnection.sendRequest(
        at org.jacorb.orb.Delegate.invoke_internal(
        at org.jacorb.orb.Delegate.invoke(
        at org.omg.CORBA.portable.ObjectImpl._invoke(
        at Source)
        at com.alu.oam.onebtscom.adapterinterface.CancelRegistrationImpl.callCancelRegistrationOnNE(
        at com.alu.oam.onebtscom.adapterinterface.CancelRegistrationTaskQueue$
[jacorb.giop.conn] ERROR : GIOP connection closed due to errors during sendMessage

and this exception comes at java console of the client and is not caught in the client code even though client catches a generic exception on all server invocations. I get a brand new reference of the server from the naming service.
The new instance of the server is on the IP and port, even then no further commmunication between the client and server is possible and the request processor thread executing the client code dies at the server invocation. I think that once a "Broken Pipe" happens, the socket is dead, and any further reuse by the orb is doomed to failure.  As it is,
once this error happens, only killing and restarting the client resolves
the problem. 

Please help me regarding the issue.

Comment 1 Abhishek Singh 2009-05-29 20:22:23 CEST
is this issue similar to Bug#:	708 and the same solution can be used here ?
Comment 2 Alex Hayward 2009-09-07 17:42:55 CEST
Created attachment 366 [details]
Patch to set do_close back to false before reconnecting

This patch seems to help. It appears that do_close in GIOPConnection is set to true when the transport is being closed (so that other parts of the code stop waiting for it) but never set back to false when a reconnect is due.
Comment 3 Nick Cross 2011-10-06 15:36:46 CEST
After discussion with Andre Spiegel we believe this should be fixed now; please retest with current CVS head and reopen if still an issue (ideally supplying a runnable test case).

*** This bug has been marked as a duplicate of bug 708 ***
Comment 4 Nick Cross 2011-10-06 15:37:33 CEST
*** Bug 880 has been marked as a duplicate of this bug. ***