GNU Xnee: Workaround for Xvfb bug

I have been trying to automate some profiling (with gprof) by running some apps in Xvfb and record/replay with Xnee. Problem is, Xvfb crashes. In order to spot the bug I set up a less complex enviroment

Here’s the set up:

Terminal 1: Xvfb -ac :22

Terminal 2: export DISPLAY=:22 ; while (true) ; do xterm -e sleep 2 ; done

After executing some five or six programs Xvfb crashed. After some purely non scientific investigations it turns out that

  1. the bug happens less often when I run Xvfb through gdb (see below)
  2. Xvfb goes down with a seg fault in FreeColormap

Hmmm, colormap….. How about if we lower the colors in Xvfb? Yes, that’s it. Now, let’s move forward. To stress Xvfb a bit more, I have a new setup to test before I go on with Xnee’s automated profile (and coverage of course) tests:

Terminal 1: Xvfb -ac -screen 0 640x480x16 :21

Terminal 2: export DISPLAY=:22 ; while (true) ; do xterm -e sleep 2 ; done

Terminal 2: export DISPLAY=:22 ; while (true) ; do xdpyinfo ; xwininfo -root ; xset r on; done

…. after 1743 program executions I feel I am beginning to see a good enough work around.

And for those interested in the gdb printout, enjoy:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7c2fa10 (LWP 18983)]
0x08156e2b in FreeColormap ()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s