Skip to content

Agent Linux AppImage cannot spawn its host: current_exe() is the bundled loader #1207

Closed

Description

@AnthonyRonning

The packaged Linux AppImage cannot start its own host process. AppRun execs the bundled loader (linux-release-appimage.py), so inside the app /proc/self/exe, and therefore std::env::current_exe(), is ld-linux-x86-64.so.2 rather than maple-agent. spawn_host() runs current_exe() with host serve, so the loader tries to load a program named host.

Package: maple-agent-prod-0.1.0-e20a5b7-linux-x86_64.AppImage, source e20a5b78c96aece2c081dfd624c80c8cd41f37d9, from master build 39659041169. Its SHA-256 matches the package's SHA256SUMS.

Environment: Ubuntu 24.04 x86_64, fresh XDG config/data roots, APPIMAGE_EXTRACT_AND_RUN=1, no display.

Reproduction:

  1. ./maple-agent-prod-0.1.0-e20a5b7-linux-x86_64.AppImage remote status connects with start = true, so it spawns the host. It fails with Maple host did not start. See the profile's maple-agent.log. (exit 1); the log contains only the CLI's own start line.
  2. What the spawn effectively runs, squashfs-root/usr/lib/ld-linux-x86-64.so.2 host serve, fails with host: error while loading shared libraries: host: cannot open shared object file: No such file or directory (exit 127).
  3. Control: after starting ./…AppImage host serve in the background, ./…AppImage remote status connects and returns the expected signed-out answer, Sign in before using remote access; host stop exits 0.
  4. Mechanism: /lib64/ld-linux-x86-64.so.2 /usr/bin/readlink /proc/self/exe prints the loader's path.

Impact: the desktop always attaches to the host as a client and spawns it on demand through the same path (backend.rs → connect(…, true)), so the packaged Linux desktop most likely cannot run tasks without a manually started host. The GUI itself was not run here; #1166 used an explicit host serve to get past the same self-spawn failure. The incompatible-host "Stop existing host and reopen" action relaunches current_exe() as well, and gpui's Linux restart() defaults to current_exe(), which matters for a future updater.

CI gap: Linux package verification runs only --version and --build-info; nothing spawns the host from the packaged AppImage.

Fix direction: inside an AppImage (APPIMAGE set and the running binary under APPDIR), use $APPIMAGE as the program for host spawns and relaunches; otherwise keep current_exe(). Spawning through $APPIMAGE also gives the host its own mount instead of the GUI process's mount, which goes away when the GUI exits. Add a packaged-AppImage check that spawns the host, for example remote status reaching the sign-in guard.

Related: #1166.

Activity

  1. AnthonyRonning commented on Oct 24, 2026

    @AnthonyRonning
    ContributorAuthor

    Fixed by #1212 (merged as b30135c): spawn_host() and the incompatible-host reopen now resolve the launcher through self_launch, which re-enters the AppImage instead of running the bundled loader. The downloaded-package Linux verifier now starts the host from the packaged AppImage and reaches the signed-out guard; it passes on master (474ac8e7).

    Not covered by CI: a normal FUSE-mounted launch with a display, and GUI restart. CI exercises an extracted AppImage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions