<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.jacorb.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://www.jacorb.org/bugzilla/"
          
          maintainer="jacorb@goots.org"
>

    <bug>
          <bug_id>858</bug_id>
          
          <creation_ts>2009-05-29 20:19:10 +0000</creation_ts>
          <short_desc>after org.omg.CORBA.COMM_FAILURE: IOException: java.net.SocketException: Broken pipe  there is no further communication possible between the client and server</short_desc>
          <delta_ts>2011-10-06 15:37:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>JacORB</product>
          <component>SSL/IIOP</component>
          <version>2.3.0 beta 2</version>
          <rep_platform>Sun</rep_platform>
          <op_sys>Solaris</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>708</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Abhishek Singh">asi</reporter>
          <assigned_to name="André Spiegel">spiegel</assigned_to>
          <cc>davidjohn.wilson</cc>
    
    <cc>jacorb</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2366</commentid>
    <comment_count>0</comment_count>
    <who name="Abhishek Singh">asi</who>
    <bug_when>2009-05-29 20:19:10 +0000</bug_when>
    <thetext>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: java.net.SocketException: Socket closed  vmcid: 0x0  minor code: 0  completed: No
        at org.jacorb.orb.etf.ConnectionBase.to_COMM_FAILURE(ConnectionBase.java:143)
        at org.jacorb.orb.etf.StreamConnectionBase.read(StreamConnectionBase.java:109)
        at org.jacorb.orb.giop.GIOPConnection.getMessage(GIOPConnection.java:457)
        at org.jacorb.orb.giop.GIOPConnection.receiveMessages(GIOPConnection.java:517)
        at org.jacorb.orb.giop.MessageReceptor.doWork(MessageReceptor.java:71)
        at org.jacorb.util.threadpool.ConsumerTie.run(ConsumerTie.java:61)
        at java.lang.Thread.run(Thread.java:595)

and

[jacorb.giop.conn] ERROR : Failed to write GIOP message due to COMM_FAILURE
org.omg.CORBA.COMM_FAILURE: IOException: java.net.SocketException: Broken pipe  vmcid: 0x0  minor code: 0  completed: No
        at org.jacorb.orb.etf.ConnectionBase.to_COMM_FAILURE(ConnectionBase.java:143)
        at org.jacorb.orb.etf.StreamConnectionBase.flush(StreamConnectionBase.java:165)
        at org.jacorb.orb.giop.GIOPConnection.sendMessage(GIOPConnection.java:973)
        at org.jacorb.orb.giop.GIOPConnection.sendRequest(GIOPConnection.java:923)
        at org.jacorb.orb.giop.ClientConnection.sendRequest(ClientConnection.java:323)
        at org.jacorb.orb.giop.ClientConnection.sendRequest(ClientConnection.java:304)
        at org.jacorb.orb.Delegate.invoke_internal(Delegate.java:1024)
        at org.jacorb.orb.Delegate.invoke(Delegate.java:939)
        at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
        at org.omg.alu.oam.onebtscom.corba.services.ELEMENT_INTERFACE._ControlRegistrationStub.reRegisterAgent(Unknown Source)
        at com.alu.oam.onebtscom.adapterinterface.CancelRegistrationImpl.callCancelRegistrationOnNE(CancelRegistrationImpl.java:119)
        at com.alu.oam.onebtscom.adapterinterface.CancelRegistrationTaskQueue$WorkerThread.run(CancelRegistrationTaskQueue.java:280)
[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 &quot;Broken Pipe&quot; 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.

Regards,
Abhishek</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2367</commentid>
    <comment_count>1</comment_count>
    <who name="Abhishek Singh">asi</who>
    <bug_when>2009-05-29 20:22:23 +0000</bug_when>
    <thetext>is this issue similar to Bug#:	708 and the same solution can be used here ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2393</commentid>
    <comment_count>2</comment_count>
      <attachid>366</attachid>
    <who name="Alex Hayward">xelah-jacorbbugzilla</who>
    <bug_when>2009-09-07 17:42:55 +0000</bug_when>
    <thetext>Created attachment 366
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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2772</commentid>
    <comment_count>3</comment_count>
    <who name="Nick Cross">jacorb</who>
    <bug_when>2011-10-06 15:36:46 +0000</bug_when>
    <thetext>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 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2775</commentid>
    <comment_count>4</comment_count>
    <who name="Nick Cross">jacorb</who>
    <bug_when>2011-10-06 15:37:33 +0000</bug_when>
    <thetext>*** Bug 880 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>366</attachid>
            <date>2009-09-07 17:42:55 +0000</date>
            <delta_ts>2009-09-07 17:42:55 +0000</delta_ts>
            <desc>Patch to set do_close back to false before reconnecting</desc>
            <filename>patch-reconnectfail</filename>
            <type>text/plain</type>
            <size>1006</size>
            <attacher name="Alex Hayward">xelah-jacorbbugzilla</attacher>
            
              <data encoding="base64">cmMvb3JnL2phY29yYi9vcmIvZ2lvcC9HSU9QQ29ubmVjdGlvbi5qYXZhLm9yaWcgICAgMjAwOS0w
OS0wNyAxNTozNDo0Mi4wMDAwMDAwMDAgKzAwMDAKKysrIHNyYy9vcmcvamFjb3JiL29yYi9naW9w
L0dJT1BDb25uZWN0aW9uLmphdmEgMjAwOS0wOS0wNyAxNTozNTowMy4wMDAwMDAwMDAgKzAwMDAK
QEAgLTkzNSwyMCArOTM1LDIyIEBACiAgICAgICAgICAgICAgICAgICAgIGlmIChsb2dnZXIuaXNE
ZWJ1Z0VuYWJsZWQoKSkKICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAg
ICAgICAgbG9nZ2VyLmRlYnVnCiAgICAgICAgICAgICAgICAgICAgICAgICAoCiAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgdGhpcy50b1N0cmluZygpICsgIjogc2VuZE1lc3NhZ2UoKSAtLSBv
cGVuaW5nIHRyYW5zcG9ydCIKICAgICAgICAgICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAg
ICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgIHN5bmNocm9uaXplZCAoY29ubmVjdF9z
eW5jKQogICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgIGRvX2Ns
b3NlID0gZmFsc2U7CisKICAgICAgICAgICAgICAgICAgICAgICAgIHRyeQogICAgICAgICAgICAg
ICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zcG9ydC5jb25u
ZWN0IChwcm9maWxlLCB0aW1lb3V0KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25u
ZWN0X3N5bmMubm90aWZ5QWxsKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAg
ICAgICAgICAgICAgICAgICBjYXRjaCAoUnVudGltZUV4Y2VwdGlvbiBleCkKICAgICAgICAgICAg
ICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobG9nZ2VyLmlz
RGVidWdFbmFibGVkKCkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBsb2dnZXIuZGVidWcKCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>