[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#577195: /usr/bin/xvfb-run: `xvfb-run -a` relies on /tmp/.X$i-lock which fails in multiple chroots and $SERVERNUM never change



Package: xvfb
Version: 2:1.7.6-1
Severity: normal
File: /usr/bin/xvfb-run


The -a option to find free X display number is using "while [ -f /tmp/.X$i-lock ]; do" to increase
the $SERVERNUM. When the xvfb-run is run under a different chroot the /tmp is not shared so the
xvfb-run fails to find available DISPLAY number.

To reproduce run `xvfb-run -a sleep 1000` in a system, than chroot to a different system and run it again.

One solution would be to increase the $SERVERNUM everytime the Xvfb fails to run:


--- xvfb-run.orig	2010-04-10 12:18:04.000000000 +0000
+++ xvfb-run	2010-04-10 12:01:42.000000000 +0000
@@ -168,6 +168,7 @@
         break
     elif [ -n "$AUTONUM" ]; then
         # The display is in use so try another one (if '-a' was specified).
+        SERVERNUM=$(($SERVERNUM + 1))
         SERVERNUM=$(find_free_servernum)
         continue
     fi


Regards,
Jozef

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (700, 'testing'), (700, 'stable'), (600, 'unstable'), (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-trunk-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xvfb depends on:
ii  libaudit0                    1.7.13-1+b1 Dynamic library for security audit
ii  libc6                        2.10.2-6    Embedded GNU C Library: Shared lib
ii  libgcrypt11                  1.4.5-2     LGPL Crypto library - runtime libr
ii  libpixman-1-0                0.16.4-1    pixel-manipulation library for X a
ii  libselinux1                  2.0.89-4    SELinux runtime shared libraries
ii  libudev0                     151-3       libudev shared library
ii  libxau6                      1:1.0.5-2   X11 authorisation library
ii  libxdmcp6                    1:1.0.3-2   X11 Display Manager Control Protoc
ii  libxfont1                    1:1.4.1-2   X11 font rasterisation library
ii  xserver-common               2:1.7.6-1   common files used by various X ser

Versions of packages xvfb recommends:
ii  xauth                         1:1.0.4-1  X authentication utility

xvfb suggests no packages.

-- no debconf information



Reply to: