Repository navigation
Conversation
W4HO-ham
added a commit
to W4HO-ham/omarchy-mobile
that referenced
this pull request
Nov 20, 2026
…s#921's final head, and the GeoClue stall's cause Eight more boots on the published kernel with derekross#921's final head had a GNSS fix in seven; the eighth was GeoClue's start stall again, and this time its backtrace was taken. It is a lock-order deadlock between GLib's VFS and proxy resolver setups, reproduced without a boot (7 of 80 cold starts) and gone with GLib's built-in resolver (derekross#942). The record no longer calls the cause open, and says which overlay isn't in the tree.
… lookup With glib2 2.90.1 GeoClue's start sometimes stopped before it took its bus name, and the location request that started it failed after D-Bus's 25 s. It is GLib issue 4078, closed upstream and in no glib2 the image has yet: the main thread opens a GFile (g_vfs_get_default() holds the VFS's one-time init and waits for GIO's default-modules lock) while a pool thread asks for the default proxy resolver (g_proxy_resolver_get_default() holds that lock while libproxy's resolver is created, whose init opens a GFile and waits for the VFS's init). A drop-in for geoclue.service names GLib's built-in resolver, which opens no file under the lock. GeoClue uses no proxy for its web lookups anyway (it sets its session's resolver to NULL), so nothing is lost. The file can go once glib2 carries the fix. On a Pixel 9a, with the file cache dropped before each start as after a boot, 7 of 80 starts stopped that way without it and 0 of 80 with it.
W4HO-ham
force-pushed
the
gnss-geoclue-start-deadlock
branch
from
November 20, 2026 03:40
f4909f8 to
6a76e08
Compare
W4HO-ham
added a commit
to W4HO-ham/omarchy-mobile
that referenced
this pull request
Nov 20, 2026
The record names the upstream issue, so the workaround in derekross#942 has a known end.
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.
With glib2 2.90.1 GeoClue's start sometimes stops before it takes its bus name. The location request that started it fails after D-Bus's 25 s ("Failed to connect to GeoClue2 service: Error calling StartServiceByName"), and the app gets nothing. This is the stall my #921 and #925 runs listed as "cause open": 4 of the 36 boots on the published kernel in #925's record, each with a request about 16 s into the boot, and one more of 8 last night.
The cause is a lock-order deadlock between two GLib one-time setups, and it is known upstream: GLib issue 4078 (opened 2026-10-17, closed). I found that only after writing the first version of this; the description then said it wasn't reported, which was wrong. From the backtraces of two stalled starts (every thread, function names; both from the loop below, on the daily kernel):
g_file_new_for_path→g_vfs_get_default→pthread_mutex_lock. It holds the VFS's one-time init and waits for GIO's default-modules lock.g_proxy_resolver_get_default→ glib-networking'slibgiolibproxy.so→px_proxy_factory_new→px_manager_new_with_options→g_file_new_for_path→g_vfs_get_default→g_once_init_enter→g_cond_wait. It holds the default-modules lock while libproxy's resolver is created, and libproxy's init waits for the VFS's one-time init.g_once_init_enterunderg_proxy_resolver_get_default.Versions on the palmtop (Arch Linux ARM): geoclue 2.8.2-2, glib2 2.90.1-1, glib-networking 2.90.1-1, libproxy 0.5.12-1, libsoup3 3.8.1-1.
The change is one drop-in for
geoclue.serviceinomamobile-gnss:Environment=GIO_USE_PROXY_RESOLVER=dummy. GIO then creates its own built-in resolver under that lock, which opens no file, so the pool thread's half can't happen. Nothing is lost: GeoClue turns proxies off for its web lookups itself (soup_session_set_proxy_resolver (session, NULL)ingclue-web-source.c; the packaged binary imports it), so the default resolver only served the reachability check. The first version of the file's comment said a phone could get proxies back with a later drop-in; it couldn't, and that paragraph is gone. The file can go once the image's glib2 carries upstream's fix, and its comment says so.On my palmtop (Pixel 9a,
7.3.0-rc6-omamobile-tegu-s2mpg15-m1-g991042e2eff3-dirty, the daily bring-up kernel, 2026-11-20). A loop stops GeoClue, starts it through its bus name (busctl call ... org.freedesktop.DBus.Peer Ping, 12 s) and counts the starts that never take the name; no reboots. For the loop the drop-in was a file of the same content in/etc/systemd/system/geoclue.service.d, and the loop's last line printed the unit'sEnvironmentin each run.The counts are thin on their own: the two blocks without it differ a lot, and the warm row alone separates nothing. What carries the claim is the mechanism, which the drop-in removes by construction, and the upstream issue.
Then the file at its packaged path, the hand copy removed, and one boot with a request 18 s in:
GeoClue was up at the request, the first position (IP) came at 61.6 s, when this kernel's Wi-Fi comes up, as in last night's boots without the file (60.4 to 60.8 s), and a GNSS fix at 81.9 s.
tools/phone-smoke --hereafter it: 19 checks ok, none failed.A run under CPU load (six busy loops during each start) I count only in part: its 80 starts without the drop-in are in the 180 above (none stopped); during the starts with it the palmtop reached its critical temperature and shut itself down in order (
HARDWARE PROTECTION shutdown). That was my load loop, not GeoClue; it goes into the 9a's notes separately.Not run:
omamobile-gnssis 0.2.11-1 from omamobile-gnss 0.2.11: apps get positions after Location is turned on, and the runner records its own namespace PID #864 with omamobile-gnss 0.2.12: Location after a reboot, and the receiver off when a session ends, on the Pixel 9a #921's files.device/cheetah/device.conf). I have none.Where it lives. GeoClue is in every image through
omamobile-apps;omamobile-gnssis only in the Pixel 7 Pro's and the Pixel 6 Pro's lists (and on a 9a that has it). A phone without this package keeps the stall until glib2 is fixed. If you'd rather the file sat in a package every image has, say where and I'll move it.Tests:
test/allchecks that the drop-in sets the built-in resolver and nothing else, and thatinstallputs it undergeoclue.service.d. The check sits before the test's "no bionic prebuilts" skip, so CI runs it.tests/allandtools/pr-check origin/mainpass.The version is 0.2.11, which #864 and #933 also take (#921 is 0.2.12). Equal version lines merge without a conflict, so the number needs setting by hand at merge; tell me which and I'll rebase.