[JIRA] [workflow-plugin] (JENKINS-30244) Stash command with includes: '**' fails due to "unclosed entries"

9 views
Skip to first unread message

jenkinsjira@marcuscobden.co.uk (JIRA)

unread,
Sep 1, 2015, 8:38:02 AM9/1/15
to jenkinsc...@googlegroups.com
Marcus Cobden created an issue
 
Jenkins / Bug JENKINS-30244
Stash command with includes: '**' fails due to "unclosed entries"
Issue Type: Bug Bug
Assignee: Jesse Glick
Components: workflow-plugin
Created: 01/Sep/15 12:37 PM
Priority: Minor Minor
Reporter: Marcus Cobden

I highly suspect it's attempting to archive the DurableTask's controlDir.

{{
java.io.IOException: remote file operation failed: /home/jenkins/workspace/TTVM/DSL at hudson.remoting.Channel@4946711c:ttvm-build-02-1e8c2034: java.io.IOException: This archives contains unclosed entries.
at hudson.FilePath.act(FilePath.java:987)
at hudson.FilePath.act(FilePath.java:969)
at hudson.FilePath.archive(FilePath.java:450)
at org.jenkinsci.plugins.workflow.flow.StashManager.stash(StashManager.java:87)
at org.jenkinsci.plugins.workflow.support.steps.stash.StashStep$Execution.run(StashStep.java:85)
at org.jenkinsci.plugins.workflow.support.steps.stash.StashStep$Execution.run(StashStep.java:75)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:49)
at hudson.security.ACL.impersonate(ACL.java:213)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:47)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: 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:115)
at hudson.FilePath$1.invoke(FilePath.java:456)
at hudson.FilePath$1.invoke(FilePath.java:450)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2691)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:324)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at hudson.remoting.Engine$1$1.run(Engine.java:63)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to ttvm-build-02-1e8c2034(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:778)
at hudson.FilePath.act(FilePath.java:980)
... 13 more
}}

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Sep 1, 2015, 9:47:02 AM9/1/15
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Incomplete
 

Doubtful that a durable-task control directory is responsible, since that is deleted after such a task finishes, so you would encounter such a problem only in a script like

parallel a: {
  sh 'sleep 60'
}, b: {
  sleep 5
  stash 'all'
}

Anyway you have no steps to reproduce, or information about your environment. Presumably you are running Workflow 1.10. But what version of Jenkins core? The stack trace suggests either a trunk build including

JENKINS-10629 , or the ill-fated 1.610. This is notable because the error message is coming from within Apache Commons Compress, which only those versions of Jenkins use (to my knowledge); Workflow is only calling a utility method in Jenkins core to create a tarball, so this feels more like a core bug.

And what is the Workflow script? You mention includes: '**' without further details. If you include only specific files does it succeed? Is the error reproducible, or you just saw it once?

Change By: Jesse Glick
Status: Open Resolved
Resolution: Incomplete

jglick@cloudbees.com (JIRA)

unread,
Sep 1, 2015, 9:48:01 AM9/1/15
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
I highly suspect it's attempting to archive the DurableTask's controlDir.

{ { code:none}
{code } }

mrose@sjm.com (JIRA)

unread,
Mar 10, 2016, 5:39:02 PM3/10/16
to jenkinsc...@googlegroups.com
Michael Rose reopened an issue
 

I am having the same issue with the workflow script that I created.

Jenkins version: 1.651
Pipeline plugin version: 1.14

Here is a simplified version of the script that produces the error.

x = ['x86_64-Linux-RHEL7','x86_64-Linux-2.618']
conf=[:]
for (int i = 0; i < 2; i++){
    def arch=x[i]
    conf[arch] = {
        node(arch) {
            sh "mkdir -p $arch/x/xx/xxx/xxxx; touch $arch-y1 $arch/x/xx/y2 $arch/x/xx/xxx/y3 $arch/x/xx/xxx/xxxx/y4"
            stash includes: "$arch-y1,$arch/**/*", name: "${arch}-common"
        }
    }
}
node('master'){
    parallel conf
}
Change By: Michael Rose
Resolution: Incomplete
Status: Resolved Reopened

mrose@sjm.com (JIRA)

unread,
Mar 10, 2016, 5:42:02 PM3/10/16
to jenkinsc...@googlegroups.com
Michael Rose commented on Bug JENKINS-30244
 
Re: Stash command with includes: '**' fails due to "unclosed entries"

