You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu 22.04
Reproduction steps
Create a Merge-Request with a really huge description
Trigger a Jenkins Pipeline-Job via Webhook-Push
Expected Results
The job runs smoothly
Actual Results
git execution fails
Triggered by GitLab Merge Request #21: misc/renovate/version.quarkus => master
Checking out git [email protected]:My-Team/misc/ci-reference.git into /avm/data/jenkins/jobs/misc/jobs/ci-reference-master/workspace@script/f2973eb2a4b1f1753a9f45b0d858da66788cb040b63b64c7c628dd40ee584815 to read Jenkinsfile
The recommended git tool is: NONE
using credential jenkins-sv-01
> git rev-parse --resolve-git-dir /avm/data/jenkins/jobs/misc/jobs/ci-reference-master/workspace@script/f2973eb2a4b1f1753a9f45b0d858da66788cb040b63b64c7c628dd40ee584815/.git # timeout=10
ERROR: Workspace has a .git repository, but it appears to be corrupt.
hudson.plugins.git.GitException: Error performing git command: git rev-parse --resolve-git-dir /avm/data/jenkins/jobs/misc/jobs/ci-reference-master/workspace@script/f2973eb2a4b1f1753a9f45b0d858da66788cb040b63b64c7c628dd40ee584815/.git
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2862)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2063)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.hasGitRepo(CliGitAPIImpl.java:405)
at PluginClassLoader for git-client//hudson.plugins.git.GitAPI.hasGitRepo(GitAPI.java:281)
at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1205)
at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1310)
at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1277)
at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:167)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:73)
at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:445)
Caused by: java.io.IOException: Cannot run program "git" (in directory "/avm/data/jenkins/jobs/misc/jobs/ci-reference-master/workspace@script/f2973eb2a4b1f1753a9f45b0d858da66788cb040b63b64c7c628dd40ee584815"): error=7, Argument list too long
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
at hudson.Proc$LocalProc.<init>(Proc.java:252)
at hudson.Proc$LocalProc.<init>(Proc.java:221)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:994)
at hudson.Launcher$ProcStarter.start(Launcher.java:506)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2839)
... 15 more
Caused by: java.io.IOException: error=7, Argument list too long
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:295)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:225)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
... 21 more
Cloning the remote Git repository
Cloning repository [email protected]:My-Team/misc/ci-reference.git
> git init /avm/data/jenkins/jobs/misc/jobs/ci-reference-master/workspace@script/f2973eb2a4b1f1753a9f45b0d858da66788cb040b63b64c7c628dd40ee584815 # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /avm/data/jenkins/jobs/misc/jobs/ci-reference-master/workspace@script/f2973eb2a4b1f1753a9f45b0d858da66788cb040b63b64c7c628dd40ee584815
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1073)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:819)
at PluginClassLoader for git//hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1220)
at PluginClassLoader for git//hudson.plugins.git.GitSCM._checkout(GitSCM.java:1310)
at PluginClassLoader for git//hudson.plugins.git.GitSCM.checkout(GitSCM.java:1277)
at PluginClassLoader for workflow-scm-step//org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:136)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:167)
at PluginClassLoader for workflow-cps//org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:73)
at PluginClassLoader for workflow-job//org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:311)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:445)
Caused by: hudson.plugins.git.GitException: Error performing git command: git init /avm/data/jenkins/jobs/misc/jobs/ci-reference-master/workspace@script/f2973eb2a4b1f1753a9f45b0d858da66788cb040b63b64c7c628dd40ee584815
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2862)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2766)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2761)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:2051)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1071)
... 10 more
Caused by: java.io.IOException: Cannot run program "git" (in directory "/avm/data/jenkins/jobs/misc/jobs/ci-reference-master/workspace@script/f2973eb2a4b1f1753a9f45b0d858da66788cb040b63b64c7c628dd40ee584815"): error=7, Argument list too long
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
at hudson.Proc$LocalProc.<init>(Proc.java:252)
at hudson.Proc$LocalProc.<init>(Proc.java:221)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:994)
at hudson.Launcher$ProcStarter.start(Launcher.java:506)
at PluginClassLoader for git-client//org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2839)
... 14 more
Caused by: java.io.IOException: error=7, Argument list too long
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:295)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:225)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
... 20 more
ERROR: Error cloning remote repo 'origin'
ERROR: Maximum checkout retry attempts reached, aborting
ERROR: Error cloning remote repo 'origin'
ERROR: Maximum checkout retry attempts reached, aborting
Finished: FAILURE
Anything else?
I only found out by luck that it was due to the long description of the merge request. The background is that I use Renovate. Renovate stores the change log of the libraries in the merge request description. Change logs can become very long.
To solve the problem, I have made the following code change. I know it's a little hack. The 1000 has no deeper meaning except to not overload the environment variable. I would prefer to remove the environment variable completely, but in my opinion this should be configurable. Perhaps some users evaluate the variable.
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu 22.04
Reproduction steps
Expected Results
The job runs smoothly
Actual Results
git execution fails
Anything else?
I only found out by luck that it was due to the long description of the merge request. The background is that I use Renovate. Renovate stores the change log of the libraries in the merge request description. Change logs can become very long.
To solve the problem, I have made the following code change. I know it's a little hack. The
1000
has no deeper meaning except to not overload the environment variable. I would prefer to remove the environment variable completely, but in my opinion this should be configurable. Perhaps some users evaluate the variable.Are you interested in contributing a fix?
How would you solve the problem? I would be happy to try to submit a pull request.
The text was updated successfully, but these errors were encountered: