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:
test_multiThreaded_scenario1 will fail on a multi core architecture. Yet, test_multiRuns_singleThreaded_scenario1 succeeds and shows that the test implementation is correct.