RESOLVED FIXED 82310
Handle DRT crash caused by Android OOM.
https://bugs.webkit.org/show_bug.cgi?id=82310
Summary Handle DRT crash caused by Android OOM.
Hao Zheng
Reported 2012-03-27 01:59:17 PDT
Handle DRT crash caused by Android OOM.
Attachments
Patch (6.52 KB, patch)
2012-03-27 02:05 PDT, Hao Zheng
no flags
Patch (6.54 KB, patch)
2012-03-27 02:38 PDT, Hao Zheng
no flags
Hao Zheng
Comment 1 2012-03-27 02:05:29 PDT
Adam Barth
Comment 2 2012-03-27 02:16:45 PDT
Comment on attachment 134003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=134003&action=review > Tools/Scripts/webkitpy/layout_tests/port/chromium.py:580 > + if crash and line is not None: > + error.append(line) I'm not sure I quite understand what these lines do. Can you explain a bit more? > Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py:484 > + if drt_return == 137: Can we name this constant?
Adam Barth
Comment 3 2012-03-27 02:17:02 PDT
This looks fine, I'm just unsure about the change to chromium.py.
Hao Zheng
Comment 4 2012-03-27 02:23:20 PDT
(In reply to comment #2) > (From update of attachment 134003 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=134003&action=review > > > Tools/Scripts/webkitpy/layout_tests/port/chromium.py:580 > > + if crash and line is not None: > > + error.append(line) > > I'm not sure I quite understand what these lines do. Can you explain a bit more? > Sure. This is to append the last output line when crash happens. > > Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py:484 > > + if drt_return == 137: > > Can we name this constant? Will replace with signal.SIGKILL.
Adam Barth
Comment 5 2012-03-27 02:24:34 PDT
Comment on attachment 134003 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=134003&action=review Ok. >>> Tools/Scripts/webkitpy/layout_tests/port/chromium.py:580 >>> + error.append(line) >> >> I'm not sure I quite understand what these lines do. Can you explain a bit more? > > Sure. This is to append the last output line when crash happens. I see. Previously we were truncating.
Hao Zheng
Comment 6 2012-03-27 02:38:51 PDT
Tony Chang
Comment 7 2012-03-27 10:09:24 PDT
Comment on attachment 134009 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=134009&action=review Should there be test cases for this? > Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py:551 > + return None if (return_match is None) else int(return_match.group(1)) Nit: This could be "return return_match and int(return_match.group(1))".
WebKit Review Bot
Comment 8 2012-03-27 19:50:15 PDT
Comment on attachment 134009 [details] Patch Rejecting attachment 134009 [details] from commit-queue. zhenghao@chromium.org does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py. - If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags. - If you have committer rights please correct the error in Tools/Scripts/webkitpy/common/config/committers.py by adding yourself to the file (no review needed). The commit-queue restarts itself every 2 hours. After restart the commit-queue will correctly respect your committer rights.
Hao Zheng
Comment 9 2012-03-27 19:55:33 PDT
(In reply to comment #7) > (From update of attachment 134009 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=134009&action=review > > Should there be test cases for this? > As it involves adb command and a recursion of 10 levels, I could not find a good way to test it. Any suggestion on this? I could add tests in https://bugs.webkit.org/show_bug.cgi?id=80852 . > > Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py:551 > > + return None if (return_match is None) else int(return_match.group(1)) > > Nit: This could be "return return_match and int(return_match.group(1))". Ternary operator looks more readable to me. Is there any style guideline on this? Tony, as I don't have commit right, could you set commit-queue for me? Thanks!
Tony Chang
Comment 10 2012-03-27 19:57:57 PDT
(In reply to comment #9) > (In reply to comment #7) > > (From update of attachment 134009 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=134009&action=review > > > > Should there be test cases for this? > > > > As it involves adb command and a recursion of 10 levels, I could not find a good way to test it. Any suggestion on this? I could add tests in https://bugs.webkit.org/show_bug.cgi?id=80852 . Can you mock out adb? > > > Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py:551 > > > + return None if (return_match is None) else int(return_match.group(1)) > > > > Nit: This could be "return return_match and int(return_match.group(1))". > > Ternary operator looks more readable to me. Is there any style guideline on this? No style guide, hence a nit.
Hao Zheng
Comment 11 2012-03-27 20:01:39 PDT
(In reply to comment #10) > (In reply to comment #9) > > (In reply to comment #7) > > > (From update of attachment 134009 [details] [details] [details]) > > > View in context: https://bugs.webkit.org/attachment.cgi?id=134009&action=review > > > > > > Should there be test cases for this? > > > > > > > As it involves adb command and a recursion of 10 levels, I could not find a good way to test it. Any suggestion on this? I could add tests in https://bugs.webkit.org/show_bug.cgi?id=80852 . > > Can you mock out adb? > Good idea. Need some refactoring. Will do in bug 80852. > > > > Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py:551 > > > > + return None if (return_match is None) else int(return_match.group(1)) > > > > > > Nit: This could be "return return_match and int(return_match.group(1))". > > > > Ternary operator looks more readable to me. Is there any style guideline on this? > > No style guide, hence a nit.
WebKit Review Bot
Comment 12 2012-03-27 20:05:48 PDT
Comment on attachment 134009 [details] Patch Clearing flags on attachment: 134009 Committed r112359: <http://trac.webkit.org/changeset/112359>
WebKit Review Bot
Comment 13 2012-03-27 20:05:53 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.