Skip to content

Builds hanging forever following a symlink #22

@pdohertybcov

Description

@pdohertybcov

After installing the browserstack 2.0.0 plugin our builds hang indefinitely. (A build that used to take 2 minutes is still running after 20 hours)

We think it's related to this code:
https://github.com/browserstack/teamcity-plugin/blob/master/browserstack-teamcity-agent/src/main/java/com/browserstack/automate/ci/teamcity/BrowserStackLocalAgent.java#L109-L111

And may be related to this issue: #16

The builds that triggered this have a symlink that points to the parent directory, which seems to result in a state of infinite recursion when the plugin starts inspecting the directory. The build steps will finish, and then the build just hangs indefinitely with the Java process on the agent running at 100% CPU. Using strace on the java process shows it running stat on an ever expanding path like foo/bar/foo/bar/foo/bar/foo/bar...

A simple reproduction is a build like so:

#!/usr/bin/env bash
set -euo pipefail
set -x
ln -s . ./here
ln -s . ./here2
ls -al ./
ls -al here/
ls -al here2/
echo "Success!  But the agent will hang after this script successfully finishes."

Can this be fixed? It's completely blocking us from being able to use the plugin.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions