<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Fast turnaround for leak bugs</title>
	<atom:link href="http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/</link>
	<description>Jesse Ruderman on Firefox, security, and more</description>
	<pubDate>Mon, 08 Sep 2008 03:35:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Ashish Yadav</title>
		<link>http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-4008</link>
		<dc:creator>Ashish Yadav</dc:creator>
		<pubDate>Mon, 08 Oct 2007 08:32:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-4008</guid>
		<description>Hi,

Congratulation on starting this memory leak roundup.

How about running static code analyzers as well on Mozilla code? This may sound a bit old fashioned however testing for bugs is rather limited by test-cases, scenarios and tools available. Running static code analyzer can probably be worth trying along with these.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Congratulation on starting this memory leak roundup.</p>
<p>How about running static code analyzers as well on Mozilla code? This may sound a bit old fashioned however testing for bugs is rather limited by test-cases, scenarios and tools available. Running static code analyzer can probably be worth trying along with these.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Ruderman</title>
		<link>http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-4000</link>
		<dc:creator>Jesse Ruderman</dc:creator>
		<pubDate>Thu, 04 Oct 2007 22:36:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-4000</guid>
		<description>Arjen, there are many reasons that might happen: malloc fragmentation, caching (reasonable or unreasonable), or a leak.

First of all, you're using a recent trunk version of Firefox, right?  Because looking for leaks in Firefox 2 is more or less pointless at this time :)

For large increases in memory usage, an easy test is to do is to do the same thing (open a tab, load the page in question, close the tab) five or ten times, watching memory usage.  Does memory use keep going up, or does it level off?  If it levels off, it's not a leak, and is probably caching or malloc fragmentation.

If you see that memory usage keeps going up, there's a good chance you've found a leak.  You could file a bug report at this point, noting that memory use keeps going up, but the bug is more likely to be fixed quickly if you include information from one of our &lt;a href="http://wiki.mozilla.org/Performance:Leak_Tools" rel="nofollow"&gt;leak tools&lt;/a&gt; showing that it's definitely a leak.

If leak-gauge.pl or trace-refcnt or trace-malloc says what objects leak, you have a great bug report and it's very likely to be fixed before we ship Firefox 3.  leak-gauge.pl is pretty easy to run but only finds certain large leaks; the others are progressively harder to run and find progressively "smaller" leaks.

If none of those tools shows a leak, it could still be a leak-until-shutdown.  These bugs are harder to diagnose; I think the preferred tool is diffbloatdump.pl (which requires a trace-malloc build).

