Closed
Bug 1233716
Opened 9 years ago
Closed 8 years ago
Fix dumping of crashes in docker containers
Categories
(Testing :: General, defect)
Testing
General
Tracking
(firefox46 fixed)
RESOLVED
FIXED
mozilla46
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: armenzg, Assigned: armenzg)
References
Details
Attachments
(1 file)
In bug 1233554 we noticed that we're not dumping crashes. whimboo noticed that we don't set download_minidump_stackwalk: However, setting minidump_stackwalk_path should have been sufficient (not needing to download): > 18:56:14 INFO - 'minidump_stackwalk_path': '/usr/local/bin/linux64-minidump_stackwalk', I'm look into this. [1] > 21:40:12 INFO - 'download_minidump_stackwalk': False, This explains why it is happening. The reason for that is the following config file which you make use of: https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/configs/remove_executables.py
Assignee | ||
Comment 1•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a9c87bf08292
Assignee | ||
Comment 2•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a149b49901d8
Comment 3•9 years ago
|
||
And, indeed, that file is baked into the image: root@taskcluster-worker:~# file /usr/local/bin/linux64-minidump_stackwalk /usr/local/bin/linux64-minidump_stackwalk: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=0xc972418a691a3bbf8a96044b63d8729bbd19eccc, stripped However, https://dxr.mozilla.org/mozilla-central/source/testing/docker/desktop-test/Dockerfile#17 # TODO: remove ADD https://s3-us-west-2.amazonaws.com/test-caching/packages/linux64-stackwalk /usr/local/bin/linux64-minidump_stackwalk RUN chmod u+x /usr/local/bin/linux64-minidump_stackwalk Notably, that's not coming from tooltool. So (a) why is it not using the given file and (b) should we do this a different way?
Assignee | ||
Comment 4•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/28539/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/28539/
Attachment #8700051 -
Flags: review?(hskupin)
Assignee | ||
Comment 5•9 years ago
|
||
dustin, you're right. It should be using, however, that changes seem that it never got tested if Mozharness would actually use it. The following patch fixes it. From https://public-artifacts.taskcluster.net/Ac1gvqrGSUKRe5Jm7gV7hA/0/public/logs/live_backing.log 16:24:53 INFO - ENV: MINIDUMP_STACKWALK is now /usr/local/bin/linux64-minidump_stackwalk
Assignee | ||
Comment 6•9 years ago
|
||
It seems that another issue is discovered after fixing the first one. I will add more info in the output and determine what the permission is for the .dmp file. 16:38:44 WARNING - TEST-UNEXPECTED-FAIL | file:///home/worker/workspace/build/tests/reftest/tests/dom/canvas/crashtests/780392-1.html | application terminated with exit code 6 16:38:44 INFO - mozcrash INFO | Downloading symbols from: https://queue.taskcluster.net/v1/task/e3NeMV5ZT3iUrNfEgbrbug/artifacts/public/build/target.crashreporter-symbols.zip 16:38:51 INFO - Traceback (most recent call last): 16:38:51 INFO - File "/home/worker/workspace/build/tests/reftest/runreftest.py", line 738, in <module> 16:38:51 INFO - main() 16:38:51 INFO - File "/home/worker/workspace/build/tests/reftest/runreftest.py", line 734, in main 16:38:51 INFO - sys.exit(reftest.runTests(options.tests, options)) 16:38:51 INFO - File "/home/worker/workspace/build/tests/reftest/runreftest.py", line 404, in runTests 16:38:51 INFO - return self.runSerialTests(manifests, options, cmdlineArgs) 16:38:51 INFO - File "/home/worker/workspace/build/tests/reftest/runreftest.py", line 684, in runSerialTests 16:38:51 INFO - debuggerInfo=debuggerInfo) 16:38:51 INFO - File "/home/worker/workspace/build/tests/reftest/runreftest.py", line 652, in runApp 16:38:51 INFO - symbolsPath, test_name=self.lastTestSeen) 16:38:51 INFO - File "/home/worker/workspace/build/venv/local/lib/python2.7/site-packages/mozcrash/mozcrash.py", line 93, in check_for_crashes 16:38:51 INFO - for info in crash_info: 16:38:51 INFO - File "/home/worker/workspace/build/venv/local/lib/python2.7/site-packages/mozcrash/mozcrash.py", line 202, in __iter__ 16:38:51 INFO - rv = self._process_dump_file(path, extra) 16:38:51 INFO - File "/home/worker/workspace/build/venv/local/lib/python2.7/site-packages/mozcrash/mozcrash.py", line 237, in _process_dump_file 16:38:51 INFO - stderr=subprocess.PIPE) 16:38:51 INFO - File "/usr/lib/python2.7/subprocess.py", line 679, in __init__ 16:38:52 INFO - errread, errwrite) 16:38:52 INFO - File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child 16:38:52 INFO - raise child_exception 16:38:52 INFO - OSError: [Errno 13] Permission denied
Summary: Fix MINIDUMP_STACKWALK not being set → Fix dumping of crashes in docker containers
Comment 7•9 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund https://reviewboard.mozilla.org/r/28539/#review25385 Keep in mind that I'm not an official peer for mozharness, so you might want to ask someone else for a final review. Otherwise you can find my thoughts below. ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:659 (Diff revision 1) > + return self.minidump_stackwalk_path I don't think that we should set the internal property here. It should simply behave like all the other cases and only return the path. ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:682 (Diff revision 1) > + return self.minidump_stackwalk_path We have duplicated code here. Why cannot we simply call `query_minidump_filename()` and return immediately in case a path is set?
Attachment #8700051 -
Flags: review?(hskupin)
Comment 8•9 years ago
|
||
Armen and I talked about this on IRC and agreed that using the in-image binary is fine for now. It doesn't change that often. Hopefully in the future we'll be able to rebuild images directly from the in-tree Dockerfiles and updating it will be easy.
Assignee | ||
Comment 9•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=79ab5b880900
Assignee | ||
Comment 10•9 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28539/diff/1-2/
Attachment #8700051 -
Flags: review?(hskupin)
Assignee | ||
Comment 11•9 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28539/diff/2-3/
Attachment #8700051 -
Flags: review?(hskupin) → review?(jlund)
Assignee | ||
Comment 12•9 years ago
|
||
I will fix mozcrash not notifying us properly to bug 1234353. I will fix the binary not being executable for the worker user to bug 1234352.
Comment 13•9 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund https://reviewboard.mozilla.org/r/28539/#review25683 I have some questions before stamping it. Looks good otherwise :) ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:641 (Diff revision 2) > - if self._is_windows(): > + if not platform_name: shouldn't this be `if platform_name:` ? ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:642 (Diff revision 2) > - # we use the same minidump binary for 32 and 64 bit windows > + tooltool_path = "config/tooltool-manifests/%s/releng.manifest" % platform_name what about when this is 64 bit windows? ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:653 (Diff revision 2) > - if self._is_windows(): > + if not platform_name: again I think we want `if platform_name` here ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:655 (Diff revision 2) > - return minidump_filename % ('win32',) + '.exe' > + if platform_name == 'win32': again, what about the win64 case? ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:664 (Diff revision 2) > + elif self.config.get('minidump_stackwalk_path'): this is already going to happen once we run query_minidump_filename() a few lines below correct? also, this means we will never download_minidump_stackwalk if we define it via self.config which I'm not sure we want to do.. ?
Attachment #8700051 -
Flags: review?(jlund)
Assignee | ||
Comment 14•9 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28539/diff/2-3/
Attachment #8700051 -
Flags: review?(hskupin)
Assignee | ||
Comment 15•9 years ago
|
||
https://reviewboard.mozilla.org/r/28539/#review25683 > what about when this is 64 bit windows? The same binary is used for both archs.
Assignee | ||
Updated•9 years ago
|
Attachment #8700051 -
Flags: review?(hskupin) → review?(jlund)
Assignee | ||
Comment 16•9 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28539/diff/3-4/
Attachment #8700051 -
Attachment description: MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=whimboo → MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund
Updated•9 years ago
|
Attachment #8700051 -
Flags: review?(jlund)
Comment 17•9 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund https://reviewboard.mozilla.org/r/28539/#review25691 ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:641 (Diff revisions 2 - 4) > - if not platform_name: > + if platform_name: I still think you need to special case for when self.platform_name() returns: https://dxr.mozilla.org/mozilla-central/source/testing/mozharness/mozharness/base/script.py#61 sorry if I'm wrong ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:664 (Diff revisions 2 - 4) > - elif self.config.get('minidump_stackwalk_path'): > + elif self.config.get('minidump_stackwalk_path') and not c.get('download_minidump_stackwalk'): I guess my point was do we need this elif block at all? the way I see it is self.query_minidump_filename() (~8 lines below) will do this exact thing for us.
Assignee | ||
Updated•8 years ago
|
Attachment #8700051 -
Flags: review?(jlund)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → armenzg
Assignee | ||
Comment 18•8 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28539/diff/4-5/
Comment 19•8 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund https://reviewboard.mozilla.org/r/28539/#review26497 lgtm :)
Attachment #8700051 -
Flags: review?(jlund) → review+
Assignee | ||
Comment 20•8 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28539/diff/5-6/
Assignee | ||
Comment 21•8 years ago
|
||
In my latest change I've made self.platform_name() a valid function of ScriptMixin which calls the function platform_name() of the same module. It failed on Android test jobs.
Assignee | ||
Comment 22•8 years ago
|
||
I asked on IRC but I've lost my scrollback. I only added a small change to what you reviewed. Let me know if you want to review it again or if fine to land if the try push comes back properly.
Assignee | ||
Comment 23•8 years ago
|
||
The Android tests have started coming back green: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4805b383b6ea&selectedJob=15132624 instead of red: https://treeherder.mozilla.org/#/jobs?repo=try&revision=38841e2e1290
Assignee | ||
Comment 24•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/1687f6972fe2e546f0b45afa50bebf386a4915be Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund
I had to back this out in https://hg.mozilla.org/integration/mozilla-inbound/rev/7409fb8cc433 because it apparently make mn-e10s jobs fail like http://archive.mozilla.org/pub/firefox/tinderbox-builds/mozilla-inbound-linux/1452117808/mozilla-inbound_ubuntu32_vm_test-marionette-e10s-bm01-tests1-linux32-build742.txt.gz
Apparently broke regular Mn tests, too.
And some platforms' wpt tests.
Comment 28•8 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund https://reviewboard.mozilla.org/r/28539/#review26653 ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:664 (Diff revision 6) > - if self._is_windows(): > + platform_name = self.platform_name() I think we forgot a TOOLTOOL_PLATFORM_DIR equivalent for minidump stackwalk because platform_name() returns things like 'linux' and 'win64'. both are values we never want.. ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:666 (Diff revision 6) > - return minidump_filename % ('win32',) + '.exe' > + minidump_filename = '%s-minidump_stackwalk' % platform_name hm, I think I commented about this before but missed it while looking at your last interdiff. Shouldn't this be 'win32' even if the platform is 'win64'?
Attachment #8700051 -
Flags: review+
Assignee | ||
Comment 29•8 years ago
|
||
https://reviewboard.mozilla.org/r/28539/#review26653 > I think we forgot a TOOLTOOL_PLATFORM_DIR equivalent for minidump stackwalk because platform_name() returns things like 'linux' and 'win64'. both are values we never want.. Ideally calling self.tooltool_fetch() would actually returning the path to the file downloaded. I will nevertheless fix it as is.
Assignee | ||
Updated•8 years ago
|
Attachment #8700051 -
Flags: review?(jlund)
Assignee | ||
Comment 30•8 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28539/diff/6-7/
Assignee | ||
Comment 31•8 years ago
|
||
For my own reference: 14:32:19 INFO - Running command: ['/tools/tooltool.py', '--url', 'https://api.pub.build.mozilla.org/tooltool/', '--authentication-file', '/builds/relengapi.tok', 'fetch', '-m', '/builds/slave/test/build/tests/config/tooltool-manifests/linux32/releng.manifest', '-o', '-c', '/builds/tooltool_cache'] in /builds/slave/test/build 14:32:19 INFO - Copy/paste: /tools/tooltool.py --url https://api.pub.build.mozilla.org/tooltool/ --authentication-file /builds/relengapi.tok fetch -m /builds/slave/test/build/tests/config/tooltool-manifests/linux32/releng.manifest -o -c /builds/tooltool_cache 14:32:19 INFO - INFO - File linux32-minidump_stackwalk retrieved from local cache /builds/tooltool_cache 14:32:19 INFO - Return code: 0 14:32:19 WARNING - minidump stackwalk path was given but couldn't be found. Tried looking in '/builds/slave/test/build/linux-minidump_stackwalk'
Comment 32•8 years ago
|
||
Comment on attachment 8700051 [details] MozReview Request: Bug 1233716 - Set self.minidump_stackwalk_path if specified in the configs. r=jlund https://reviewboard.mozilla.org/r/28539/#review27325 lgtm since this has been through a few cycles and I'm paranoid, we should do a try run of affected jobs if not already done. ::: testing/mozharness/mozharness/mozilla/testing/testbase.py:668 (Diff revisions 6 - 7) > - minidump_filename = '%s-minidump_stackwalk' % platform_name > + minidump_filename = '%s-minidump_stackwalk' % TOOLTOOL_PLATFORM_DIR[platform_name] maybe this name should be more generic or at least un-tooltool specific
Attachment #8700051 -
Flags: review?(jlund) → review+
Assignee | ||
Comment 33•8 years ago
|
||
The try push was triggered via reviewboard. https://treeherder.mozilla.org/#/jobs?repo=try&revision=6b35bd5f86a5&selectedJob=15300388 Last night when I looked it was fine but I will verify once again.
Assignee | ||
Comment 34•8 years ago
|
||
jlund: the results do not show any issues. I believe TOOLTOOL_PLATFORM_DIR is an adequate name since it is a mapping specific for tooltool configs in tree: https://dxr.mozilla.org/mozilla-central/source/testing/config/tooltool-manifests Please let me know if you waive the issue so I can land it.
Flags: needinfo?(jlund)
Comment 37•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e2dc6422362c
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
Updated•8 years ago
|
Flags: needinfo?(jlund)
You need to log in
before you can comment on or make changes to this bug.
Description
•