Repository navigation
fix(linux): Ctrl crash on newer distros and endless respawn with Python 3.14 (#179) - #180
Merged
Merged
Conversation
…ld host's The AppImage bundled GLib, GTK3, X11 and libstdc++ from the ubuntu-24.04 build runner. On newer distros the user's own GVfs/GTK/Mesa plugins are loaded into the app and need newer versions, so on Ubuntu 26.04 the first Ctrl press loaded GVfs against the old GLib and segfaulted (undefined symbol g_variant_builder_init_static). Drop those host libs from the PyInstaller bundle on Linux and fail the CI build if they come back. Wheel-vendored libs (hashed names) stay bundled. Fixes #179 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efault Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Python 3.14 the default start method on Linux is forkserver, so numba's parallel backend lock makes multiprocessing start its resource tracker by re-running sys.executable. In a PyInstaller build that is the app itself, which opened another ChimpStackr, which did the same, endlessly (reported in #179 for a build made with scripts/build_linux.sh on Ubuntu 26.04). freeze_support() lets PyInstaller run the helper and exit instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #179. It covers both problems reported there.
1. Segfault on Ctrl/Alt on Ubuntu 26.04 (and Fedora 44, Arch)
PyInstaller bundled the build runner's (ubuntu-24.04) GLib, GTK3, X11 and libstdc++ into the AppImage. At runtime the user's own GVfs, GTK and Mesa plugins get loaded into the app. On newer distros those plugins need newer libs than the bundled ones. On Ubuntu 26.04, the first Ctrl press loads GVfs against the bundled GLib 2.80 and crashes with
undefined symbol: g_variant_builder_init_static.chimpstackr.spec: on Linux, drop those build-host libs from the bundle so the system's copies are used. The list is the bundled libs that the system's GIO/GVfs/GTK/Mesa plugins depend on. Libs that wheels vendor (hashed names) stay bundled.libgthreadandlibbz2also stay, because openSUSE and Fedora don't provide them under the same name.build.yml: fail the Linux build if GLib, GTK or libstdc++ get bundled again.2. A local build keeps opening new windows forever (Python 3.14)
On Python 3.14 the default multiprocessing start method on Linux is
forkserver. Because of that, numba's parallel-backend lock makes multiprocessing start its resource tracker by runningsys.executable. In a frozen app that executable is ChimpStackr itself, so a second app started, then a third, and so on. CI builds use Python 3.11 (start methodfork), so release builds weren't affected, but builds made withscripts/build_linux.shon 26.04 were.src/run.py,src/cli.py: callmultiprocessing.freeze_support()first thing.Testing
Run in amd64 Docker containers on Xvfb. The app was started, sent Ctrl, Ctrl, Ctrl+Z, Ctrl+Y and Ctrl+O (file dialog), then Escape. There was also a CLI
--alignstack oftests/low_res_imagesand anlddcheck of every bundled.so.undefined symbol)* Under heavy parallel load in Docker, GTK's glycin image loader sometimes picks its
bwrapsandbox, which can't run in an unprivileged container, and GTK then aborts on the file dialog icon. WithGLYCIN_DISABLE_SANDBOX=1it passes every time. On a real desktopbwrapworks, so this is expected to be a container artifact. It hasn't been tested on real Fedora or Arch hardware.For the spawn bug, I built master and this branch with Python 3.14.4 and PyInstaller 6.22.3 on Ubuntu 26.04, the same way
build_linux.shdoes:Unit tests: 92 passed.
Not covered: real hardware, Wayland sessions.
🤖 Generated with Claude Code