Description
catalog.getModel() causes a segmentation fault on Linux (Ubuntu 24.04 under WSL2). The native core library loads and initializes successfully, and downloadAndRegisterEps() completes without issue, but calling catalog.getModel('qwen2.5-0.5b') crashes with a segfault.
Repro steps
- On Ubuntu 24.04 (WSL2, Windows 11):
mkdir test && cd test
npm init -y
# Remove foundry-local-sdk-winml from optionalDependencies if present (blocks Linux binary download)
npm install foundry-local-sdk
- Run this minimal script:
import { FoundryLocalManager } from 'foundry-local-sdk';
const manager = FoundryLocalManager.create({ appName: 'test', logLevel: 'trace' });
await manager.downloadAndRegisterEps(() => {}); // OK
console.log('EPs done');
const model = await manager.catalog.getModel('qwen2.5-0.5b'); // Segfault here
- Output:
EPs done
Getting model...
Segmentation fault (core dumped)
Environment
- OS: Ubuntu 24.04.2 LTS on WSL2 (Windows 11)
- Hardware: Intel i7-11370H, NVIDIA RTX A2000 Laptop (4 GB), 16 GB RAM
- Node.js: v22.22.1
- foundry-local-sdk: 1.0.0
- CUDA: 12.8 (driver 573.71)
Notes
- The native library
Microsoft.AI.Foundry.Local.Core.so loads successfully via koffi
FoundryLocalManager.create() and downloadAndRegisterEps() both work
- Crash only occurs when querying the catalog
- The
foundry-local-sdk-winml optional dependency must be removed from package.json for the Linux native binaries to download (the install script skips when winml is detected)
Description
catalog.getModel()causes a segmentation fault on Linux (Ubuntu 24.04 under WSL2). The native core library loads and initializes successfully, anddownloadAndRegisterEps()completes without issue, but callingcatalog.getModel('qwen2.5-0.5b')crashes with a segfault.Repro steps
Environment
Notes
Microsoft.AI.Foundry.Local.Core.soloads successfully via koffiFoundryLocalManager.create()anddownloadAndRegisterEps()both workfoundry-local-sdk-winmloptional dependency must be removed from package.json for the Linux native binaries to download (the install script skips when winml is detected)