Linux: browser process aborts (SIGABRT) when a download opens the GTK file chooser — no GSettings schema path in env
Description:
On Linux the whole browser process aborts (SIGABRT, core dump) as soon as a download needs Chrome's
file-chooser path, and the in-flight download dies with it. Expected: the download completes (or at
worst fails visibly) — not the browser process terminating.
Concretely: every attempt to download a ~136 MB ZIP (Content-Type: application/x-zip-compressed,
served via a plain navigation, no auto-save Content-Disposition) killed the browser after 30–70 s of
streaming. 4/4 runs. Nothing in the download directory except a partially written temp file
(<download dir>/.org.chromium.Chromium.XXXXXX), and no entry in the History downloads table.
CloakBrowser version:
cloakbrowser 0.5.6 (Python). Browser binary in use: chromium-146.0.7680.177.5 — the newest build
on the free channel at the time of writing (Pro is at 152.x; not tested here).
Wrapper: Python
The browser itself runs as a long-lived process launched directly from the binary
(systemctl --user) and a CDP client attaches to 127.0.0.1:9222; the Python SDK is used for
humanised helpers.
Environment:
NixOS 26.05 (Yarara), Linux x64, headless Xvfb :99, not Docker (browser runs on the host),
16 GB RAM (13 GB available, no OOM — kernel log clean), no XDG desktop portal running.
Relevant env gap on this host: no GSettings schema path is reachable —
GSETTINGS_SCHEMA_DIR not set, /run/current-system/sw/share/glib-2.0/schemas does not exist, and
gsettings / glib-compile-schemas are not installed.
Launch options:
chrome --user-data-dir=<profile> --remote-debugging-address=127.0.0.1 --remote-debugging-port=9222 \
--password-store=basic --no-first-run --no-default-browser-check --no-sandbox \
--fingerprint=28190 --fingerprint-platform=windows --fingerprint-timezone=Europe/Zurich \
--lang=de-CH --fingerprint-locale=de-CH --window-size=1440,900 about:blankTested with a different IP or proxy? No
Works outside Docker / on host machine? Not using Docker — the browser already runs directly on the host; it is the host itself that lacks the GTK/GSettings wiring.
Steps to reproduce:
- Start the browser with the options above (no
GSETTINGS_SCHEMA_DIR, no desktop portal available). - Navigate to a page that serves a large file as a plain navigation with
Content-Type: application/x-zip-compressedand no auto-saveContent-Disposition. - Let the download begin. Right after the normal navigation→download handoff
(
Browser.downloadWillBegin, followed byNetwork.loadingFailed … net::ERR_ABORTED canceled=true, type=Document) the transfer starts. - Within 30–70 s the browser process is gone:
cloak-browser.service: Main process exited, code=dumped, status=6/ABRT.
Error output / screenshots:
cloak-browser.service: Main process exited, code=dumped, status=6/ABRT
cloak-browser.service: Failed with result 'core-dump'.
cloak-browser.service: Consumed 1min 14.824s CPU time over 33min 1.470s wall clock time, 333.7M memory peak.Coredump backtrace (systemd-coredump), bottom-up:
download::DownloadTargetDeterminer::DoLoop
→ ChromeDownloadManagerDelegate::RequestConfirmation
→ download::DownloadFilePicker::DownloadFilePicker
→ ui::SelectFileDialog::SelectFile
→ ui::SelectFileDialogLinuxPortal::SelectFileImpl (XDG portal request)
→ ui::SelectFileDialogLinuxPortal::OnPortalAvailable
→ ui::SelectFileDialogLinuxGtk::SelectFileImpl (portal unavailable → GTK fallback)
→ gtk_file_chooser_dialog_new
→ gtk_file_chooser_widget_set_property
→ file_chooser_widget_default_size_changed
→ gtk_file_chooser_widget_get_default_size
→ _gtk_file_chooser_get_settings_for_widget
→ g_object_new → g_settings_set_property
→ g_log → g_logv → g_log_default_handler → _g_log_abort
→ abort → raise → __pthread_kill_implementationAdditional startup log line on this host (present before a schema path is supplied, absent after):
g_settings_schema_source_lookup: assertion 'source != NULL' failedReading: the download has no silent-save policy, so DownloadTargetDeterminer asks the download
manager delegate for confirmation → a native "Save As" dialog → no XDG portal, so the GTK
implementation runs → g_settings_new("org.gtk.Settings.FileChooser") cannot find the schema → GLib's
fatal-error path calls abort(), taking the browser and the download with it.
Dockerfile (if applicable): n/a
Additional notes:
Workarounds we verified on this host:
- Pointing
GSETTINGS_SCHEMA_DIRat a directory containing the compiledorg.gtk.Settings.FileChooserschema removes the startup assertion, but the GTK dialog path is still entered — the abort risk remains for any native GTK dialog. - Avoiding the dialog works reliably: profile prefs
download.prompt_for_download=false+download.default_directory=<dir>, or session-scopedBrowser.setDownloadBehavior({behavior:'allow', downloadPath:'<dir>', eventsEnabled:true})from a persistent CDP client. With either, the same ZIP completes in ~4–10 s, theRestart=alwayscounter stays unchanged, no core dump, no partial files.
I do not think this is an old-engine problem: the SelectFileDialogLinuxPortal → GTK fallback is
generic Chromium/Linux behaviour, so a newer build would likely behave the same. Happy to re-test on a
15x Pro build, and happy to provide the minidumps
(~/.config/chromium/Crash Reports/pending/*.dmp) if that is useful.
Suggestion: have the launcher/launch environment export a GSETTINGS_SCHEMA_DIR covering the GTK
schemas that the binary already links against (and/or set a default download directory with prompting
disabled), and/or avoid abort()ing the browser process when a schema lookup fails so an in-flight
download cannot take the whole session down.
Source: CloakHQ/CloakBrowser