canonical / canonical/craft-cli

Multiprocess operations can lead to spinner deadlock

Open
#172 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
16
Forks
27
Avg merge
1d 22h
Merged PRs (30d)
10

Description

### Bug Description

There is a bad interaction between the way we perform overlay operations (a chroot in a multiprocess-created subprocess) and the way craft applications indicate progress on the cli (a spinner in a thread).

The consequence of the bad interaction is that trying to write an info message to the terminal ends up deadlocking the main thread in the subprocess because the thread that could unblock it does not exist.

See https://github.com/canonical/craft-parts/pull/535.

### To Reproduce

TODO

### part yaml

_No response_

### Relevant log output

```shell
TODO
```

Contributor guide

Open the contributing guide

Research direction

Start by reading the linked craft-parts PR 535 and tracing the overlay/chroot subprocess path together with the CLI spinner thread. Reproduce the TODO scenario involving an info message, then verify that writing it no longer deadlocks the subprocess.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.