[Mondrian] Re: VirtualCubeTest.testCalculatedMemberAcrossCubes failing on SMP
michael bienstein
mbienstein at yahoo.fr
Mon Jan 22 15:05:40 EST 2007
I've seen issues with server mode JIT before related to memory boundaries and multiple threads. But that's mutiple threads and it was in JDK 1.4 (the memory model changed in 1.5 I think). The issue is that the instructions in the Java code can be run out of order to the way you've coded them. E.g. a=1; b=2; a=b; can be run just a=2; b=2; because that's what it is equivalent to. The only way to force it to do what you really expected is to synchronize your accesses because that prevents the instruction re-ordering across the memory boundary. This was an issue in Apache Struts at one point because they used a custom Map implementation called "FastHashMap" which gets filled with values and then flipped to be in immutable mode. The problem was that the get() method tested if it was flipped already without synchronizing which looked safe because the flip flag was set only after the insertion code. But the JIT reversed the order and the flip was done before the last
insertions leading to certain problems on high-end servers.
All that's a moot point if we can't see how multiple threads are being used.
Michael
----- Message d'origine ----
De : John V. Sichi <jsichi at gmail.com>
À : Pappyn Bart <Bart.Pappyn at vandewiele.com>
Cc : Mondrian developer mailing list <mondrian at pentaho.org>
Envoyé le : Lundi, 22 Janvier 2007, 20h10mn 24s
Objet : [Mondrian] Re: VirtualCubeTest.testCalculatedMemberAcrossCubes failing on SMP
Something interesting: I noticed that HotSpot was automatically
selecting Server mode on the SMP machine (whereas on my laptop it
autoselects Client mode). I changed build.xml to force usage of Client
mode, and then "ant test" ran through with no failures.
Haven't tried forcing Server mode on laptop yet; if it's timing-related,
it may just be that it takes the combination of a very fast machine plus
Server mode to hit it.
Also, Bart, if you want to send me code modifications to enable tracing
targeted at debugging the problem, please do, and I'll run it through on
the SMP machine and send you the output.
JVS
John V. Sichi wrote:
> Pappyn Bart wrote:
>> John,
>>
>> Could you tell me what kind of OS is running on your
>> 4-way SMP machine ? And on you laptop ?
>
> SMP: Red Hat Enterprise Linux (not sure of version); JVM is HotSpot
> 1.5.0_10-b03
>
> Laptop: Edgy Eft version of Ubuntu Linux; JVM is HotSpot 1.5.0_04-b05
>
> My guess is that it's likely to be a timing-sensitive thing. The
> property trigger stuff looked suspicious, but I tried disabling that out
> and it still happens. I also tried disabling
> testFormatStringExpressionCubeNoCache (since it runs just before and has
> cache disabled on a base cube underlying a virtual cube) but the failure
> still occurred.
>
> JVS
>
_______________________________________________
Mondrian mailing list
Mondrian at pentaho.org
http://lists.pentaho.org/mailman/listinfo/mondrian
___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070122/e595965a/attachment.html
More information about the Mondrian
mailing list