Repository navigation
Desktop: keep the bundled AppImage tray loader off the host's Ayatana - #16613
danielhanchen merged 3 commits into
Conversation
libappindicator-sys dlopens libayatana-appindicator3.so.1 before libappindicator3.so.1, but the complete AppImage only bundles the legacy libappindicator3.so.1. In bundled mode the first name misses the executable's RUNPATH and loads the host's Ayatana, which then binds to the bundled (older) GLib. On hosts whose Ayatana stack references GLib 2.80+ symbols this aborts at startup with an undefined g_once_init_enter_pointer. The finalizer now aliases libayatana-appindicator3.so.1 to the bundled library (leaving a real bundled Ayatana alone), and the verifier rejects a complete AppImage without it. Host mode is unaffected: its copy's RUNPATH reaches no bundled library. Fixes unslothai#16605
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…b cannot break it (#16784) ## Summary #16768 added `tests/studio/test_playwright_multi_account_open_login.py`, and all 7 of its tests fail in `Repo tests (CPU, studio)` when an earlier test in the same worker has stubbed Playwright, for example the staging run for #16613: ``` test_a_redirect_that_already_loaded_login_is_used E RuntimeError: playwright is not installed: Error needs a real browser E TypeError: catching classes that do not inherit from BaseException is not allowed test_a_second_failure_of_the_same_kind_is_real[two aborts] E TypeError: Expected a BaseException type, but got 'function' 7 failed, 10029 passed ``` The CPU jobs do not install Playwright. `tests/studio/test_heavy_thread_measurement_integrity.py` handles that by putting a stub `playwright.sync_api` into `sys.modules` that answers every name with a function that raises. My test guarded with `pytest.importorskip("playwright.sync_api")`, which finds that stub, so it ran with functions where it expected exception types. Run alone, or with real Playwright installed, it passed, which is why #16768's own checks were green. ## Change `tests/studio/test_playwright_multi_account_open_login.py` only. The test no longer imports Playwright. It defines `Error` and `TimeoutError(Error)` itself, matching Playwright's own hierarchy, and while loading the driver it puts a minimal `playwright.sync_api` carrying them into `sys.modules` through `monkeypatch`, which restores the previous modules after each test. The test now runs, rather than skips, on the CPU jobs, whatever earlier tests left behind. The driver and the test cases are unchanged. ## Testing With Playwright made unimportable and `test_heavy_thread_measurement_integrity.py` run first in the same process, as on CI: | | result | |---|---| | main | 7 failed, 76 passed (the errors above) | | this branch | 83 passed | - With the real Playwright installed: 7 passed. - Against the driver from before #16768: 3 failed, so the test still guards the abort and timeout budgets.
Requested by Debojyoti
Fixes #16605
Problem
libappindicator-sys0.9 dlopenslibayatana-appindicator3.so.1first and only thenlibappindicator3.so.1. The complete AppImage bundles just the legacylibappindicator3.so.1(viatauri.conf.json), so in bundled mode the first name misses the executable's$ORIGIN/../libRUNPATH and falls through to the host's Ayatana. That library then binds to the bundled Jammy GLib (2.72), which already occupies thelibglib-2.0.so.0soname, so any GLib 2.80+ symbol it needs is missing. On the reporter's Slackware box (GLib 2.90.1) that aborts withundefined symbol: g_once_init_enter_pointer.Fix
finalize-complete-appimage.shaddsusr/lib/libayatana-appindicator3.so.1 -> libappindicator3.so.1, so the loader's first lookup resolves inside the bundle and bundled mode stays on its own tray and GLib stack. It is idempotent (linuxdeploy runs the finalizer twice) and leaves a real bundled Ayatana untouched.verify-complete-appimage.shrejects a complete AppImage that bundleslibappindicator3.so.1without a resolvable Ayatana name.usr/bin/host/unsloth-studio's RUNPATH reaches no bundled library, so it still loads the host's Ayatana against the host's GLib.Testing
Real runs of the released
v0.1.914-betaUnsloth-Desktop-Linux.AppImage, extracted, under Xvfb withUNSLOTH_APPIMAGE_WEBKIT=bundledandLD_DEBUG=libs:/usr/lib/libayatana-appindicator3.so.1, which hitsundefined symbol: g_once_init_leave_pointeragainst the bundled GLib (it only falls back because this build's dbusmenu binds eagerly)usr/lib/libayatana-appindicator3.so.1from the bundle, never searches the host; app stays uplibayatana-ido3fails ong_once_init_leave_pointertests/security/test_release_desktop_appimage.pyandtests/studio/test_appimage_toolchain_contract.pyin an Ubuntu 24.04 container: 59 passed, 5 skipped (need full git history), same skips as cleanmain(57 passed). The two new tests fail on cleanmainand pass with this change.