-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix hermit text file busy issues on linux
#5372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: The-Best-Codes <[email protected]>
Signed-off-by: The-Best-Codes <[email protected]>
The-Best-Codes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready for review!
|
|
|
This issue also affects jbang and uvx scripts. # Check if Hermit binary exists and download if not
if [ ! -f ~/.config/goose/mcp-hermit/bin/hermit ]; thenThe “text file busy” lock issue occurs only on the first start, when Hermit is not yet installed. |
|
@IA386 Yep I'm aware that is affects
This is what I thought at first but not what I experienced in my testing, possibly because cleanup doesn't happen properly on failure, and it gets stuck in a “locked” state after that? Not sure. |
|
At least to my understanding of the issue, there’s no cleanup process involved — the binary just dies. Your solution won’t work if someone tries to run it for the first time with a uvx-based MCP or jbang (haven’t seen any MCPs available, but I haven’t really looked either). So in its current form, this PR doesn’t fully address the issue across different environments unless those scripts are updated as well. Regarding the implementation — I don’t like that it will execute every time. On a successful install, subsequent runs will still copy an already replaced bin/hermit script. If I can make a suggestion — please see my comment on #2351. I’m not completely happy with that approach either, but it only triggers once, while the Hermit environment is not yet bootstrapped. IMHO, the best solution would be to keep the binary with its original name inside the mcp-hermit folder and leave it as is. |
|
Looking forward to a fix on this issue, it is making this unusable in linux. |
Signed-off-by: The-Best-Codes <[email protected]>
The-Best-Codes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes are ready for review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Nice. Thanks for the revisions on this @The-Best-Codes |
* 'main' of github.com:block/goose: (21 commits) Manual compaction counting fix + cli cleanup (#5480) chore(deps): bump prismjs and react-syntax-highlighter in /ui/desktop (#5549) fix: remove qwen3-coder from provider/mcp smoke tests (#5551) fix: do not build unsigned desktop app bundles on every PR in ci. add manual option. (#5550) fix: update Husky prepare script to v9 format (#5522) Fix 404 for responsible coding guide (#5543) fix hermit `text file busy` issues on linux (#5372) Fix image processing (#5544) docs: AI attribution for PRs (#5547) chore(tests/mcp): testing for MCP sampling (#5456) docs: adding HOWTOAI.md (#5533) added configuration content, also added signoff, fix merging issue with another commit by creating a clean branch. removed and closed commits that caused signoff issues. (#5519) Fixes Gemini API parse issue by converting nullable type arrays to single types in tool schemas (#5530) Troubleshooting diagnostics doc (#5526) fix link to Ollama FAQ (#5531) docs: remove speech-mcp (#5514) fix: adds ProviderRetry to openai provider (#5518) docs: extensions directory minor updates (#5466) Docs/json recipe support (#5492) docs: recipe buttons (#5507) ...
Signed-off-by: The-Best-Codes <[email protected]> Signed-off-by: fbalicchia <[email protected]>
|
Note: After upgrading I had to delete the mcp hermit directory and then it worked: |
|
@rinormaloku Yep 💯 |
|
Thanks for contributing this fix @The-Best-Codes |
Signed-off-by: The-Best-Codes <[email protected]> Signed-off-by: Blair Allan <[email protected]>
Summary
For several months, Linux users have frequently been unable to add STDIO MCP extensions (e.g., extensions using the
npxcommand, etc.). Obviously this is a key functionality and affects a lot of MCP servers!The goose setup script fails on Linux with a
text file busyerror. I suspect this is because Hermit tries to self-update its running binary, which Linux locks, unlike macOS. The fix uses a temporarybin/hermitcopy on Linux to prevent lock conflicts, redirects activation output to a log file for clean stderr, and skips these changes on macOS to preserve existing behavior.Type of Change
Testing
I've manually tested this on Linux. I need a macOS user to test these changes. Steps to test on macOS:
gh pr checkout 5372in thegoosedirectory. To open the PR in a codespace, view the PR in GitHub and clickCodein the top right of the PR, thenCodespaces > Create codespace on best/fix-hermit-lock.just run-uifrom thegoosedirectory to start the desktop UI, then navigating toExtensionsin the sidebar. Once there, find any MCP server that uses an STDIO command such asnpx, disable it, and enable it again. If you don't see any MCP servers that usenpx, add a new one,npx -y @angiejones/mcp-seleniumfor example. If you see an error, please report it to me! If not, everything should be fine. Play around with goose a bit to make sure.Related Issues
Relates to #2351, #5048, #3030