Bamboo Build Hangs During Artifact Publish with Wildcard Pattern Traversal

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Low
    • None
    • Affects Version/s: 10.2.15
    • Component/s: Artifacts
    • None
    • Severity 3 - Minor

      Issue Summary

      When an artifact definition uses a broad wildcard/Ant copy pattern such as *{}/{}, Bamboo's artifact publish process recursively traverses all subdirectories within the build working directory. If the working directory contains a deep or large directory structure (e.g., node_modules, .m2 repository, vendor directories), the build appears to hang indefinitely during the "Publishing an artifact" phase.

      Steps to Reproduce

      1. Create a Bamboo build plan with a job that produces a build output with a large directory tree (e.g., a Maven/Gradle/npm project with many dependencies).
      2. Define an artifact with:
        • Location: (blank or a broad directory)
        • Copy Pattern: *{}/{}
        • Shared: enabled
      3. Run the build.
      4. Observe the build log — the build hangs at the line: Publishing an artifact: <artifact_name> and does not progress.

      Expected Results

      The artifact publish phase should complete within a reasonable time, or Bamboo should enforce a timeout / provide a warning when the number of files/directories being traversed exceeds a threshold.

      Actual Results

      • The below exception is thrown in the <bamboo-agent-home>/logs/atlassian-bamboo.log file:
        2026-04-21 14:13:35,292 INFO [0-BAM::192.168.4.21 (2)::Agent:Thread-15] [AbstractArtifactManager] Republishing [scan] for TP-TP-JOB1-50
        2026-04-21 14:13:35,343 INFO [0-BAM::192.168.4.21 (2)::Agent:Thread-15] [AbstractArtifactManager] Trying to republish the artifact with handler: com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler
        2026-04-21 14:14:36,863 WARN [0-BAM::192.168.4.21 (2)::Agent:Thread-15] [ArtifactStreams] Error during artifact transfer, total bytes written: 303599120, total requested: 304265280, latest request: 666160
        java.net.SocketException: Broken pipe
                at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:425) ~[?:?]
                at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:445) ~[?:?]
                at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:831) ~[?:?]
                at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035) ~[?:?]
                at java.base/sun.security.ssl.SSLSocketOutputRecord.deliver(SSLSocketOutputRecord.java:345) ~[?:?]
                at java.base/sun.security.ssl.SSLSocketImpl$AppOutputStream.write(SSLSocketImpl.java:1304) ~[?:?]
                at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:124) ~[bamboo-agent-bootstrap.jar:?]
                at org.apache.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:160) ~[bamboo-agent-bootstrap.jar:?]
                at org.apache.http.impl.io.ChunkedOutputStream.flushCacheWithAppend(ChunkedOutputStream.java:122) ~[bamboo-agent-bootstrap.jar:?]
                at org.apache.http.impl.io.ChunkedOutputStream.write(ChunkedOutputStream.java:179) ~[bamboo-agent-bootstrap.jar:?]
                at java.base/java.util.zip.DeflaterOutputStream.deflate(DeflaterOutputStream.java:261) ~[?:?]
                at java.base/java.util.zip.DeflaterOutputStream.write(DeflaterOutputStream.java:210) ~[?:?]
                at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:147) ~[commons-io-2.16.1.jar:2.16.1]
                at org.apache.commons.compress.utils.FixedLengthBlockOutputStream$BufferAtATimeOutputChannel.write(FixedLengthBlockOutputStream.java:93) ~[commons-compress-1.26.0.jar:1.26.0]
                at org.apache.commons.compress.utils.FixedLengthBlockOutputStream.writeBlock(FixedLengthBlockOutputStream.java:266) ~[commons-compress-1.26.0.jar:1.26.0]
                at org.apache.commons.compress.utils.FixedLengthBlockOutputStream.maybeFlush(FixedLengthBlockOutputStream.java:176) ~[commons-compress-1.26.0.jar:1.26.0]
                at org.apache.commons.compress.utils.FixedLengthBlockOutputStream.write(FixedLengthBlockOutputStream.java:213) ~[commons-compress-1.26.0.jar:1.26.0]
                at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.write(TarArchiveOutputStream.java:669) ~[commons-compress-1.26.0.jar:1.26.0]
                at com.atlassian.bamboo.v2.build.agent.messages.ArtifactStreams.copyLarge(ArtifactStreams.java:191) ~[atlassian-bamboo-agent-core-10.2.15.jar:?]
                at com.atlassian.bamboo.v2.build.agent.messages.ArtifactStreams.writeFilesToStream(ArtifactStreams.java:161) ~[atlassian-bamboo-agent-core-10.2.15.jar:?]
                at com.atlassian.bamboo.v2.build.agent.messages.ArtifactStreams.writeFileSetToStream(ArtifactStreams.java:126) ~[atlassian-bamboo-agent-core-10.2.15.jar:?]
                at com.atlassian.bamboo.build.artifact.BambooArtifactHttpTransport$ArtifactHttpEntity.writeTo(BambooArtifactHttpTransport.java:130) ~[atlassian-bamboo-agent-remote-10.2.15.jar:?]
      • The build appears hung at the artifact publish step for an extended period.
      • Build will not respond to stop build action unless the agent is restarted
      • Build will get killed only if hanging build is configured.

      Workaround

      • Option 1: Limit the artifact scan to specific location in the build working directory under artifact configuration.
        • You may even have a build step / script task that scans and moves all matching files into a more specific location as preparation.
      • Option 2: Increase the Increase the connectionTimeout in the server.xml to a higher timeout like 30 minutes.
      • Option 3: Add a script task to ZIP all the required files and configure artifact to publish the ZIP file instead of wildcard

              Assignee:
              Mateusz Szmal
              Reporter:
              Venkata Sateesh Pentela
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: