! 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 !
xfdesktop sets root pixmap in a wrong way
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Tomas Bzatek 2009-03-26 13:40:14 CET
xfdesktop doesn't free root pixmap (background) on exit leaking the pixmap and causing other applications to crash when trying to use root pixmap.

Repro steps:
1. Make xfdesktop running so it changes background and optionally puts some icons there
2. xfdesktop --quit
3. run nautilus
4. nautilus completes fadein of the new bg and then crashes (with 1-2 sec. delay)

$ nautilus
nautilus: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.


In detail:

$ xfdesktop --quit
xfdesktop[28513]: starting up

$ xprop -root | grep PIXMAP
ESETROOT_PMAP_ID(PIXMAP): pixmap id # 0x180001f
_XROOTPMAP_ID(PIXMAP): pixmap id # 0x180001f

$ xkill -id 0x180001f
xkill:  killing creator of resource 0x180001f
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  113 (X_KillClient)
  Value in failed request:  0x180001f
  Serial number of failed request:  8
  Current serial number in output stream:  9

$ xprop -root -remove ESETROOT_PMAP_ID
$ xprop -root | grep PIXMAP
_XROOTPMAP_ID(PIXMAP): pixmap id # 0x180001f
$ nautilus
... nautilus runs fine in this case


A wise man once said:
<alex_> basically, it (xfdesktop) sets the ESETROOT_PMAP_ID to a normal pixmap id
<alex_> then it quits
<alex_> so, next process that starts may very well get the same resource base
<alex_> and nautilus does so
<alex_> then it XKillClients that
<alex_> killing itself
<alex_> but, really xfdesktop needs to be fixed
<alex_> Check libgnome-desktop/gnome-bg.c:make_root_pixmap() for how to allocate a pixmap for use as the root pixmap


Fedora 11 (development), x86_64
  xorg-x11-server-Xorg-1.6.0-9.fc11.x86_64
  xfdesktop-4.6.0-3.fc11.x86_64
  nautilus-2.25.92-1.fc11.x86_64
Comment 1 Brian J. Tarricone (not reading bugmail) 2009-04-02 05:44:00 CEST
That's kinda hilarious.  Nautilus crashes because X kinda sucks at XID allocation, and it's xfdesktop's fault?

Sure, I'll have it clean up after itself, but it's a bit ridiculous to say nautilus isn't broken here...  Why nautilus seems to think it needs to kill the owner of ESETROOT_PMAP_ID is beyond me.

(Actually, it turns out xfdesktop was removing those properties on exit, but not flushing the gdk event queue, so the remove request never made it to the X server.)

Bug #5154

Reported by:
Tomas Bzatek
Reported on: 2009-03-26
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
0 users

Version

Attachments

Additional information