CDV ❯ NullPointerException if ConcurrentStringMapDso is unshared
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Fixed
-
-
-
hsingh
-
Reporter: teck
-
February 17, 2009
-
0
-
Watchers: 0
-
February 12, 2013
-
February 27, 2009
Attachments
Description
To re-create this problem run a program the creates a new ConcurrentStringMap in a TC enabled L1 process, but don’t shared the map. The ensureDisabledAutolocking() method looks like it always assume “this” is shared object
Exception in thread “main” java.lang.NullPointerException at org.terracotta.modules.concurrent.collections.ConcurrentStringMapDso.ensureDisabledAutolocking(ConcurrentStringMapDso.java:63) at org.terracotta.modules.concurrent.collections.ConcurrentStringMapDso.size(ConcurrentStringMapDso.java:195) at org.terracotta.modules.concurrent.collections.ConcurrentStringMap.size(ConcurrentStringMap.java:182) at org.terracotta.modules.tccache.StoreImpl.size(StoreImpl.java:152) at org.terracotta.modules.tccache.TCDistributedCacheImpl.size(TCDistributedCacheImpl.java:166) at Tim.main(Tim.java:6)
Comments
Fiona OShea 2009-02-18
Chris Dennis 2009-02-24
This should be fixed in the NBHM backed CSM - attaching issue for creating NBHM backed CSM.
Chris Dennis 2009-02-27
Fixed in new version of CSM, test coverage added in r14295.
Himadri Singh 2009-03-23
The test written to replicate the issue. tc-config.xml is also attached to run it. The map is not shared through tc-config.xml
Himadri Singh 2009-03-23
- Start terracotta server
- Run the test Sample
Logs for terracotta 2.7.3-ee C:\Terracotta\terracotta-2.7.3-ee\bin>dso-java.bat -cp ..\modules\org\terracotta\modules\tim-concurrent-collections\1.0.2\tim-concurrent-collections-1.0.2.jar;. Sample Starting Terracotta client… 2009-03-23 13:55:25,078 INFO - Terracotta Enterprise 2.7.3, as of 20090121-100140 (Revision 3286-11331 by cruise@WXPMO0 from 2.7) 2009-03-23 13:55:25,953 INFO - Configuration loaded from the file at ‘C:\Terracotta\terracotta-2.7.3-ee\bin\tc-config.xml’. 2009-03-23 13:55:26,796 INFO - Log file: ‘C:\Terracotta\terracotta-2.7.3-ee\bin\logs-10.1.1.4\terracotta-client.log’. 2009-03-23 13:55:29,921 INFO - Statistics buffer: ‘C:\Terracotta\terracotta-2.7.3-ee\bin\statistics-10.1.1.4’. 2009-03-23 13:55:30,359 INFO - Connection successfully established to server at 127.0.0.1:9510 Exception in thread “main” java.lang.NullPointerException at org.terracotta.modules.concurrent.collections.ConcurrentStringMapDso.ensureDisabledAutolocking(ConcurrentStringMapDso.java:63) at org.terracotta.modules.concurrent.collections.ConcurrentStringMapDso.size(ConcurrentStringMapDso.java:195) at org.terracotta.modules.concurrent.collections.ConcurrentStringMap.size(ConcurrentStringMap.java:182) at Sample.run(Sample.java:13) at Sample.main(Sample.java:20)
Logs for terracotta-3.0.0-stable1 rev12200
C:\Terracotta\terracotta-3.0.0-stable1-ee\bin>dso-java.bat -cp ..\modules\org\terracotta\modules\tim-concurrent-collections\1.1.0-SNAPSHOT\tim-concurrent-collections-1.1.0-SNAPSHOT.jar;. Sample Starting Terracotta client… 2009-03-23 14:00:38,125 INFO - Terracotta Enterprise 3.0.0-stable1, as of 20090318-130357 (Revision 3755-12200 by cruise@su10mo5 from 3.0) 2009-03-23 14:00:39,718 INFO - Configuration loaded from the file at ‘C:\Terracotta\terracotta-3.0.0-stable1-ee\bin\tc-config.xml’. 2009-03-23 14:00:40,515 INFO - Log file: ‘C:\Terracotta\terracotta-3.0.0-stable1-ee\bin\logs-10.1.1.4\terracotta-client.log’. 2009-03-23 14:00:46,453 INFO - Connection successfully established to server at 10.1.1.4:9510 Size of the map :0
Verified.
If this is easy to fix do in Quintara. If not re-assign to DRB and we will retarget