onepub-dev / onepub-dev/dcli

NamedLock unable to clear locks under docker.

Open
#128 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
265
Forks
30
PR merge metrics
No merged PRs in 30d

Description

When using NamedLock in docker, if a dcli app crashes it can leave a stale namedlock.

The named lock logic uses the processes pid to determine if a lock is not stale.

In docker an app will always get the same pid id (1) so it will always look like it is use.

Consider using the processes start time. to help identify the pid is the one we thought it is.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the NamedLock implementation and tracing how it decides whether a lock is stale from the process ID. Reproduce the behavior for a dcli app running in Docker, then verify that a crashed process whose PID is reused no longer leaves the lock appearing active.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.