Skip to content

Aspire CLI 13.3: SIGABRT on read-only install dir (BundleService cannot write .aspire-bundle-lock) #17253

@av-leschinskiy

Description

@av-leschinskiy

Summary

aspire start / aspire run crash with SIGABRT (exit 134) on any deployment where the
directory containing .aspire-wrapped is read-only. The CLI's BundleService attempts
to acquire a lock file .aspire-bundle-lock inside its own installation directory and
extract bundle payload there. On read-only filesystems this fails with EROFS, retries,
then aborts the process.

This breaks:

  • NixOS (/nix/store/* is always read-only — fundamental Nix invariant)
  • Immutable OSes (Bottlerocket, Flatcar, Talos)
  • /opt deployments where install dir is owned by root and CLI runs as non-root user
  • Container images that mark install layer read-only

Reproduction

NixOS 26.05, aspire-cli 13.3.0 (also reproducible on any Linux by making install dir read-only):

$ aspire start --isolated --non-interactive --nologo
Starting Aspire AppHost in the background...
❌ AppHost process exited with code 134.
🔍 Check logs for details: /home/user/.aspire/logs/cli_..._detach-child_....log

Diagnosis

strace -f shows hundreds of attempts to create the bundle lock file in the install
directory before SIGABRT:

openat(AT_FDCWD, "/nix/store/.../aspire-cli-13.3.0/.aspire-bundle-lock",
       O_RDWR|O_CREAT|O_CLOEXEC, 0666) = -1 EROFS (Read-only file system)
[repeated ~80 times across threads]
+++ killed by SIGABRT (core dumped) +++

Parent CLI log (cli_*.log) confirms — repeated entries from BundleService:

[DBUG] [BundleService] Ensuring bundle is extracted to /nix/store/.../aspire-cli-13.3.0.
[DBUG] [BundleService] Acquiring bundle extraction lock at
                       /nix/store/.../aspire-cli-13.3.0/.aspire-bundle-lock...

Coredump backtrace confirms abort during managed startup (CoreCLR abort() from native frame).

Also ruled out: DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true does not help — same SIGABRT, ICU
is not loaded but BundleService still fails first.

What works / what doesn't

Command Works on read-only install dir?
aspire --version, aspire --help, aspire doctor, aspire ps, aspire certs trust
aspire start, aspire run ❌ SIGABRT

The crash correlates exactly with commands that need BundleService extraction.

Workaround

Bypass CLI entirely — run AppHost directly via dotnet:

DcpPublisher__RandomizePorts=true \
  dotnet run --project path/to/AppHost.csproj --launch-profile https

dotnet run does not touch BundleService.

Suggested fix

BundleService should extract bundle to a writable user-scoped location instead of the
CLI install directory. Options:

  1. $XDG_CACHE_HOME/aspire/bundle/<binary-hash> (or $HOME/.cache/aspire/... fallback)
  2. Add an env var override for the bundle cache path
  3. Detect read-only install dir (writable check on init), fall back to user cache
    automatically, log a [WARN]

Additionally, the current failure mode (abort() without error message) is unhelpful.
The CLI should catch EROFS from the lock file openat, log a clear error, and exit
with a non-zero code — not abort.

Environment

  • NixOS: BUILD_ID=26.05.20260515.d233902 (kernel 6.18.28, glibc 2.42)
  • aspire-cli: 13.3.0+4517e4a1ffb7f00a4c0e66882c2db952d637c0cc
  • .NET SDK: 10.0.100 (works correctly — only AOT CLI binary is affected)
  • Mode: bundled AOT (.aspire-wrapped, 136 MB single-file publish)

Full coredump, strace logs, and CLI logs available on request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions