! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Potential race condition in registry.c/xsettings_registry_store_xrdb in calli...
Status:
RESOLVED: FIXED
Product:
Xfce4-settings
Component:
Xfsettingsd

Comments

Description Pauli Borodulin 2010-12-19 17:14:16 CET
Created attachment 3290 
Proposed fix #1

The function registry.c/xsettings_registry_store_xrdb contains a potential race condition which I stumbled upon yesterday (http://forum.xfce.org/viewtopic.php?pid=20342). The function executes xrdb to set xft & xcursor values using g_spawn_command_line_async. On a SMP system two or more xrdbs might be executed simultaneously, which might cause possible loss of some of the changes.

An alike bug was filed in Gentoo for Gnome a year ago. The bug report:
  http://bugs.gentoo.org/show_bug.cgi?id=293426
And the fix:
  http://git.gnome.org/browse/gnome-settings-daemon/commit/?id=aa32ea50fc596100750988513004f7b86148388a

The bug also exists in the latest development version of Xfce4-settings.

Attached (registry-1.patch) is a proposed fix for the bug. I wrote it based on the Gnome fix. The function 'update_property' was copied from the Gnome fix and 'remove_property' was written based on it. I removed storing the settings in files (Xcursor.xrdb & Xft.xrdb), because I did see any use for them anymore.
Comment 1 Nick Schermer editbugs 2011-01-02 13:44:41 CET
Pushed changes to a branch, not sure if we should apply this before 4.8. It seems to work fine tho.

http://git.xfce.org/xfce/xfce4-settings/log/?h=nick/wip-bug-7014
Comment 2 Nick Schermer editbugs 2011-01-02 18:23:31 CET
Fixed in xfce4-settings 4.7.7.

Bug #7014

Reported by:
Pauli Borodulin
Reported on: 2010-12-19
Last modified on: 2011-01-02

People

Assignee:
Stephan Arts
CC List:
2 users

Version

Attachments

Proposed fix #1 (8.45 KB, patch)
2010-12-19 17:14 CET , Pauli Borodulin
no flags

Additional information