linux lsof hangs run-command-shim in function check_binary_write_lock

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

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
shell

Research direction

Start at the run-command-shim shell function check_binary_write_lock and reproduce the lsof call against an unresponsive filesystem such as an NFS mount. Compare the proposed non-blocking lookup or removal of the verification, and confirm that run-command-shim no longer hangs while still handling the binary write-lock check.

Written by the indexing model from the issue text.

Description

run-command-shim shell ( function check_binary_write_lock ) script uses "lsof" to find some locking info, see below section of the code.
lsof could hang due to various reasons and so the calling script run-command-shim, one example is with unresponsive filesystems like NFS mounts.
The solution may be to use other non-blocking ways to find required info or simply remove this verification.
Thank you

check_binary_write_lock() { set +e # disable exit on non-zero return code local retry_attempts=0 while (( retry_attempts < 10 )); do lsof_result="$(lsof -F ac ${bin})"

Dominant language
Go
Stars
4
Forks
13
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

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.

More from Azure/run-command-extension-linux

All issues in Azure/run-command-extension-linux

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.