Skip to content

gunixmounts: Make GUnixMountMonitor thread-safe

Ondrej Holy requested to merge wip/oholy/gunixmountmonitor-thread-safe into master

The Nautilus test suite often crashes with GLib-FATAL-CRITICAL: g_source_is_destroyed: assertion 'g_atomic_int_get (&source->ref_count) > 0' failed if it is started with GIO_USE_VOLUME_MONITOR=unix. This is because GUnixMountMonitor is simultaneously used from multiple threads over GLocalFile and GVolumeMonitor APIs. Let's add guards for proc_mounts_watch_source and mount_poller_time variables to prevent those crashes.

Fixes: #2030 (closed)

Edited by Ondrej Holy

Merge request reports