<div dir="ltr"><div><br></div>Your description is exact. <div><br></div><div>I&#39;m a little surprised that no other threads are waiting on that lock. Would you mind sharing the full thread dump? Maybe privately?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 30, 2016 at 11:21 AM, Wright, Jeff <span dir="ltr">&lt;<a href="mailto:jeff.s.wright@truvenhealth.com" target="_blank">jeff.s.wright@truvenhealth.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">There are no other threads waiting on the same monitor. I have 5 thread dumps from 5 different app servers, and all of them have this same pattern. There are
 two Actor threads, one of the Actor threads is blocked on getRolapSchemas() and no other thread references the same monitor.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">From your description, here’s how I imagine things to work with a 5 node cluster and a distributed cache... If a user runs MDX against CatalogA on Node1, the
 results of that query will get added to the distributed segment cache on Node1. The distributed cache will send an event to Nodes 2-5. That event will allow Nodes 2-5 to index the new segments. Indexing will force CatalogA to be loaded on Nodes 2-5, if it’s
 not already loaded. Is that right?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d">--jeff<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> <a href="mailto:mondrian-bounces@pentaho.org" target="_blank">mondrian-bounces@pentaho.org</a> [mailto:<a href="mailto:mondrian-bounces@pentaho.org" target="_blank">mondrian-bounces@pentaho.org</a>]
<b>On Behalf Of </b>Luc Boudreau<br>
<b>Sent:</b> Wednesday, March 30, 2016 10:34 AM<br>
<b>To:</b> Mondrian developer mailing list &lt;<a href="mailto:mondrian@pentaho.org" target="_blank">mondrian@pentaho.org</a>&gt;<br>
<b>Subject:</b> Re: [Mondrian] hanging application: segment cache manager and schema load?<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">This stack tells us that the Actor has received a notification from an external event. A new segment must be indexed. The Actor is waiting on the RolapSchemaPool to free up so that it can grap a Star instance and pin the segment.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What other threads are waiting on that same monitor? (<span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">0x00007f1ad965f000)</span><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Wed, Mar 30, 2016 at 9:14 AM, Wright, Jeff &lt;<a href="mailto:jeff.s.wright@truvenhealth.com" target="_blank">jeff.s.wright@truvenhealth.com</a>&gt; wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">We’ve seen our application hang a couple times. Looking at thread dumps, I’m suspicious of this excerpt:<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">&quot;mondrian.rolap.agg.SegmentCacheManager$ACTOR&quot; daemon prio=10 tid=0x00007f1b34170000 nid=0xf25 waiting for monitor entry [0x00007f1ad965f000]<u></u><u></u></p>
<p class="MsoNormal">   java.lang.Thread.State: BLOCKED (on object monitor)<u></u><u></u></p>
<p class="MsoNormal">                at mondrian.rolap.RolapSchemaPool.getRolapSchemas(RolapSchemaPool.java:420)<u></u><u></u></p>
<p class="MsoNormal">                - waiting to lock &lt;0x00000005e23c2028&gt; (a mondrian.rolap.RolapSchemaPool)<u></u><u></u></p>
<p class="MsoNormal">                at mondrian.rolap.RolapSchema.getRolapSchemas(RolapSchema.java:930)<u></u><u></u></p>
<p class="MsoNormal">                at mondrian.rolap.agg.SegmentCacheManager.getStar(SegmentCacheManager.java:1621)<u></u><u></u></p>
<p class="MsoNormal">                at mondrian.rolap.agg.SegmentCacheManager$Handler.visit(SegmentCacheManager.java:661)<u></u><u></u></p>
<p class="MsoNormal">                at mondrian.rolap.agg.SegmentCacheManager$ExternalSegmentCreatedEvent.acceptWithoutResponse(SegmentCacheManager.java:1222)<u></u><u></u></p>
<p class="MsoNormal">                at mondrian.rolap.agg.SegmentCacheManager$Actor.run(SegmentCacheManager.java:1019)<u></u><u></u></p>
<p class="MsoNormal">                at java.lang.Thread.run(Thread.java:724)<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I don’t fully understand SegmentCacheManager, but based on Julian’s 2012 blog post I get the impression the Actor thread is supposed to run very. If that corresponds to the stack
 trace above, that’s a big problem - we see schema loads take minutes.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">I also see that there were some code changes in August last year for MONDRIAN-2390, to make locking for schema load lower level. We don’t have that code.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Btw we have a distributed cache.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Does it sound like I’m on to a problem in our environment? Maybe even a general problem?<u></u><u></u></p>
<p class="MsoNormal"><span style="color:#888888"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:#888888">--Jeff Wright<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org" target="_blank">Mondrian@pentaho.org</a><br>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a><br>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" rel="noreferrer" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
<br></blockquote></div><br></div>