Skip to content

docker usage left pid file alive in case of crash #39

Description

@jupe

Note that this issue is not obvious library bug, more like opening discussion around topic.

background: https://petermalmgren.com/signal-handling-docker/

use case:
pid library is used inside docker so that lock files are stored to mounted folder that host holds (not inside docker). Library lock down physical resource for test usage while tests are running. pid file is destroyed normally when tests ends but if for some reason test crashes pid module doesn't have chance to remove pid file and file left behind. This process pid is always 1 because of it's running inside docker.

problem:
if process dies and pid file with pid 1 left behind it means that next process thinks pid file is still valid and resource cannot be used until pid file is destroyed separately.

This is annoying issue that luckily happens rarely but haven't figure out yet any good solution to avoid such problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions