Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
2.7.2, 8.2.1
-
Unknown
-
Description
XWikiDocument class is not thread safe. Thus XWikiDocument objects created and loaded without any synchronisation in loadXWikiDoc XWikiHibernateStore lack memory visibility guaranties. These objects are added to the XWikiCacheStore (normally Jboss implementation) again without any synchronization. Hence the XWikiDocument object which is possibly incompletely written to the main memory, is publish to multiple threads by adding to the cache (e.g. jbosscache). All threads running on a different cpu core (multicore architecture) may see an incomplete version of the loaded XWikiDocument object.
There is a junit test proving the broken multi core multi-threaded situation:
ConcurrentCacheTest.java
test_multiThreaded_scenario1 will fail on a multi core architecture. Yet, test_multiRuns_singleThreaded_scenario1 succeeds and shows that the test implementation is correct.
Attachments
Issue Links
- depends on
-
XWIKI-13632 Wrong key generation in XWikiCacheStore
- Closed
- is related to
-
XWIKI-13473 Exception when the same document is saved at the same time in 2 different threads
- Closed