Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 940 - relative timeout exceed with interceptors
Summary: relative timeout exceed with interceptors
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: ORB (show other bugs)
Version: 3.2
Hardware: PC All
: P1 normal
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2013-01-25 13:48 UTC by Corsaire
Modified: 2015-01-21 16:06 UTC (History)
3 users (show)

See Also:


Attachments
test case (9.05 KB, application/zip)
2013-02-07 10:08 UTC, Corsaire
Details
test case (8.20 KB, application/zip)
2013-02-07 10:13 UTC, Corsaire
Details
patch attachment (21.39 KB, patch)
2013-03-04 11:21 UTC, Corsaire
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Corsaire 2013-01-25 13:48:30 UTC
We are using relative timeouts with interceptors. On the logs timeouts seem to be reached but on reality they don't.

Analysis of the problem:
We are using RELATIVE_REQ_TIMEOUT_POLICY_TYPE policy by code (Orb.create_policy() method).
Within interceptors we call another corba services. For instance we call the jacorb naming service, calling the resolve method on _NamingContextStub (JacORB IDL compiler V 3.2).
This has the effect to call the Delegate.request() method with key "interceptor_call" on the thread context and to set clearCurrentContext attribute to false. A main error is that, clearCurrentContext attribute is never set to true later (and clearCurrentContext should be an attribute of the current thread), and as Delegate is a singleton class, some independant calls of request method by other class in another threads should not clear the thread context on invoke_internal methods (and time end resquet infomations). Then on new call of request method, the request end time still exists on the thread context and is not replaced by a new one computed. So with ellapsed time, because these request end times are never removed or replaced, finally we get allways exceptions on line 2209.
Comment 1 Nick Cross 2013-01-25 14:35:45 UTC
Can you provide a standalone compilable test case?
Comment 2 Corsaire 2013-02-07 10:08:10 UTC
Created attachment 406 [details]
test case

Problem rises when we use same Delegate class after interceptor call and we do some calls on the same thread.
Comment 3 Corsaire 2013-02-07 10:13:39 UTC
Created attachment 407 [details]
test case

A compilation error was present on last one attachment.
Comment 4 Corsaire 2013-03-04 11:21:12 UTC
Created attachment 409 [details]
patch attachment

This patch is a proposal correction for 940.
I submited this correction within zecorsaire/JacORB branch too.
Comment 5 Nick Cross 2013-09-15 03:12:07 UTC
Have been unable to reliably reproduce a problem with the attached test case. Please elaborate what it is supposed to show.
Comment 6 Nick Cross 2013-10-21 11:38:59 UTC
Downgrading priority until submitter can clarify the problem.
Comment 7 Nick Cross 2015-01-21 16:06:18 UTC
Applied a possible fix in SHA 842e2eaf6fb25c446063acce894b2c01f50f1945