microsoft / microsoft/vscode-mssql

SqlToolsService installation directory collision on multi-arch setups (EPIPE / Exec Format Error)

Open
#22,347 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area - Acquisition Bug
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) and Linux_ARM64 (aarch64) both map to ./sqltoolsservice/{#version#}/Linux
  • OSX and OSX_ARM64 both map to ./sqltoolsservice/{#version#}/OSX
  • Windows_64 and Windows_ARM64 both 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
  1. Install and activate the ms-mssql.mssql extension in an ARM64 Linux host (e.g., a devcontainer or VM running on Apple Silicon).
  2. The installer downloads linux-arm64-net10.0.tar.gz and extracts it into ~/.vscode-server/extensions/ms-mssql.mssql-1.43.0-universal/sqltoolsservice/6.0.20260527.1/Linux/.
  3. 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.
  4. Try to load the extension.
  5. The extension sees the Linux directory exists and tries to execute the ARM64 MicrosoftSqlToolsServiceLayer binary.
  6. The execution fails with exit code 126 (exec format error), crashing the backend service and resulting in a write EPIPE error.
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

  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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.