Skip to content

Coder scripts exit the following error: exec: WaitDelay expired before I/O complete #10400

Closed
@mafredri

Description

@mafredri

Sometimes coder_scripts exit with:

2023-10-24 19:31:17.915 [warn]  /tmp/coder-startup-script.log script failed  log_path=/tmp/coder-startup-script.log  execution_time=29.626176306s  exit_code=255  error="exec: WaitDelay expired before I/O complete"

This usually means that a background/disowned process was started by the script and that the background process is still running and has references to file descriptors (usually stdout or stderr) when the script exits.

A simple fix is to redirect stdout and stderr (e.g. to a file, or discard):

my_background_process >/dev/null 2>&1 &

However, we can fix this by:

  1. Improving the error message and linking to docs
  2. Investigate if there's a way we can exit cleanly even when redirection isn't used

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