dotnet / dotnet/vscode-dotnet-runtime
.NET Acquisition Failed: Lock acquisition timeout with EADDRINUSE error
- Dominant language
- TypeScript
- Stars
- 209
- Forks
- 455
- PR merge metrics
- No merged PRs in 30d
Description
## Description
The .NET Runtime extension fails to acquire a lock during the acquisition process, resulting in a timeout error that prevents the extension from functioning.
## Extension Version
3.1.0 (VS Code Insiders)
## Error Message
```
.NET Acquisition Failed: Action: vscdGlLk-2bc5d34a-076d-466d-b3ce-991e87349d9d Failed to acquire lock /var/folders/q2/4nqfv8gs1mv4pdjjnj_4lrh00000gn/T/vscd-vscdGlLk.sock after 12001 retries out of 12001 total available attempts. Last error: EADDRINUSE.
```
## Environment
- **OS:** macOS
- **Extension Version:** 3.1.0
- **VS Code:** Insiders build
## Details
The extension attempts to acquire a lock at `/var/folders/q2/4nqfv8gs1mv4pdjjnj_4lrh00000gn/T/vscd-vscdGlLk.sock` but fails after 12001 retry attempts. The `EADDRINUSE` error indicates the socket address is already in use, suggesting either:
1. Another VS Code process or instance is holding the lock
2. A stale lock file is not being cleaned up properly
3. The lock timeout configuration needs adjustment
## Error Stack Trace
```
Error: .NET Acquisition Failed: Action: vscdGlLk-2bc5d34a-076d-466d-b3ce-991e87349d9d Failed to acquire lock /var/folders/q2/4nqfv8gs1mv4pdjjnj_4lrh00000gn/T/vscd-vscdGlLk.sock after 12001 retries out of 12001 total available attempts. Last error: EADDRINUSE.
at S.getErrorOrStringAsEventError (/Users/anonymous/.vscode-insiders/extensions/vscode-dotnet-runtime-library/dist/Acquisition/DotnetCoreAcquisitionWorker.js:301:20)
at S.next (/Users/anonymous/.vscode-insiders/extensions/vscode-dotnet-runtime-library/dist/Acquisition/DotnetCoreAcquisitionWorker.js:175:38)
at Generator.next ()
at s (/Users/anonymous/.vscode-insiders/extensions/vscode-dotnet-runtime-library/dist/Acquisition/DotnetCoreAcquisitionWorker.js:5:58)
```
## Suggested Workarounds (from error message)
- Restart your machine
- Delete the lock file manually
- Increase the timeout time in extension settings
- Set `VSCODE_DOTNET_RUNTIME_DISABLE_MUTEX=true` in environment variables
- Increase OS path length limit to at least 256 characters
- On Linux, set `XDG_RUNTIME_DIR` to a writeable directory
## Log File
A detailed log file is available at: `/Users/m2ultra/Library/Application Support/Code - Insiders/logs/20260702T205927/window3/exthost/ms-dotnettools.vscode-dotnet-runtime/DotNetAcquisition-ms-dotnettools.vscode-dotnet-runtime-1783040502295.txt`
Note: This file may contain personal data.
Contributor guide
Research direction
Start with the acquisition failure in dist/Acquisition/DotnetCoreAcquisitionWorker.js around the reported stack-trace locations, then review the attached DotNetAcquisition log for the EADDRINUSE sequence. Reproduce the macOS VS Code Insiders failure and determine whether acquisition can complete reliably without the lock timeout; no specific test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100