Some pointers for valgrind + python here:<br><br><a href="http://svn.python.org/projects/python/trunk/Misc/README.valgrind">http://svn.python.org/projects/python/trunk/Misc/README.valgrind</a><br><a href="http://svn.python.org/projects/python/trunk/Misc/valgrind-python.supp">http://svn.python.org/projects/python/trunk/Misc/valgrind-python.supp</a><br>
<br><br><div class="gmail_quote">On Thu, Mar 20, 2008 at 7:36 AM, Steve Lime &lt;<a href="mailto:Steve.Lime@dnr.state.mn.us">Steve.Lime@dnr.state.mn.us</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hasn&#39;t been much of a help when the problem could be in code linked to python. I can&#39;t get any<br>
output from just wrapping the call to tilecache_seed.py in valgrind. I&#39;m probably using it wrong<br>
though so will have to research more.<br>
<br>
Steve<br>
<br>
&gt;&gt;&gt; On 3/19/2008 at 1:33 PM, in message &lt;<a href="mailto:47E15C82.4020404@saucontech.com">47E15C82.4020404@saucontech.com</a>&gt;, Mark<br>
<div><div></div><div class="Wj3C7c">Deneen &lt;<a href="mailto:mdeneen+tiles@saucontech.com">mdeneen+tiles@saucontech.com</a>&gt; wrote:<br>
&gt; I have not been following this thread very carefully, but valgrind<br>
&gt; (<a href="http://www.valgrind.org" target="_blank">www.valgrind.org</a>) is a wonderful tool for finding leaks. &nbsp;It may be a<br>
&gt; bit more low-level than you want for this purpose... &nbsp;but I would give<br>
&gt; it a shot.<br>
&gt;<br>
&gt; Mark<br>
&gt;<br>
&gt;<br>
&gt; Steve Lime wrote:<br>
&gt;&gt; I just tried rebuilding the mapscript bindings with the latest version of<br>
&gt; Swig and the more<br>
&gt;&gt; advanced interface. No luck.<br>
&gt;&gt;<br>
&gt;&gt; In my case the mapfile is made up of a bunch of includes so perhaps there is<br>
&gt; a leak there. I&#39;ll<br>
&gt;&gt; try expanding those and see what happens.<br>
&gt;&gt;<br>
&gt;&gt; Steve<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On 3/19/2008 at 12:58 PM, in message &lt;<a href="mailto:20080319175857.GA23409@metacarta.com">20080319175857.GA23409@metacarta.com</a>&gt;,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt; Christopher Schmidt &lt;<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; On Wed, Mar 19, 2008 at 12:34:21PM -0500, Steve Lime wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; The backtrace output is below. I don&#39;t think it tells me much. It&#39;s dying in<br>
&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt; MapServer but I think it&#39;s because<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; there simply isn&#39;t any more memory to allocate so a small malloc fails<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt; (there is no error check) and then the<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; fread causes the segfault. The question is why there is no memory. When I<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt; run the seeding the python<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; process the python process memory usage swells to 1.4Gb. I&#39;ve tried with and<br>
&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt; without metatiling, same<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; result. There must be a leak someplace. Any idea how to debug?<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt; Yeah, clearly there&#39;s a memory leak: I don&#39;t hae any idea where it is<br>
&gt;&gt;&gt; though, nor do I have any suggestions on how to debug. Keeping the map<br>
&gt;&gt;&gt; object open might actually help in this case, because if there&#39;s a leak<br>
&gt;&gt;&gt; somewhere in the mapObj open (something not gtting freed), it would be<br>
&gt;&gt;&gt; less prominent if we weren&#39;t constantly recreating the mapObj, yeah?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Tilecache mailing list<br>
&gt;&gt; <a href="mailto:Tilecache@openlayers.org">Tilecache@openlayers.org</a><br>
&gt;&gt; <a href="http://openlayers.org/mailman/listinfo/tilecache" target="_blank">http://openlayers.org/mailman/listinfo/tilecache</a><br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Tilecache mailing list<br>
&gt; <a href="mailto:Tilecache@openlayers.org">Tilecache@openlayers.org</a><br>
&gt; <a href="http://openlayers.org/mailman/listinfo/tilecache" target="_blank">http://openlayers.org/mailman/listinfo/tilecache</a><br>
<br>
_______________________________________________<br>
Tilecache mailing list<br>
<a href="mailto:Tilecache@openlayers.org">Tilecache@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/tilecache" target="_blank">http://openlayers.org/mailman/listinfo/tilecache</a><br>
</div></div></blockquote></div><br>