Created
November 26, 2018 19:28
-
-
Save staktrace/a83dd0d66e29f0d049cc6b16d6cf71b2 to your computer and use it in GitHub Desktop.
debugging crashtest in docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install and start docker, e.g. make sure `docker ps` doesn't just fail | |
# Then download the docker image that the test runs in (warning: multi-gig download here) | |
./mach taskcluster-load-image K-qJkvIqQQ-EFK8-4zg_nA | |
# The above will register the image into docker, and give you a command to run. Don't use that command, because it will give you an unprivileged shell and you can't use gdb there. Do this instead: | |
docker run -it --privileged --rm desktop1604-test:11935082015e43a2cb5ed7c32b4648fdf7faea2281f959b713a72b174dbadaaf bash | |
# Inside the docker container shell | |
echo "0" > /proc/sys/kernel/yama/ptrace_scope | |
export ENABLE_E10S="true" | |
export GECKO_BASE_REPOSITORY="https://hg.mozilla.org/mozilla-unified" | |
export GECKO_HEAD_REPOSITORY="https://hg.mozilla.org/try" | |
export GECKO_HEAD_REV="bedbe3dc536db03af0a351875a2f42917ff0e820" | |
export GECKO_PATH="/builds/worker/checkouts/gecko" | |
export HG_STORE_PATH="/builds/worker/checkouts/hg-store" | |
export MOZ_AUTOMATION="1" | |
export MOZ_NODE_PATH="/usr/local/bin/node" | |
export MOZHARNESS_CONFIG="unittests/linux_unittest.py remove_executables.py" | |
export MOZHARNESS_SCRIPT="desktop_unittest.py" | |
export MOZHARNESS_URL="https://queue.taskcluster.net/v1/task/IEqO8qzcRdOci5NFB6hDpA/artifacts/public/build/mozharness.zip" | |
export MOZILLA_BUILD_URL="https://queue.taskcluster.net/v1/task/IEqO8qzcRdOci5NFB6hDpA/artifacts/public/build/target.tar.bz2" | |
export NEED_PULSEAUDIO="true" | |
export NEED_WINDOW_MANAGER="true" | |
export SCCACHE_DISABLE="1" | |
export TASKCLUSTER_CACHES="/builds/worker/checkouts;/builds/worker/workspace" | |
export TASKCLUSTER_PROXY_URL="http://taskcluster/" | |
export TASKCLUSTER_UNTRUSTED_CACHES="1" | |
export TASKCLUSTER_VOLUMES="/builds/worker/.cache;/builds/worker/checkouts;/builds/worker/tooltool-cache;/builds/worker/workspace" | |
export TRY_COMMIT_MSG="try: -b do -p android-api-16,win64,macosx64,linux64,linux64-base-toolchains,linux -u all[linux64-qr,windows10-64-qr,macosx64-qr] -t all[linux64-qr,windows10-64-qr,macosx64-qr]" | |
export WORKING_DIR="/builds/worker" | |
/builds/worker/bin/run-task -- /builds/worker/bin/test-linux.sh --installer-url=https://queue.taskcluster.net/v1/task/IEqO8qzcRdOci5NFB6hDpA/artifacts/public/build/target.tar.bz2 --test-packages-url=https://queue.taskcluster.net/v1/task/IEqO8qzcRdOci5NFB6hDpA/artifacts/public/build/target.test_packages.json --reftest-suite=crashtest --e10s --allow-software-gl-layers --enable-webrender --download-symbols=ondemand | |
# Above command will download a bunch of stuff and start running the crashtests. Should be ok to ctrl-c it once the crashtests start running, since that will take too long and we can do better: | |
su worker | |
cd /builds/worker/workspace/build | |
export MOZ_WEBRENDER=1 | |
export MOZ_ACCELERATED=1 | |
export MOZ_LAYERS_ALLOW_SOFTWARE_GL=1 | |
# Let's trim the set of tests that get run: | |
(echo "include ../../layout/generic/crashtests/crashtests.list"; | |
echo "include ../../layout/painting/crashtests/crashtests.list"; | |
echo "include ../../layout/printing/crashtests/crashtests.list"; | |
echo "include ../../layout/style/crashtests/crashtests.list") > tests/reftest/tests/testing/crashtest/crashtests.list | |
# And run | |
xvfb-run -s "-screen 0 1024x768x24" /builds/worker/workspace/build/venv/bin/python -u /builds/worker/workspace/build/tests/reftest/runreftest.py --appname=/builds/worker/workspace/build/application/firefox/firefox --utility-path=tests/bin --extra-profile-file=tests/bin/plugins --symbols-path=https://queue.taskcluster.net/v1/task/IEqO8qzcRdOci5NFB6hDpA/artifacts/public/build/target.crashreporter-symbols.zip --log-raw=/builds/worker/workspace/build/blobber_upload_dir/crashtest_raw.log --log-errorsummary=/builds/worker/workspace/build/blobber_upload_dir/crashtest_errorsummary.log --cleanup-crashes --marionette-startup-timeout=180 --sandbox-read-whitelist=/builds/worker/workspace/build --log-raw=- --suite=crashtest -- tests/reftest/tests/testing/crashtest/crashtests.list | |
# Once it hangs on 1430589-1.html, open a new shell by running this *outside* the docker container: | |
docker exec -it $(docker ps | awk '/desktop1604-test/ { print $1 }') bash | |
# And then get gdb attached: | |
ps # find firefox pid | |
gdb # attach <pid>, etc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment