{"id":1390,"date":"2009-04-27T17:07:32","date_gmt":"2009-04-28T00:07:32","guid":{"rendered":"http:\/\/multimedia.cx\/eggs\/?p=1390"},"modified":"2009-04-27T17:07:32","modified_gmt":"2009-04-28T00:07:32","slug":"progress-on-those-crashers","status":"publish","type":"post","link":"https:\/\/multimedia.cx\/eggs\/progress-on-those-crashers\/","title":{"rendered":"Progress On Those Crashers"},"content":{"rendered":"<p>Last December, I set about on the <a href=\"http:\/\/multimedia.cx\/eggs\/designing-a-download-strategy\/\">task of downloading<\/a> and <a href=\"http:\/\/multimedia.cx\/eggs\/processing-those-crashers\/\">testing a huge number of files<\/a> that were known, at one point, the crash <a href=\"http:\/\/ffmpeg.org\/\">FFmpeg<\/a>. I devised a system for automatically running the files and determining whether they still crash in FFmpeg. Quite a few of them did. Then, I sort of let the project sit.<\/p>\n<p>I got around to running a new round of tests with the utility I created in December and compared the results with those of 4 months ago. Today&#8217;s test was conducted with FFmpeg SVN-r18707 built with &#8220;gcc: 4.0.1 (Apple Inc. build 5484)&#8221;, 32-bit version, and run on Mac OS X.<\/p>\n<table border=\"1\" cellpadding=\"2\">\n<tr>\n<th>Result<\/th>\n<th>December 8, 2008<\/th>\n<th>April 27, 2009<\/th>\n<\/tr>\n<tr>\n<td>Success<\/td>\n<td>2148<\/td>\n<td>2781<\/td>\n<\/tr>\n<tr>\n<td>FFmpeg error<\/td>\n<td>1333<\/td>\n<td>1389<\/td>\n<\/tr>\n<tr>\n<td>SIGABRT<\/td>\n<td>6<\/td>\n<td>6<\/td>\n<\/tr>\n<tr>\n<td>SIGFPE<\/td>\n<td>376<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>SIGKILL (timeouts)<\/td>\n<td>16<\/td>\n<td>17<\/td>\n<\/tr>\n<tr>\n<td>SIGBUS<\/td>\n<td>7<\/td>\n<td>97<\/td>\n<\/tr>\n<tr>\n<td>SIGSEGV<\/td>\n<td>529<\/td>\n<td>123<\/td>\n<\/tr>\n<\/table>\n<p>Great progress, especially on those floating point exceptions. I&#8217;m pretty sure nearly all of those were attributable to one or a few problems in the Real demuxer that have since been addressed. The only remaining problem in the FPE category is an AVI file.<\/p>\n<p>The timeout category represents the number of files that ran longer than a minute (need to keep the process moving). The &#8220;FFmpeg error&#8221; category (return code 1) is on the rise. I surmise that&#8217;s because FFmpeg is getting better at rejecting errant files vs. crashing on them. I should really formulate a query that reveals which files&#8217; status changed, and how, between runs.<\/p>\n<p>A big reason I sat on this project for so long is that I didn&#8217;t know how to proceed. Should I start testing the problem files manually, collect stack traces, and flood the FFmpeg issue tracker with hundreds of new reports? I don&#8217;t want to deal with that kind of manual labor and I don&#8217;t think my co-devs want to deal with that volume of (possibly redundant) bug traffic.<\/p>\n<p>Since December, I have developed another idea: Automatically running the problem files through gdb and looking for patterns. For example, I manually checked those 6 crashers that threw SIGABRT (the same 6 files from each run, BTW, and all ASF files). They all seem to fail as follows:<\/p>\n<pre>\r\nProgram received signal SIGABRT, Aborted.\r\n0x96dbbe42 in __kill ()\r\n(gdb) bt\r\n#0  0x96dbbe42 in __kill ()\r\n#1  0x96dbbe34 in kill$UNIX2003 ()\r\n#2  0x96e2e23a in raise ()\r\n#3  0x96e3a679 in abort ()\r\n#4  0x96e2f3db in __assert_rtn ()\r\n#5  0x00026529 in ff_asf_parse_packet (s=0x1002600, pb=0xa00200, \r\npkt=0xbfffe954) at \/Users\/melanson\/ffmpeg\/ffmpeg-main\/libavformat\/asfdec.c:709\r\n<\/pre>\n<p>It would be nice to create a script that identifies that all 6 of those files suffer from the same, or similar problem and group those files together in a report. I am not sure if gdb offers non-interactive options that are conducive to this situation. I know it has a -batch mode, but I&#8217;m not really sure what that&#8217;s for. If need be, I can always create a Python script that opens gdb in interactive mode and has a stdin\/stdout conversation with it.<\/p>\n<p><strong>See Also:<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/multimedia.cx\/eggs\/designing-a-download-strategy\/\">Designing A Download Strategy<\/a><\/li>\n<li><a href=\"http:\/\/multimedia.cx\/eggs\/processing-those-crashers\/\">Processing Those Crashers<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I revisited that vast set of crasher samples; much progress has been made<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[68],"class_list":["post-1390","post","type-post","status-publish","format-standard","hentry","category-general","tag-ffmpeg"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1390","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/comments?post=1390"}],"version-history":[{"count":18,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1390\/revisions"}],"predecessor-version":[{"id":1409,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/posts\/1390\/revisions\/1409"}],"wp:attachment":[{"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/media?parent=1390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/categories?post=1390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multimedia.cx\/eggs\/wp-json\/wp\/v2\/tags?post=1390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}