jenkinsci / jenkinsci/workflow-basic-steps-plugin

[JENKINS-52053] Jenkins stash failed after npm install

Aperta
#459 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
component:workflow-basic-steps-plugin imported-jira-issue priority:critical resolution:unresolved
Lingua principale
Java
Stelle
73
Fork
129
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

During my build process, I run NPM install among other tools, before stashing the contents of the working directory for later stages. However, we've noticed that when NPM install is used, the stash at the end of this stage throws a Java I/O exception, saying that the archive contains unclosed entries. Disabling the NPM install stops this issue from occurring. The I/O exception is shown below: 

Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to  (sir-r9rg4htg)

at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:955)
at hudson.FilePath.act(FilePath.java:1089)
at hudson.FilePath.act(FilePath.java:1078)
at hudson.FilePath.archive(FilePath.java:481)
at org.jenkinsci.plugins.workflow.flow.StashManager.stash(StashManager.java:107)
at org.jenkinsci.plugins.workflow.support.steps.stash.StashStep$Execution.run(StashStep.java:113)
at org.jenkinsci.plugins.workflow.support.steps.stash.StashStep$Execution.run(StashStep.java:101)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.io.IOException: This archives contains unclosed entries.
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.finish(TarArchiveOutputStream.java:225)
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.close(TarArchiveOutputStream.java:241)
at hudson.util.io.TarArchiver.close(TarArchiver.java:127)
at hudson.FilePath$Archive.invoke(FilePath.java:498)
at hudson.FilePath$Archive.invoke(FilePath.java:483)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3082)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

---
Originally reported by mdevarakonda, imported from: Jenkins stash failed after npm install


  • status: Open
  • priority: Critical
  • component(s): workflow-basic-steps-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 20251215-220547

Raw content of original issue

During my build process, I run NPM install among other tools, before stashing the contents of the working directory for later stages. However, we've noticed that when NPM install is used, the stash at the end of this stage throws a Java I/O exception, saying that the archive contains unclosed entries. Disabling the NPM install stops this issue from occurring. The I/O exception is shown below: 



Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to  (sir-r9rg4htg)

at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:955)
at hudson.FilePath.act(FilePath.java:1089)
at hudson.FilePath.act(FilePath.java:1078)
at hudson.FilePath.archive(FilePath.java:481)
at org.jenkinsci.plugins.workflow.flow.StashManager.stash(StashManager.java:107)
at org.jenkinsci.plugins.workflow.support.steps.stash.StashStep$Execution.run(StashStep.java:113)
at org.jenkinsci.plugins.workflow.support.steps.stash.StashStep$Execution.run(StashStep.java:101)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
at hudson.security.ACL.impersonate(ACL.java:290)
at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
java.io.IOException: This archives contains unclosed entries.
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.finish(TarArchiveOutputStream.java:225)
at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.close(TarArchiveOutputStream.java:241)
at hudson.util.io.TarArchiver.close(TarArchiver.java:127)
at hudson.FilePath$Archive.invoke(FilePath.java:498)
at hudson.FilePath$Archive.invoke(FilePath.java:483)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3082)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Start by tracing the stash failure through StashManager.stash, StashStep$Execution.run, hudson.FilePath.archive, and TarArchiver.close as shown in the stack trace. Reproduce a pipeline that runs npm install before stashing, then compare it with a run that omits npm install. Done means the npm-install case completes without the unclosed-entries IOException.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, javascript
Ambito
build-system, ci-cd
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.