[jboss-remoting-issues] [JBoss JIRA] (JBREM-1303) Channel's CloseHandler is not invoked on the server side if the client side channel disconnects

jaikiran pai (Commented) (JIRA) jira-events at lists.jboss.org
Thu Oct 13 10:54:16 EDT 2011


    [ https://issues.jboss.org/browse/JBREM-1303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12634611#comment-12634611 ] 

jaikiran pai commented on JBREM-1303:
-------------------------------------

IRC discussion:

{quote}
(08:05:09 IST) Jaikiran: dmlloyd: so here's an issue that i'm currently seeing
(08:05:16 IST) Jaikiran: actually let me get the remoting code
(08:05:24 IST) dmlloyd: next time misty is on, someone point her in the direction of ##java, there's lots of helpful folks in there
(08:07:03 IST) Jaikiran: assume a scenario where a remote client has opened a channel communication with the server side
(08:07:28 IST) Jaikiran: the communication goes on fine for a while and then the client decides to shutdown
(08:07:55 IST) Jaikiran: i'm seeing that on the server side, the channel's CloseHandler's don't get any notification about this
(08:08:05 IST) dmlloyd: that'd be a bug
(08:08:15 IST) Jaikiran: and when at a later point they try to write to the channel it throws up a channel closed error
(08:08:22 IST) Jaikiran: thought so.
(08:08:33 IST) Jaikiran: a bit of digging around showed up this class
(08:08:46 IST) Jaikiran: https://github.com/jboss-remoting/jboss-remoting/blob/master/src/main/java/org/jboss/remoting3/remote/RemoteReadListener.java#L50
(08:09:09 IST) mgoldmann left the room (quit: Read error: Connection reset by peer).
(08:09:27 IST) Jaikiran: which calls RemotingConnectionHandler.handleClose() which ultimately calls the closeAllChannels() which just marks a "writeClosed" flag of that channel to true and returns
(08:09:28 IST) dmlloyd: handler.handleClose() should be tearing down all the channels and closing them
(08:09:31 IST) mgoldmann [~mgoldmann at redhat/jboss/mgoldmann] entered the room.
(08:09:31 IST) mode (+v mgoldmann) by ChanServ
(08:09:34 IST) dmlloyd: ah
(08:09:48 IST) dmlloyd: yeah it should do more than that, it should atomically call each close handler
(08:10:26 IST) Jaikiran: yeah, right now it just does https://github.com/jboss-remoting/jboss-remoting/blob/master/src/main/java/org/jboss/remoting3/remote/RemoteConnectionHandler.java#L187
(08:10:40 IST) kkhan left the room (quit: Ping timeout: 244 seconds).
(08:10:50 IST) Jaikiran: is there a difference in semantics (not impl) between handleRemoteClose and an actual closeAction on the channel?
{quote}

                
> Channel's CloseHandler is not invoked on the server side if the client side channel disconnects
> -----------------------------------------------------------------------------------------------
>
>                 Key: JBREM-1303
>                 URL: https://issues.jboss.org/browse/JBREM-1303
>             Project: JBoss Remoting
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: jaikiran pai
>
> If a client side Channel disconnects (ex: the client program terminates) the server side Channel's CloseHandler(s) are not invoked. As a result, if the server side Channel is later used for writing out messages it runs into a Channel closed exception:
> {code}
> org.jboss.remoting3.NotOpenException: JBREM00206: Channel is not open
> 	at org.jboss.remoting3.remote.RemoteLogger_$logger.channelNotOpen(RemoteLogger_$logger.java:97) [jboss-remoting-3.2.0.Beta2.jar:3.2.0.Beta2]
> 	at org.jboss.remoting3.remote.RemoteConnectionChannel.writeMessage(RemoteConnectionChannel.java:86) [jboss-remoting-3.2.0.Beta2.jar:3.2.0.Beta2]
> 	at org.jboss.as.ejb3.remote.protocol.versionone.VersionOneProtocolChannelReceiver.sendModuleAvailability(VersionOneProtocolChannelReceiver.java:183) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
> 	at org.jboss.as.ejb3.remote.protocol.versionone.VersionOneProtocolChannelReceiver.deploymentAvailable(VersionOneProtocolChannelReceiver.java:161) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
> 	at org.jboss.as.ejb3.deployment.DeploymentRepository.add(DeploymentRepository.java:57) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
> 	at org.jboss.as.ejb3.deployment.ModuleDeployment.start(ModuleDeployment.java:49) [jboss-as-ejb3-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]
> 	at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-remoting-issues mailing list