Fix high crash rate when crawler is run in Docker #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Need to rebase on #27.
As explored in openwpm/OpenWPM#255, newer versions of Firefox will often crash due to insufficient shared memory. This issue wasn't present in the Firefox 52 branch because we used to set
browser.tabs.remote.autostart
to False, which disables SHM usage by disabling e10s.When running a Docker container, the shared memory size can be increased by adding the argument
--shm-size=2g
. Unfortunately kubernetes doesn't yet support setting the shared memory size (see: kubernetes/kubernetes#28272), nor does it support passing arguments to docker. The current fix is a workaround copied from kubernetes/kubernetes#28272 (comment).I ran a 5k site test crawl with this fix using the branch from this PR: openwpm/OpenWPM#473 . For results, see: https://dbc-caf9527b-e073.cloud.databricks.com/#notebook/165717/command/165734.
Errors due to crashes still occur, but significantly less frequently. Note that I also had to increase the timeout to 120 seconds. The timeout rate at 60 seconds was ~20% of sites. I'm not sure if this workaround introduces some overhead, or if it's just that the sites that previous crashed FF were resource heavy and thus moved from crashing to timing out after increasing the shared memory size.