Intermittent RuntimeError: Gradle command returned error: -6 or 1 after Cannot allocate memory

Open
#1,269 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale

Research direction

Start with the Treeherder log and the call chain in taskcluster/rb_taskgraph/transforms/build_apk.py and taskcluster/rb_taskgraph/gradle.py, especially _fetch_all_variants and _run_gradle_process. Run the taskgraph build generation that invokes printVariants and determine why Gradle exhausts memory; done means the intermittent command failure is prevented or handled successfully.

Written by the indexing model from the issue text.

Description

🐞 bug

Log: https://treeherder.mozilla.org/logviewer.html#?job_id=310134511&repo=reference-browser

[task 2020-07-17T06:21:07.590Z] 2020-07-17 06:21:07,590 - INFO - Loading kinds
[task 2020-07-17T06:21:07.690Z] 2020-07-17 06:21:07,690 - INFO - Generating full task set
[task 2020-07-17T06:21:07.701Z] 2020-07-17 06:21:07,700 - INFO - Generated 1 tasks for kind bump
[task 2020-07-17T06:21:07.724Z] 2020-07-17 06:21:07,724 - INFO - Generated 5 tasks for kind docker-image
[task 2020-07-17T06:21:07.730Z] 2020-07-17 06:21:07,730 - INFO - Generated 1 tasks for kind fetch
[task 2020-07-17T06:21:07.731Z] 2020-07-17 06:21:07,731 - INFO - Generated 1 tasks for kind geckoview
[task 2020-07-17T06:21:07.901Z] 2020-07-17 06:21:07,901 - INFO - Generated 3 tasks for kind toolchain
[task 2020-07-17T06:25:12.218Z] OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000fc200000, 6291456, 0) failed; error='Cannot allocate memory' (errno=12)
[task 2020-07-17T06:27:07.168Z] 2020-07-17 06:27:07,119 - ERROR - Error loading tasks for kind build:
[task 2020-07-17T06:27:07.171Z] Traceback (most recent call last):
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/generator.py", line 261, in _run
[task 2020-07-17T06:27:07.171Z] new_tasks = kind.load_tasks(parameters, list(all_tasks.values()))
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/generator.py", line 75, in load_tasks
[task 2020-07-17T06:27:07.171Z] for task_dict in transforms(trans_config, inputs)]
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 1126, in check_run_task_caches
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 1069, in check_task_dependencies
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 1057, in check_task_identifiers
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 1040, in chain_of_trust
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 1033, in add_github_checks
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 892, in build_task
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 860, in add_index_routes
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 826, in validate
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 814, in task_name_from_label
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 775, in set_defaults
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/task.py", line 754, in set_implementation
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/job/init.py", line 306, in make_task_description
[task 2020-07-17T06:27:07.171Z] for job in jobs:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/job/init.py", line 202, in use_fetches
[task 2020-07-17T06:27:07.171Z] for job in order_tasks(config, jobs):
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/cached_tasks.py", line 22, in order_tasks
[task 2020-07-17T06:27:07.171Z] pending = deque(tasks)
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/job/init.py", line 157, in set_label
[task 2020-07-17T06:27:07.171Z] for job in jobs:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/job/init.py", line 141, in set_implementation
[task 2020-07-17T06:27:07.171Z] for job in jobs:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/job/init.py", line 121, in rewrite_when_to_optimization
[task 2020-07-17T06:27:07.171Z] for job in jobs:
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/transforms/base.py", line 138, in call
[task 2020-07-17T06:27:07.171Z] for task in tasks:
[task 2020-07-17T06:27:07.171Z] File "taskcluster/rb_taskgraph/transforms/build_apk.py", line 23, in add_artifacts
[task 2020-07-17T06:27:07.171Z] variant_config = get_build_variant(build_type)
[task 2020-07-17T06:27:07.171Z] File "taskcluster/rb_taskgraph/gradle.py", line 14, in get_build_variant
[task 2020-07-17T06:27:07.171Z] all_variants = _fetch_all_variants()
[task 2020-07-17T06:27:07.171Z] File "/builds/worker/.local/lib/python2.7/site-packages/taskgraph/util/memoize.py", line 25, in call
[task 2020-07-17T06:27:07.172Z] self[args] = self.func(*args)
[task 2020-07-17T06:27:07.172Z] File "taskcluster/rb_taskgraph/gradle.py", line 32, in _fetch_all_variants
[task 2020-07-17T06:27:07.172Z] output = _run_gradle_process('printVariants')
[task 2020-07-17T06:27:07.172Z] File "taskcluster/rb_taskgraph/gradle.py", line 48, in _run_gradle_process
[task 2020-07-17T06:27:07.172Z] raise RuntimeError("Gradle command returned error: {}".format(exit_code))
[task 2020-07-17T06:27:07.172Z] RuntimeError: Gradle command returned error: -6

Dominant language
Kotlin
Stars
668
Forks
198
Avg merge
8h 47m
Merged PRs (30d)
53

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla-mobile/reference-browser

All issues in mozilla-mobile/reference-browser

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.