Actually it looks like the problem has nothing to do with parallel and is just the fact that stash is being called more than once.

This script produces the same error.

x = ['x86_64-Linux-RHEL7','x86_64-Linux-2.618']
conf=[:]
for (int
 i = 0; i < 2; i++){
    def arch=x[i]
    node(arch) {
        sh "mkdir -p $arch/x/xx/xxx/xxxx; touch $arch-y1 $arch/x/xx/y2 $arch/x/xx/xxx/y3 $arch/x/xx/xxx/xxxx/y4"
        stash includes: "$arch-y1,$arch/**/*", name: "${arch}-common"
    }
}

mrose@sjm.com (JIRA)

unread,
Mar 10, 2016, 6:17:01 PM3/10/16
to jenkinsc...@googlegroups.com

CORRECTION: It has nothing to do with the number of time stash is called. It simply failed when run on RHEL 5.6.

x = ['x86_64-Linux-2.618'] //,'x86_64-Linux-RHEL7']
conf=[:]
for (int i = 0; i < 2; i++){
    def arch=x[i]
    node(arch) {
        sh "mkdir -p $arch/x/xx/xxx/xxxx; touch $arch-y1 $arch/x/xx/y2 $arch/x/xx/xxx/y3 $arch/x/xx/xxx/xxxx/y4"
        stash includes: "$arch-y1,$arch/**/*", name: "${arch}-$i-common"
    }
}

This caused an error when run on:
-sh-3.2$ uname -a
Linux b261802 2.6.18-238.5.1.el5 #1 SMP Mon Feb 21 05:52:39 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

jglick@cloudbees.com (JIRA)

unread,
Aug 29, 2016, 2:12:03 PM8/29/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: workflow-api-plugin
Component/s: pipeline
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

jglick@cloudbees.com (JIRA)

unread,
Oct 19, 2016, 6:21:02 PM10/19/16
to jenkinsc...@googlegroups.com
Jesse Glick commented on Bug JENKINS-30244
 
Re: Stash command with includes: '**' fails due to "unclosed entries"

Hmm, will have to see if this can be reproduced using a stock Docker image, or if it needs VirtualBox etc. Do you happen to know how to reproduce from scratch? Does it work on some platforms and fail on others? I was not able to reproduce using a trimmed version of your script in a functional test.

jglick@cloudbees.com (JIRA)

unread,
Oct 19, 2016, 6:22:01 PM10/19/16
to jenkinsc...@googlegroups.com
Jesse Glick edited a comment on Bug JENKINS-30244
Hmm, will have to see if this can be reproduced using a stock Docker image, or if it needs VirtualBox etc. Do you happen to know how to reproduce from scratch? Does it work on some platforms and fail on others? I was not able to reproduce using a trimmed version of your script in a functional test on Ubuntu (4 . 4.0-43 x86_64).

dubrsl@gmail.com (JIRA)

unread,
Oct 22, 2018, 7:30:02 AM10/22/18
to jenkinsc...@googlegroups.com

Get tha same error:

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dubrsl@gmail.com (JIRA)

unread,
Oct 22, 2018, 7:34:03 AM10/22/18
to jenkinsc...@googlegroups.com
Get tha the same error on Centos-7 : (
Jenkins ver. 2.138.2
workflow-basic-steps 2.11

dubrsl@gmail.com (JIRA)

unread,
Oct 22, 2018, 7:40:02 AM10/22/18
to jenkinsc...@googlegroups.com

dubrsl@gmail.com (JIRA)

unread,
Oct 22, 2018, 7:42:02 AM10/22/18
to jenkinsc...@googlegroups.com

Jenkins ver. 2.138.2
workflow-basic-steps 2.11

And it happen very often:  2-3 times from 10 builds.
Don't see errors in jenkins logs.

jglick@cloudbees.com (JIRA)

unread,
Oct 24, 2018, 8:34:02 AM10/24/18
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Unassigned
 
Change By: Jesse Glick
Assignee: Jesse Glick

tomer.zelberzvig@model9.io (JIRA)

unread,
Nov 5, 2018, 3:00:02 AM11/5/18
to jenkinsc...@googlegroups.com
Tomer Zelberzvig commented on Bug JENKINS-30244
 
Re: Stash command with includes: '**' fails due to "unclosed entries"

We also started to experience this issue with our CI process.

However we stash files from a z/OS Jenkins Slave, any update regarding this ticket?

Reply all
Reply to author
Forward
0 new messages