Having simple steps-to-reproduce is important, too.  Having a simple testcase is nice but isn't as important for leak bugs as it is for most other types of bugs.</description>
		<content:encoded><![CDATA[<p>Arjen, there are many reasons that might happen: malloc fragmentation, caching (reasonable or unreasonable), or a leak.</p>
<p>First of all, you&#8217;re using a recent trunk version of Firefox, right?  Because looking for leaks in Firefox 2 is more or less pointless at this time :)</p>
<p>For large increases in memory usage, an easy test is to do is to do the same thing (open a tab, load the page in question, close the tab) five or ten times, watching memory usage.  Does memory use keep going up, or does it level off?  If it levels off, it&#8217;s not a leak, and is probably caching or malloc fragmentation.</p>
<p>If you see that memory usage keeps going up, there&#8217;s a good chance you&#8217;ve found a leak.  You could file a bug report at this point, noting that memory use keeps going up, but the bug is more likely to be fixed quickly if you include information from one of our <a href="http://wiki.mozilla.org/Performance:Leak_Tools" rel="nofollow">leak tools</a> showing that it&#8217;s definitely a leak.</p>
<p>If leak-gauge.pl or trace-refcnt or trace-malloc says what objects leak, you have a great bug report and it&#8217;s very likely to be fixed before we ship Firefox 3.  leak-gauge.pl is pretty easy to run but only finds certain large leaks; the others are progressively harder to run and find progressively &#8220;smaller&#8221; leaks.</p>
<p>If none of those tools shows a leak, it could still be a leak-until-shutdown.  These bugs are harder to diagnose; I think the preferred tool is diffbloatdump.pl (which requires a trace-malloc build).</p>
<p>Having simple steps-to-reproduce is important, too.  Having a simple testcase is nice but isn&#8217;t as important for leak bugs as it is for most other types of bugs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arjen</title>
		<link>http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-3997</link>
		<dc:creator>Arjen</dc:creator>
		<pubDate>Thu, 04 Oct 2007 09:38:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-3997</guid>
		<description>Jesse,

I have a question whether some stuff is regarded as a memory like by the Firefox developers:

If you open a tab, browser around a bit and then close a tab, the Firefox process is consuming more memory then before the tab was opened (even with browser.sessionhistory.max_total_viewers set to 0).

Does this mean Firefox is leaking memory? Or are the other reasons memory consumption could have increased (loaded plugins)?</description>
		<content:encoded><![CDATA[<p>Jesse,</p>
<p>I have a question whether some stuff is regarded as a memory like by the Firefox developers:</p>
<p>If you open a tab, browser around a bit and then close a tab, the Firefox process is consuming more memory then before the tab was opened (even with browser.sessionhistory.max_total_viewers set to 0).</p>
<p>Does this mean Firefox is leaking memory? Or are the other reasons memory consumption could have increased (loaded plugins)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Ruderman</title>
		<link>http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-3996</link>
		<dc:creator>Jesse Ruderman</dc:creator>
		<pubDate>Thu, 04 Oct 2007 03:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-3996</guid>
		<description>Odd, what environment variable causes breakpad to appear?  Does it incorrectly think Firefox has crashed?</description>
		<content:encoded><![CDATA[<p>Odd, what environment variable causes breakpad to appear?  Does it incorrectly think Firefox has crashed?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pd</title>
		<link>http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-3993</link>
		<dc:creator>pd</dc:creator>
		<pubDate>Wed, 03 Oct 2007 12:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-3993</guid>
		<description>Hi Jesse

Submitted &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=398270" rel="nofollow"&gt;my first mlk bug&lt;/a&gt; last night with help from people in #developers on irc.mozilla.org

Dave Townsend pointed out this:

&lt;a href="http://developer.mozilla.org/en/docs/Environment_variables_affecting_crash_reporting" rel="nofollow"&gt;Environment variables affecting crash reporting&lt;/a&gt;

Which helped me get over a stumbling block where Breakpad kicked in every time I tried to run the latest nightly with the NSPR environment variables. I added this:

SET MOZ_CRASHREPORTER_DISABLE

to the start of my batch file to do the trick.

Also pointing out was this &lt;a href="http://developer.mozilla.org/en/docs/Debugging_memory_leaks" rel="nofollow"&gt;Debugging memory leaks&lt;/a&gt; document. However would I be right in assuming the tips in this document require C++ programming skills to implement?

Please vote for my bug :)</description>
		<content:encoded><![CDATA[<p>Hi Jesse</p>
<p>Submitted <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=398270" rel="nofollow">my first mlk bug</a> last night with help from people in #developers on irc.mozilla.org</p>
<p>Dave Townsend pointed out this:</p>
<p><a href="http://developer.mozilla.org/en/docs/Environment_variables_affecting_crash_reporting" rel="nofollow">Environment variables affecting crash reporting</a></p>
<p>Which helped me get over a stumbling block where Breakpad kicked in every time I tried to run the latest nightly with the NSPR environment variables. I added this:</p>
<p>SET MOZ_CRASHREPORTER_DISABLE</p>
<p>to the start of my batch file to do the trick.</p>
<p>Also pointing out was this <a href="http://developer.mozilla.org/en/docs/Debugging_memory_leaks" rel="nofollow">Debugging memory leaks</a> document. However would I be right in assuming the tips in this document require C++ programming skills to implement?</p>
<p>Please vote for my bug :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Ruderman</title>
		<link>http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-3985</link>
		<dc:creator>Jesse Ruderman</dc:creator>
		<pubDate>Tue, 02 Oct 2007 02:24:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.squarefree.com/2007/09/22/fast-turnaround-for-leak-bugs/#comment-3985</guid>
		<description>pd, there are a lot of things that could cause the browser's chrome document to leak.  To know what to fix, we'd need steps to reproduce the leak, but I'm guessing that session was too long for you to remember what you did.  Shorter sessions help with that kind of thing.  Using trace-refcnt might help too, but you'd have to ask dbaron.</description>
		<content:encoded><![CDATA[<p>pd, there are a lot of things that could cause the browser&#8217;s chrome document to leak.  To know what to fix, we&#8217;d need steps to reproduce the leak, but I&#8217;m guessing that session was too long for you to remember what you did.  Shorter sessions help with that kind of thing.  Using trace-refcnt might help too, but you&#8217;d have to ask dbaron.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
