{"id":26,"date":"2009-03-12T19:33:52","date_gmt":"2009-03-13T00:33:52","guid":{"rendered":"http:\/\/blog.mozilla.org\/ted\/?p=26"},"modified":"2009-03-13T05:45:11","modified_gmt":"2009-03-13T10:45:11","slug":"crash-stacks-on-unit-tests-and-talos","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/ted\/2009\/03\/12\/crash-stacks-on-unit-tests-and-talos\/","title":{"rendered":"Crash stacks on unit tests and Talos"},"content":{"rendered":"<p>For a long time when our <a href=\"https:\/\/developer.mozilla.org\/en\/Mozilla_automated_testing\">unit tests<\/a> or <a href=\"http:\/\/weblogs.mozillazine.org\/qa\/archives\/2007\/05\/beware_of_talos.html\">Talos<\/a> performance tests encountered a crash, the result was nothing but frustration. If you were lucky, you could tell that it crashed, but you had no idea where. Poor <a title=\"Does he have a blog? This was the first hit on Google, good enough.\" href=\"http:\/\/twitter.com\/mrbkap\">Blake<\/a> spent weeks tracing down <a title=\" Bug 474537 -  Understand the speculative parsing crash\" href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=474537\">a crash<\/a> from his <a title=\" Bug 364315 -  Speculatively load referenced files while &quot;real&quot; parsing is blocked on a &lt;script src=&gt; load \" href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=364315\">speculative-parsing patch<\/a> that only seemed to occur on Talos. Up until recently I figured the only way to make this happen was going to involve a fair amount of work that only I was going to be able to do. A few weeks ago it was determined that this was becoming a significant impact on development, as patches would get checked in, cause a crash and be backed out, leaving the developer with nothing to go on.<\/p>\n<p><a href=\"http:\/\/benjamin.smedbergs.us\/blog\/\">Benjamin Smedberg<\/a> has been hard at work making it possible to get stacks in this situation, using the same <a href=\"http:\/\/code.google.com\/p\/google-breakpad\/\">Breakpad<\/a> utilities we use on our <a href=\"http:\/\/crash-stats.mozilla.com\/\">Socorro server<\/a>, but locally on the machine running the tests. Practically all of the pieces were in place this afternoon when #developers cornered <a href=\"http:\/\/alice.nodelman.net\/blog\/\">Alice<\/a> and closed the tree while she landed the final patch to make Talos produce stack traces. <a href=\"http:\/\/weblogs.mozillazine.org\/bz\/\">Boris<\/a> then <a href=\"http:\/\/hg.mozilla.org\/mozilla-central\/rev\/4d9bc12c4d3c\">committed a test crash<\/a>, and as a result we were able to see crash stacks in Mochitest (<a title=\"It's a tinderbox log, so only click if you *really* want to see\" href=\"http:\/\/tinderbox.mozilla.org\/showlog.cgi?log=Firefox\/1236887430.1236888099.13857.gz&amp;fulltext=1#err3\">OS X<\/a>, <a title=\"another huge tinderbox log\" href=\"http:\/\/tinderbox.mozilla.org\/showlog.cgi?log=Firefox\/1236887430.1236892748.27212.gz&amp;fulltext=1#err3\">Linux<\/a>) as well as Talos (<a title=\"ok, this tinderbox log is a bit shorter\" href=\"http:\/\/tinderbox.mozilla.org\/showlog.cgi?log=Firefox\/1236887449.1236888958.18830.gz\">OS X<\/a>, <a title=\"another tinderbox log\" href=\"http:\/\/tinderbox.mozilla.org\/showlog.cgi?log=Firefox\/1236887504.1236890166.22554.gz\">Linux<\/a>).<\/p>\n<p>Thanks to Benjamin for doing most of the heavy lifting here, and for<br \/>\nAlice for taking the Talos part across the finish line. The Talos work<br \/>\nwas mostly in <a title=\" Bug 480577 -  Make Talos dump crash stacks after crashes\" href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=480577\">bug 480577<\/a>, and the unit test work was <a title=\" Bug 481732 -  Have unit tests (automation.py ones) dump stacks on crashes\" href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=481732\">bug 481732<\/a>. Note<br \/>\nthat currently this only works in Mochitest (all 4 varieties), it will<br \/>\nwork in Reftest\/Crashtest after <a title=\" Bug 479225 -  run reftest\/crashtest with &quot;make {reftest,crashtest}&quot; and mochitest with &quot;make mochitest-{plain,chrome,browser-chrome,a11y}&quot;\" href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=479225\">bug 479225<\/a> is fixed (which should be soon).<\/p>\n<p>(Cross posted in <a href=\"http:\/\/groups.google.com\/group\/mozilla.dev.tree-management\/browse_thread\/thread\/14532c910c0f6a04#\">dev.tree-management<\/a>, but posting here for a wider audience.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a long time when our unit tests or Talos performance tests encountered a crash, the result was nothing but frustration. If you were lucky, you could tell that it crashed, but you had no idea where. Poor Blake spent weeks tracing down a crash from his speculative-parsing patch that only seemed to occur on [&hellip;]<\/p>\n","protected":false},"author":65,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[189,122],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/ted\/wp-json\/wp\/v2\/posts\/26"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/ted\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/ted\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/ted\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/ted\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/ted\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/ted\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/ted\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/ted\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}