Spurious bad X_ChangeProperty and MappingNotify:s

Peter Åstrand astrand at cendio.se
Fri Apr 17 10:18:55 PDT 2009


I have this extremely simple X client application:

#include <stdio.h>
#include <X11/Xlib.h>
#include <assert.h>
#include <unistd.h>

int
main(int argc, char *argv[])
{
     Display *xd;
     XEvent xevent;
     xd = XOpenDisplay(NULL);
     assert(xd);
     XSync(xd, 0);
     XSynchronize(xd, 1);
     XSync(xd, 0);
     while (1) {
  	fprintf(stderr, "loop\n");
 	XSync(xd, 0);
 	sleep(1);
     }
     return 0;
}

In some cases, the application crashes with:

X Error of failed request:  BadRequest (invalid request code or no such operation)
   Major opcode of failed request:  18 (X_ChangeProperty)
   Serial number of failed request:  7
   Current serial number in output stream:  9

I guess this must be a libX11 or server problem. Has anyone seen anything 
like this? More details follow: The problem usually occurs during startup 
of GNOME on the SLED11 platform. In fact, I initially thought it was a bug 
in xinit, since xinit also suffered from the problem. The X server is 
Xvnc, built on Xorg 1.5.3. I've not yet been able to reproduce the problem 
with the :0 console, and we have not seen this on any other Linux 
distribution.

I have been able to get a Wireshark dump (this one with xinit as client). 
It's available as http://www.cendio.com/~astrand/x.org/xinit-mn.cap. After 
several GetInputFocus calls (which are generated by XSync), I get a 
huge reply with something like 64 MappingNotify:s and the same amount of 
BadRequests for X_ChangeProperty. Quite strange. Anyone ideas?

Rgds, 
---
Peter Åstrand		ThinLinc Chief Developer
Cendio AB		http://www.cendio.com
Wallenbergs gata 4
583 30 Linköping	Phone: +46-13-21 46 00


More information about the xorg-devel mailing list