{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/3695","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/3695/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/3695/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/3695/events","html_url":"https://github.com/travis-ci/travis-ci/issues/3695","id":69261542,"number":3695,"title":"Android build on Docker can fail in `:preDexBetaDebug` stage","user":{"login":"BanzaiMan","id":25666,"avatar_url":"https://avatars.githubusercontent.com/u/25666?v=3","gravatar_id":"","url":"https://api.github.com/users/BanzaiMan","html_url":"https://github.com/BanzaiMan","followers_url":"https://api.github.com/users/BanzaiMan/followers","following_url":"https://api.github.com/users/BanzaiMan/following{/other_user}","gists_url":"https://api.github.com/users/BanzaiMan/gists{/gist_id}","starred_url":"https://api.github.com/users/BanzaiMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BanzaiMan/subscriptions","organizations_url":"https://api.github.com/users/BanzaiMan/orgs","repos_url":"https://api.github.com/users/BanzaiMan/repos","events_url":"https://api.github.com/users/BanzaiMan/events{/privacy}","received_events_url":"https://api.github.com/users/BanzaiMan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/travis-ci/travis-ci/labels/android","name":"android","color":"A4C639"},{"url":"https://api.github.com/repos/travis-ci/travis-ci/labels/containers","name":"containers","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-04-18T03:29:04Z","updated_at":"2015-09-17T13:06:48Z","closed_at":null,"body":"The `gradle` process can die with exit status 137 (out of memory) with stack trace like this:\r\n\r\n```\r\n* Exception is:\r\norg.gradle.api.tasks.TaskExecutionException: Execution failed for task '…:preDexBetaDebug'.\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)\r\n\tat org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)\r\n\tat org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)\r\n\tat org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)\r\n\tat org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)\r\n\tat org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)\r\n\tat org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)\r\n\tat org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:305)\r\n\tat org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)\r\n\tat org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)\r\n\tat org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)\r\n\tat org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:88)\r\n\tat org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)\r\n\tat org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)\r\n\tat org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)\r\n\tat org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:68)\r\n\tat org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)\r\n\tat org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:62)\r\n\tat org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:55)\r\n\tat org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:149)\r\n\tat org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:106)\r\n\tat org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:86)\r\n\tat org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:80)\r\n\tat org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)\r\n\tat org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)\r\n\tat org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:36)\r\n\tat org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)\r\n\tat org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)\r\n\tat org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)\r\n\tat org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)\r\n\tat org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)\r\n\tat org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)\r\n\tat org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)\r\n\tat org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)\r\n\tat org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)\r\n\tat org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)\r\n\tat org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)\r\n\tat org.gradle.launcher.Main.doAction(Main.java:33)\r\n\tat org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)\r\n\tat org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)\r\n\tat org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)\r\n\tat org.gradle.launcher.GradleMain.main(GradleMain.java:23)\r\n\tat org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)\r\n\tat org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)\r\n\tat org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)\r\nCaused by: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 137\r\n\tat com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:116)\r\n\tat com.android.ide.common.internal.WaitableExecutor$waitForTasksWithQuickFail$0.call(Unknown Source)\r\n\tat com.android.build.gradle.tasks.PreDex.taskAction(PreDex.groovy:106)\r\n\tat org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)\r\n\tat org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.doExecute(AnnotationProcessingTaskFactory.java:235)\r\n\tat org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:211)\r\n\tat org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$IncrementalTaskAction.execute(AnnotationProcessingTaskFactory.java:222)\r\n\tat org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:200)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)\r\n\tat org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)\r\n\t... 47 more\r\nCaused by: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 137\r\n\tat com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:42)\r\n\tat com.android.builder.core.AndroidBuilder.preDexLibrary(AndroidBuilder.java:1298)\r\n\tat com.android.builder.internal.compiler.PreDexCache.preDexLibrary(PreDexCache.java:122)\r\n\tat com.android.builder.core.AndroidBuilder.preDexLibrary(AndroidBuilder.java:1250)\r\n\tat com.android.builder.core.AndroidBuilder$preDexLibrary$27.call(Unknown Source)\r\n\tat com.android.build.gradle.tasks.PreDex$PreDexTask.call(PreDex.groovy:150)\r\n\tat com.android.build.gradle.tasks.PreDex$PreDexTask.call(PreDex.groovy)\r\nCaused by: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-oracle/bin/java'' finished with non-zero exit value 137\r\n\tat org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365)\r\n\tat com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:40)\r\n\t... 6 more\r\n```\r\n\r\nThe exact trace, or the build stage may differ, but in general, the symptom is such that `gradle` process runs out of memory and dies."},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/141076864","html_url":"https://github.com/travis-ci/travis-ci/issues/3695#issuecomment-141076864","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/3695","id":141076864,"user":{"login":"anothem","id":237122,"avatar_url":"https://avatars.githubusercontent.com/u/237122?v=3","gravatar_id":"","url":"https://api.github.com/users/anothem","html_url":"https://github.com/anothem","followers_url":"https://api.github.com/users/anothem/followers","following_url":"https://api.github.com/users/anothem/following{/other_user}","gists_url":"https://api.github.com/users/anothem/gists{/gist_id}","starred_url":"https://api.github.com/users/anothem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anothem/subscriptions","organizations_url":"https://api.github.com/users/anothem/orgs","repos_url":"https://api.github.com/users/anothem/repos","events_url":"https://api.github.com/users/anothem/events{/privacy}","received_events_url":"https://api.github.com/users/anothem/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T13:06:48Z","updated_at":"2015-09-17T13:06:48Z","body":"I wasn't criticising, just making sure it's clear what that does :) \r\nI'm afraid I have nothing that hasn't been suggested here already. I managed to make this work by turning preDexing off. "}}