rust-lang / rust-lang/rust-clippy

Clippy leaves cargo running in the background on SIGTERM

Open
#4,505 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

When you kill cargo-clippy via SIGTERM it will leave a detached cargo check process running in the background. If, for example, the clippy instance was launched by your editor and killed when you exited it this can result in a long duration of Blocking waiting for file lock on build directory when you attempt to run cargo test.

Test reproduction:

  • Run cargo clean && cargo clippy on a project that will take a decent while to check
  • In another terminal run killall cargo-clippy to send SIGTERM
  • In the original terminal watch the process exit, but the output from checking continue to be printed

This appears to be already fixed by #3837, so maybe not worth trying to fix the current subcommand, I'm mostly opening this as informational in case others run into it as well.

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

Reproduce the SIGTERM behavior with cargo clean && cargo clippy and killall cargo-clippy, then review the referenced issue #3837. Confirm whether that fix covers the detached cargo check process and the resulting build-directory lock; no specific file or test is named in this issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.