[JIRA] (JENKINS-61368) Archiving artifacts takes a long time when the pattern does not match

6 views
Skip to first unread message

mcrowe@brightsign.biz (JIRA)

unread,
Mar 6, 2020, 9:59:02 AM3/6/20
to jenkinsc...@googlegroups.com
Mike Crowe moved an issue
 
Jenkins / Bug JENKINS-61368
Archiving artifacts takes a long time when the pattern does not match
Change By: Mike Crowe
Project: Infrastructure Jenkins
Key: INFRA JENKINS - 2511 61368
Workflow: classic default workflow JNJira + In-Review
Component/s: core
Component/s: core
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo

mcrowe@brightsign.biz (JIRA)

unread,
Mar 6, 2020, 10:15:02 AM3/6/20
to jenkinsc...@googlegroups.com

mcrowe@brightsign.biz (JIRA)

unread,
Mar 6, 2020, 10:16:03 AM3/6/20
to jenkinsc...@googlegroups.com
Mike Crowe updated an issue
I have a matrix job that is configured with:

Archive the artifacts: {{bsoe/publish/*.bsfw.sha1.txt}}

Not all of the matrix combinations are expected to generate artifacts. The build log for one that does not contains:
{noformat}
14:34:48 Archiving artifacts
14:38:34 ‘bsoe/publish/*.bsfw.sha1.txt’ doesn’t match anything: ‘bsoe’ exists but not ‘bsoe/publish/*.bsfw.sha1.txt’
14:38:34 No artifacts found that match the file pattern "bsoe/publish/*.bsfw.sha1.txt". Configuration error?
{noformat}
The error message is expected because the {{bsoe/publish}} directory is empty. However, I don't expect it to take ~4 minutes to discover that it needs to report that. If I run {{strace}} on the Java thread that appears to be busy during this time I can see it attempting to open (what looks like) every single file in the workspace with {{O_DIRECTORY}} and failing because the file is not a directory. If it successfully opens a directory then it calls {{fstat}} and {{getdents}} a few times before closing it. It looks like the glob pattern matcher has gone wild.

If I make the job create a dummy file that does match the pattern then the error goes away and archiving is quick.

(To be clear, the filenames I see in the {{strace}} output are not underneath {{bsoe/publish}}, they are elsewhere in the workspace.)

Expected behaviour: Archiving no artifacts should take negligible time.
Actual behaviour: Archiving no artifacts takes several minutes with a large workspace.
 
Reply all
Reply to author
Forward
0 new messages