microsoft / microsoft/vscode-mssql
SqlToolsService installation directory collision on multi-arch setups (EPIPE / Exec Format Error)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 610
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 97
Description
Description
The extension fails to initialize and throws a write EPIPE error on extension startup in environments where the extension directory is shared/cached/moved across hosts with different CPU architectures (e.g., WSL, remote containers, devcontainers, or remote server VMs where directories are shared/rsynced/restored).
This occurs because the extension's installer logic (serviceInstallerUtil.js / extension.js) maps different architectures of the same operating system to the exact same folder name under sqltoolsservice/{#version#}/{#platform#}:
Linux(x86_64) andLinux_ARM64(aarch64) both map to./sqltoolsservice/{#version#}/LinuxOSXandOSX_ARM64both map to./sqltoolsservice/{#version#}/OSXWindows_64andWindows_ARM64both map to./sqltoolsservice/{#version#}/Windows
If the extension installs the service on an ARM64 machine/host, it writes the aarch64 binaries to ./sqltoolsservice/{#version#}/Linux. When the environment is subsequently loaded on an x86_64 host (or vice versa), the extension checks if the folder exists, assumes the service is already present, and tries to execute the incompatible binary. This causes an exec format error and crashes the backend process immediately, leading to a write EPIPE error on the extension host stdin pipe.
Steps to Reproduce
- Install and activate the
ms-mssql.mssqlextension in an ARM64 Linux host (e.g., a devcontainer or VM running on Apple Silicon). - The installer downloads
linux-arm64-net10.0.tar.gzand extracts it into~/.vscode-server/extensions/ms-mssql.mssql-1.43.0-universal/sqltoolsservice/6.0.20260527.1/Linux/. - Open or sync the same extension/workspace directory on an x86_64 Linux host, or connect to a WSL environment on an x86_64 Windows machine that shares or restores cached extension folders.
- Try to load the extension.
- The extension sees the
Linuxdirectory exists and tries to execute the ARM64MicrosoftSqlToolsServiceLayerbinary. - The execution fails with exit code 126 (
exec format error), crashing the backend service and resulting in awrite EPIPEerror.
Affected Area
- Other: Extension startup / SqlToolsService installer architecture collision.
Environment Information
• VS Code / IDE Version: Antigravity IDE (connecting to WSL)
• WSL Version: WSL2 (Ubuntu Linux x86_64)
• Host OS: Windows (x86_64 CPU)
• MSSQL Extension Version: 1.43.0 (Universal)
• Operating System: Linux x86_64 (running cached extension folder from ARM64 build/run)
• Connection Type (SQL database in Fabric, Azure SQL, SQL Server, etc.): SQL Server
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading serviceInstallerUtil.js and extension.js, focusing on how platform and architecture determine the SqlToolsService installation directory and how an existing directory is validated. Reproduce the ARM64-to-x86_64 cache scenario described in the issue. Done means installations for different architectures no longer collide and the service starts with the matching binary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100