The directory /opt/www/bruyninckxh2/web/tmp/drutex-e4f5c8ef83c30da5613810c6d665e92d-1 has been created.

[Bug 566] New: CORBA Connections may cause TRANSIENT exception when server exited

For more infomation about this bug, visit
Summary: CORBA Connections may cause TRANSIENT exception when
server exited
Product: RTT
Version: 1.4.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Corba
AssignedTo: orocos-dev [..] ...
ReportedBy: peter [dot] soetens [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

The RTT::Corba wrapper classes do not handle a TRANSIENT exception correctly
when a connection server (serving a data port or buffer port) is no longer
alive. This causes your program to quit when connectTo() is called on such an
object.

This exception happens when a data flow connection was created from A to B,
then A exits, A is restarted again and wants to connect to B again. It will get
from B the old object reference, which resolves to no existing object and A
will get the TRANSIENT exception when trying to use the object reference.

Before B returns the connection's object reference, it should check its
validity.

[Bug 566] CORBA Connections may cause TRANSIENT exception when s

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |1.6.0

--- Comment #8 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-06-23 10:09:02 ---
(In reply to comment #7)
> After this patch rtt-trunk does not compile anymore, i think it is due to a
> missing file:
>
> rtt-config-compat.h
>
> see message of Markus Eich.
>
> going back to revision 29388 is the only option until Peter adds the forgotten
> file to the svn repository.
>
> I'm reopening this bug until the file is added.
>
> Ruben
>

+ sspr@lt00129:~/src/Orocos/trunk/rtt/src/corba
$ svn ci DataFlowI.cpp -m"Remove buggy 'rtt-config-compat.h' include."
Sending DataFlowI.cpp
Transmitting file data .
Committed revision 29409.

Ruben Smits's picture

[Bug 566] CORBA Connections may cause TRANSIENT exception when s

For more infomation about this bug, visit

Ruben Smits <ruben [dot] smits [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
CC| |ruben [dot] smits [..] ...

--- Comment #7 from Ruben Smits <ruben [dot] smits [..] ...> 2008-06-20 12:06:51 ---
After this patch rtt-trunk does not compile anymore, i think it is due to a
missing file:

rtt-config-compat.h

see message of Markus Eich.

going back to revision 29388 is the only option until Peter adds the forgotten
file to the svn repository.

I'm reopening this bug until the file is added.

Ruben

[Bug 566] CORBA Connections may cause TRANSIENT exception when s

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED

--- Comment #6 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-06-11 22:51:48 ---
Patches applied on trunk/rtt and trunk/ocl. Please check if

1. AutoConnect works (requires at least one to be peer of the other)
2. your applications keep running, even if a client or server quits or
disconnects.

Note: you need to unload manually a 'dead' component proxy with
'unloadComponent("CompName")'. Maybe we should do so automatically as dead
proxies have no meaning or future use in the current mechanism (we don't
re-incarnate servers, which CORBA allows for reviving killed servers).

Peter

$ svn ci rtt/src/ -m\"Apply patch from bug #566:CORBA Connections may cause
TRANSIENT exception when server exited.\"
Sending rtt/src/PortInterface.cpp
Sending rtt/src/TaskContext.cpp
Sending rtt/src/TaskContext.hpp
Sending rtt/src/corba/ControlTaskI.cpp
Sending rtt/src/corba/ControlTaskProxy.cpp
Sending rtt/src/corba/ControlTaskProxy.hpp
Sending rtt/src/corba/ControlTaskServer.cpp
Sending rtt/src/corba/ControlTaskServer.hpp
Sending rtt/src/corba/CorbaBufferProxy.hpp
Sending rtt/src/corba/DataFlowI.cpp
Sending rtt/src/corba/DataFlowI.h
Sending rtt/src/scripting/ExpressionParser.cpp
Sending rtt/src/scripting/PeerParser.cpp
Transmitting file data .............
Committed revision 29389.
+ sspr@lt00129:~/src/Orocos/trunk
$ svn ci ocl/taskbrowser/ ocl/deployment -m"Apply patch from bug #566:CORBA
Connections may cause TRANSIENT exception when server exited."
Sending ocl/deployment/CorbaDeploymentComponent.cpp
Sending ocl/deployment/DeploymentComponent.cpp
Sending ocl/deployment/DeploymentComponent.hpp
Sending ocl/taskbrowser/TaskBrowser.cpp
Transmitting file data ....
Committed revision 29390.

[Bug 566] CORBA Connections may cause TRANSIENT exception when s

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Attachment #322 is|0 |1
obsolete| |

--- Comment #5 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-06-11 22:44:12 ---
Created an attachment (id=325)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=325)
Updated patch for OCL, no code changes

[Bug 566] CORBA Connections may cause TRANSIENT exception when s

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Attachment #321 is|0 |1
obsolete| |

--- Comment #4 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-06-11 22:42:19 ---
Created an attachment (id=324)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=324)
Improves previous patch by also fixing proxy caching

The improvements in this patch should make AutoConnect work again.

[Bug 566] CORBA Connections may cause TRANSIENT exception when s

For more infomation about this bug, visit

--- Comment #3 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-06-10 23:47:49 ---
It was maybe not clear with the patch submissions, but these patches also fix
(as a side effect :-) this bug report. Meaning you can run/quit/kill any Orocos
application which uses dataports and the connection code will handle the proper
connect/disconnect logic. The rule is this:

If you create a connection from write port A -> read port B, then the server is
located in A. If you kill A, B becomes disconnected and the connection is
completely lost. If you kill B, A remains connected and B can attach to that
connection again.

You can experiment with this behaviour in the deployer-corba. I could no longer
cause it to throw uncaught exceptions, no matter how I connected or killed
applications.

The AutoConnect feature is still not fixed yet with these patches.

[Bug 566] CORBA Connections may cause TRANSIENT exception when s

For more infomation about this bug, visit

Peter Soetens

<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|orocos- |peter [dot] soetens [..] ...
|dev [..] ... |

--- Comment #2 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-06-10 23:38:46 ---
Created an attachment (id=322)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=322)
Counterpart of previous patch for OCL

This patch uses the new TaskContext::ready() method to check the validity of a
TaskContext. Both TaskBrowser and Deployer use this to guard/prevent
exceptions.

Also, when AutoUnload is true in the Deployer, proxy task contexts are *not*
stopped or cleaned up, as this is considered the responsibility of the remote
side. I believe this is what a user would expect, that, when a client uses a
remote TaskContext, the server does not die with the client...

Finally, DepoymentComponent::unloadComponent() now also works for an IORFile
based proxy.

[Bug 566] CORBA Connections may cause TRANSIENT exception when s

For more infomation about this bug, visit

--- Comment #1 from Peter Soetens

<peter [dot] soetens [..] ...> 2008-06-10 23:30:30 ---
Created an attachment (id=321)
--> (https://www.fmtc.be/bugzilla/orocos/attachment.cgi?id=321)
Adds several checks for dead connections or dead TaskContexts

This patch for RTT installs the required try{} catch{} blocks in the proxy code
to detect when a server is dead. We can detect (and recover from) lost
taskcontexts and lost data&buffer connections.