Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 1014 - Connection released by forward request while still in use
Summary: Connection released by forward request while still in use
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: ORB (show other bugs)
Version: 3.5
Hardware: PC Linux
: P5 enhancement
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2015-07-16 21:07 UTC by Vinicius Pinheiro
Modified: 2016-01-28 08:55 UTC (History)
3 users (show)

See Also:


Attachments
Demo code to reproduce the reported behavior (19.54 KB, application/zip)
2015-07-16 21:07 UTC, Vinicius Pinheiro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vinicius Pinheiro 2015-07-16 21:07:04 UTC
Created attachment 467 [details]
Demo code to reproduce the reported behavior

I found this problem when using two threads that make calls to the same CORBA object reference and resolve exceptions from these calls using forward request.

The forward request triggered by one thread makes the ORB to rebind the connection and so it will ask for the release of the connection. The problem is the connection is released while it is still in use by the other thread.

The provided demo is very straightforward. To reproduce the behavior one must only to execute the server application (demo.Server) and the client application (demo.client).

The client and server log are attached to the demo (see files client.out and server.out).

I'm using JacORB 3.5 but I've also tested with JacORB 3.6 and the problem persists.
Comment 1 Nick Cross 2015-07-31 09:44:47 UTC
The problem is if the client is shared a Object between multiple threads it needs to manage any connection issues i.e. if due to a forward request there is a rebind, then that the ORB cannot know that the object has been shared by a user application across multiple threads. One option here would be to use _duplicate so each thread has its own independent reference. (this bears some similarity to Bug 915)
Comment 2 Phil Mesnier 2015-10-01 19:13:40 UTC
This relates exactly to the "ExtraCall" case in bug 1012. The Delegate is arbitrarily closing the old connection when rebinding.
Comment 3 Nick Cross 2016-01-28 08:55:04 UTC
As bug 1012 is now fixed I'm closing this. Please reopen if still an issue.