mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1872] Ctrl+C / SIGTERM skip the clean shutdown while --open's browser launch is still running (Linux) #742
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#742
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @spratling on GitHub (Oct 10, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1872
On Linux, when
--openstarts the browser itself (no browser already running),webbrowser.open()waits on the launcher. Here that is/usr/bin/brave-browser, a bash wrapper that runs until the browser exits. The main thread stays inside that call for as long as the browser is open.That call runs before both the SIGTERM handler (
serve/server.py~6308 on currentmain) and thetry: while True: time.sleep(1)/except KeyboardInterruptshutdown block (~6311). So while the browser is open:KeyboardInterruptinsidewebbrowser.open. Python prints a traceback and exits, and thehttpd.shutdown/engine.close/vision.shutdownpath never runs.Traceback (v0.1.40.3, Python 3.11):
While it was stuck, the server's children were the engine,
strata-visionand/bin/bash /usr/bin/brave-browser http://127.0.0.1:8081/. After the browser was closed, the main thread was back in thetime.sleep(1)loop, and Ctrl+C then works normally."open_browser": falseinstrata-<model>.jsonavoids the problem.Possible fix: open the browser on a daemon thread (
threading.Thread(target=webbrowser.open, args=(url,), daemon=True).start()), and install the SIGTERM handler before it.Setup: Strata v0.1.40.3 started as
serve/server.py --engine strata --config ... --port 8081 --open, Linux, X11, Brave as the default browser.@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.