Project

General

Profile

Bug #3400

shared variables context for RUN int-proc IN ext-proc-handle is not properly pushed

Added by Constantin Asofiei over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:

History

#1 Updated by Constantin Asofiei over 6 years ago

The main problems I identified are:
  1. a shared-var leak for persistent procedures (they are not being removed when the persistent procedure gets deleted)
  2. in case when prog A is ran persistent and a RUN proc0 IN prog-A-handle runs another program B which uses a new shared var defined by A, program B doesn't see the shared vars defined by A. I think this translates into something like 'SOURCE-PROCEDURE's shared context must be pushed to the stack before invoking something'.

#2 Updated by Constantin Asofiei over 6 years ago

The fixes are in 3394a rev 11225

In the end, the problem was that the lookup for shared vars must be performed on the entire stack of external programs, not just in the current one.

#3 Updated by Greg Shah over 6 years ago

Code Review Task Branch 3394a Revision 11225

1. In ProcedureManager.searchInStack(), why use a map as searched instead of a set?

2. What is the reason behind the change in SVM.scopeDeleted() to return immediately if referent is THIS-PROCEDURE?

#4 Updated by Constantin Asofiei over 6 years ago

Greg Shah wrote:

Code Review Task Branch 3394a Revision 11225

1. In ProcedureManager.searchInStack(), why use a map as searched instead of a set?

Because I wanted to avoid the equality comparison in normal Java sets... it should be faster using identity comparison instead of equals.

2. What is the reason behind the change in SVM.scopeDeleted() to return immediately if referent is THIS-PROCEDURE?

The test is needed for cases when an internal procedure is ran inside the current context (i.e. without persistent support); scopeDeleted notifications are received for every scope, so this will not allow the state to be deleted. But actually, the code should have been referent == ProcedureManager._thisProcedure() && !TransactionManager.isExternalBlock() because otherwise non-persistent external proc state was not cleaned (I got a OOME in MAJIC testing).

#5 Updated by Greg Shah over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

The changes are included in task branch 3394a which has been merged to trunk as revision 11214.

Also available in: Atom PDF