Skip to content

Investigate possible solutions for "Text file busy" errors during builds #14726

Closed
@sreya

Description

@sreya

This is unfortunately an issue with Terraform (and largely just filesystems in general). Some background:

  • text file busy can occur in Linux when a process tries to write or modify an executable that's currently running. In TF's case this typically happens when multiple processes try to write and use plugins from the same cache directory.
  • In Coder's case we use a separate cache directory per runner. e.g. if you're running 3 runners they should all be writing their plugins to their own exclusive directories avoiding this problem.
  • Despite this I'm guessing that some terraform or plugin process is not exiting on a run which causes subsequent runs to fail.

Regardless we should do our best to circumvent this when we detect this during a build. It's unknown to me how long the process lingers but it could potentially be indefinitely which would render that particular runner dead for subsequent runs, requiring the end user to rebuild a number of times before getting a successful build which is not acceptable.

e.g.

Initializing the backend...

09:45:57.672Initializing provider plugins...

09:45:57.672- Finding coder/coder versions matching "~> 0.23.0"...

09:45:57.761- Finding hashicorp/kubernetes versions matching "~> 2.30.0"...

09:45:58.031- Installing coder/coder v0.23.0...

09:45:58.330- Installing hashicorp/kubernetes v2.30.0...

09:45:59.405- Installed hashicorp/kubernetes v2.30.0 (signed by HashiCorp)

09:45:59.406Error: Failed to install provider

09:45:59.406Error while installing coder/coder v0.23.0: open

09:45:59.407/tmp/coder/provisioner-1/tf/registry.terraform.io/coder/coder/0.23.0/linux_amd64/terraform-provider-coder_v0.23.0:

09:45:59.408text file busy

Metadata

Metadata

Assignees

Labels

s2Broken use cases or features (with a workaround). Only humans may set this.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy