<div dir="ltr">Looking at [1] you can look for the relevant thread and<div>gdb into it to see what&#39;s it about<br><div><br></div><div><br></div><div>[1] <a href="https://stackoverflow.com/questions/23838498/how-to-diagnose-a-python-process-chewing-cpu-in-linux">https://stackoverflow.com/questions/23838498/how-to-diagnose-a-python-process-chewing-cpu-in-linux</a></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 28 July 2017 at 11:19, Yaniv Kaul <span dir="ltr">&lt;<a href="mailto:ykaul@redhat.com" target="_blank">ykaul@redhat.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 dir="ltr">When running o-s-t, and specifically when running add_secondary_storag, lago command is taking 100% CPU. I&#39;m not sure where and why, and trying to narrow down the relevant threads did not yield a lot - it&#39;s not the Glance related functions, for example.<div><br></div><div>I did try to make some changes to testlib.py, in an effort to reduce what I thought was a tight loop, but it made no effect (nevertheless, I think those are good changes):</div><div><div>[ykaul@ykaul lago-ost-plugin]$ diff -u ovirtlago/testlib.py /usr/lib/python2.7/site-<wbr>packages/ovirtlago/testlib.py</div><div>--- ovirtlago/testlib.py<span style="white-space:pre-wrap">        </span>2017-07-28 11:15:31.506848944 +0300</div><div>+++ /usr/lib/python2.7/site-<wbr>packages/ovirtlago/testlib.py<span style="white-space:pre-wrap">        </span>2017-07-28 09:29:19.403446285 +0300</div><div>@@ -209,7 +209,7 @@</div><div>     return any(True for cls in cls_list if isinstance(obj, cls))</div><div> </div><div> </div><div>-def assert_equals_within(func, value, timeout, allowed_exceptions=None):</div><div>+def assert_equals_within(func, value, timeout, allowed_exceptions=None, initial_wait=15):</div><div>     allowed_exceptions = allowed_exceptions or []</div><div>     with utils.EggTimer(timeout) as timer:</div><div>         while not timer.elapsed():</div><div>@@ -219,12 +219,17 @@</div><div>                     return</div><div>             except Exception as exc:</div><div>                 if _instance_of_any(exc, allowed_exceptions):</div><div>+                    time.sleep(3)</div><div>                     continue</div><div> </div><div>                 LOGGER.exception(&quot;Unhandled exception in %s&quot;, func)</div><div>                 raise</div><div> </div><div>-            time.sleep(3)</div><div>+            if initial_wait == 0:</div><div>+                time.sleep(3)</div><div>+            else:</div><div>+                time.sleep(initial_wait)</div><div>+                initial_wait = 0</div><div>     try:</div><div>         raise AssertionError(</div><div>             &#39;%s != %s after %s seconds&#39; % (res, value, timeout)</div></div><div><br></div><div><br></div><div><br></div><div>Any ideas how to debug this? I&#39;m on F26, with latest Lago.</div><span class="HOEnZb"><font color="#888888"><div>Y.</div><div><br></div></font></span></div>
<br>______________________________<wbr>_________________<br>
lago-devel mailing list<br>
<a href="mailto:lago-devel@ovirt.org">lago-devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/lago-devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/lago-devel</a><br>
<br></blockquote></div><br></div>