Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
jtsk_1.0, jtsk_1.1, jtsk_1.2, jtsk_2.0, jtsk_2.0_001, jtsk_2.0_002, jtsk_2.0.1, jtsk_2.0.2, jtsk_2.1, River_2.1.1, River_2.1.2, River_2.2.0, River_2.2.1, River_2.2.2
-
None
-
None
-
Export after object construction is complete.
Description
There are numerous occassions where an Exporter is used to export a Remote Object within the constructor allowing "this" to be published prior to the constructor completing.
Recent testing has revealed a failure on the Arm architecture caused by this escaping during construction in LeasedSpaceListener, see qa/src:
com.sun.jini.test.impl.outrigger.leasing.LeasedSpaceListener
and test:
com.sun.jini.test.impl.outrigger.leasing.UseNotifyLeaseTestRenew.td
Although it's too early to confirm 100%, the test appears to be passing now that "this" no longer escapes during construction.
By "this" escaping during construction, the proxy whose field was final appeared not to notify() correctly within a synchronized block, (this test uses notify() every 7ms, so it really gives it a hammering) as a result the test thought the resource was no longer available and failed.
This has wide ranging ramifications for River, as there are multiple instances where "this" is allowed to escape by an Exporter exporting during construction.
The service implementations, Reggie, Outrigger, Norm, Mahalo, Mercury and Fiddler have been fixed in skunk/qa_refactor. However it isn't yet clear how to fix "this" escaping with Activation in Phoenix and ServiceStarter.
There are numerous instances of exporting during construction in the test infrastructure and our examples. These will all need to be fixed prior to releasing River 2.3.0
Attachments
Issue Links
- is part of
-
RIVER-431 Java Memory Model Compliance
- Resolved