Skip to content
This repository was archived by the owner on Oct 5, 2020. It is now read-only.
This repository was archived by the owner on Oct 5, 2020. It is now read-only.

Script execution can hang forever consuming stdout/stderr #15

@mutability

Description

@mutability

If the script plugin spawns a shellscript that spins off some background subprocesses and exits, and those subprocesses do not close stdout/stderr, then the script plugin will hang forever (or at least until all the subprocesses have exited) trying to consume stdout/stderr output.

There should probably be a timeout here, limiting the time spent waiting for stdout/stderr EOF after the immediate child process exits. Otherwise it leads to very non-obvious behaviour: on the host running the task, all you can see is the celery worker sitting there doing nothing with no subprocesses, and there's no simple way to trace which other process somewhere else in the system is making the task hang.

This situation will also prevent the host from being uninstalled/deleted (as the worker uninstall task will block forever waiting for celery to finish the stuck task)

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