Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 314811 - need window manager to run EGit swtbot tests on Hudson
Summary: need window manager to run EGit swtbot tests on Hudson
Status: RESOLVED FIXED
Alias: None
Product: Community
Classification: Eclipse Foundation
Component: CI-Jenkins (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: CI Admin Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 334669
  Show dependency tree
 
Reported: 2010-05-28 03:06 EDT by Matthias Sohn CLA
Modified: 2011-05-27 13:43 EDT (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Sohn CLA 2010-05-28 03:06:01 EDT
We currently cannot run our swtbot tests on hudson, they all fail on the first access to a widget [1]. According to Ketan they fail most probably because there is no window manager available [2].

Can we get a window manager configured in order to solve this ? Or is there any other approach to run these tests during continuous integration ?

[1] http://dev.eclipse.org/mhonarc/lists/egit-dev/msg01213.html
[2] http://wiki.eclipse.org/SWTBot/CI_Server
Comment 1 David Carver CLA 2010-05-28 14:25:03 EDT
Did you enable the XVNC plugin for your build.   This will start XVNC and give you a virtual display.
Comment 2 Andrew Overholt CLA 2010-05-28 15:05:26 EDT
I think Matthias is just getting a raw X sessions (with the black and white honeycomb background) but needs an actual desktop session.  Perhaps modify .xsession of the Hudson user to start gnome-session or something?
Comment 3 Andrew Overholt CLA 2010-05-28 15:05:50 EDT
I should note that my knowledge of how the version of SUSE we're using does this is zero.
Comment 4 Matthias Sohn CLA 2010-05-29 11:14:41 EDT
The Xvnc option is on for the egit build but the swtbot tests can't access any widgets
Comment 5 Nick Boldt CLA 2010-06-01 17:20:11 EDT
(In reply to comment #4)
> The Xvnc option is on for the egit build but the swtbot tests can't access any
> widgets

Is this an issue with how we launch/configure Xvnc w.r.t a window manager, like KDE?

http://archive.cert.uni-stuttgart.de/suse-security/2005/08/msg00004.html
http://linuxreviews.org/howtos/xvnc/
http://www.linuxquestions.org/questions/linux-software-2/xvnc-make-it-default-to-kde-not-twm-255680/
Comment 6 Matthias Sohn CLA 2010-07-12 08:25:51 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > The Xvnc option is on for the egit build but the swtbot tests can't access any
> > widgets
> 
> Is this an issue with how we launch/configure Xvnc w.r.t a window manager, like
> KDE?
> 
> http://archive.cert.uni-stuttgart.de/suse-security/2005/08/msg00004.html
> http://linuxreviews.org/howtos/xvnc/
> http://www.linuxquestions.org/questions/linux-software-2/xvnc-make-it-default-to-kde-not-twm-255680/

Maybe [1] helps to set this up ?

[1] http://www.linuxquestions.org/questions/linux-software-2/how-to-set-window-manager-used-for-xvnc-445967/
Comment 7 Matthias Sohn CLA 2010-08-10 10:41:19 EDT
Ping ...

How can I help to get this fixed ?
Comment 8 Nicolas Bros CLA 2010-08-10 11:59:47 EDT
I believe this problem is also preventing some unit tests to run. I have tests which require an SWT Display, that fail with "gtk_init_check() failed" on both build and build2.
Comment 9 Eclipse Webmaster CLA 2010-08-10 16:00:25 EDT
The default window manger is fvwm2, but the issue looks like it isn't being started.

If I manually start a VNC process I just get a 'blank' screen, it I launch fvwm2 by hand then I see the desktop.

-M.
Comment 10 David Williams CLA 2010-08-10 23:18:01 EDT
May be completely unrelated, but see also bug 322108 for another oddity that implies "display stuff" isn't running or configured quite right. 
The "res" memory associated with Xvfb keeps growing. 
I'm hoping once this bug is fixed maybe Xvfb will be back to normal.
Comment 11 Eclipse Webmaster CLA 2011-01-03 15:27:56 EST
Is this still an issue?

-M.
Comment 12 Matthias Sohn CLA 2011-01-13 07:06:24 EST
Yeah, I just retried and it still doesn't work (https://hudson.eclipse.org/hudson/job/egit/879/console) all ui tests fail due to this problem.

Would it be an option to start window manager as a build step in our build job ? What is the most light-weight window manager on the build servers and how could I start this up ?
Comment 13 Paul Webster CLA 2011-01-13 07:26:13 EST
(In reply to comment #12)
> Would it be an option to start window manager as a build step in our build job
> ? What is the most light-weight window manager on the build servers and how
> could I start this up ?

On build.eclipse.org we start up metacity:
metacity --replace --sm-disable

PW
Comment 14 Matthias Sohn CLA 2011-01-13 10:41:39 EST
(In reply to comment #13)
> (In reply to comment #12)
> > Would it be an option to start window manager as a build step in our build job
> > ? What is the most light-weight window manager on the build servers and how
> > could I start this up ?
> 
> On build.eclipse.org we start up metacity:
> metacity --replace --sm-disable

tried to run that from a shell build step before starting the
maven build step running the ui tests, xvnc hudson plugin is enabled:

[egit] $ /bin/sh -xe /tmp/hudson2941183789652812820.sh
+ echo DISPLAY::10
DISPLAY::10
+ metacity --replace --sm-disable
Xlib:  extension "RANDR" missing on display ":10.0".

it complains about missing "RANDR" and then the build job hangs forever
Comment 15 Denis Roy CLA 2011-01-13 10:55:21 EST
> it complains about missing "RANDR" and then the build job hangs forever

I remember David Williams mentioning something about RANDR (R and R) and concluded it was nothing to be concerned with.  If you do a search for ""RANDR" missing on display" in the comments of Eclipse Foundation/Community you'll get some more info.
Comment 16 Paul Webster CLA 2011-01-13 11:04:07 EST
(In reply to comment #14)
> + metacity --replace --sm-disable
> Xlib:  extension "RANDR" missing on display ":10.0".
> 
> it complains about missing "RANDR" and then the build job hangs forever

The RANDR message hasn't effected any of our tests (that I could tell :-)

But if not part of your vnc xstartup, you'll have to put it in the background:
metacity --replace --sm-disable &

In my .vnc/xstartup it looks like:
exec metacity --replace --sm-disable

PW
Comment 17 Matthias Sohn CLA 2011-01-14 04:12:42 EST
(In reply to comment #16)
> (In reply to comment #14)
> > + metacity --replace --sm-disable
> > Xlib:  extension "RANDR" missing on display ":10.0".
> > 
> > it complains about missing "RANDR" and then the build job hangs forever
> 
> The RANDR message hasn't effected any of our tests (that I could tell :-)
> 
> But if not part of your vnc xstartup, you'll have to put it in the background:
> metacity --replace --sm-disable &

yeah, great, this did the trick, first time ever our UI tests succeeded on hudson :-)

But Hudson doesn't like putting the process into background since this will leak
file descriptors:

[egit] $ /bin/sh -xe /tmp/hudson464268155744592334.sh
+ metacity --replace --sm-disable
Xlib:  extension "RANDR" missing on display ":11.0".
Process leaked file descriptors. See http://hudson.gotdns.com/wiki/display/HUDSON/Spawning+processes+from+build for more information

So we probably need to follow the other approach you proposed below.

Could some hudson admin please configure .vnc/xtartup as described here:
> In my .vnc/xstartup it looks like:
> exec metacity --replace --sm-disable

When the UI tests are started I see tons of window manager warnings:

Running org.eclipse.egit.ui.test.AllTests
log4j:WARN No appenders could be found for logger (org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher).
log4j:WARN Please initialize the log4j system properly.
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x800747 (Show View )
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x800039 (Resource -)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.
... many more like these ...

complete log is here https://hudson.eclipse.org/hudson/job/egit/891/console

is there a way to get rid of these warnings ?
Comment 18 Matthias Sohn CLA 2011-01-17 18:18:57 EST
Webmaster could you

... please configure .vnc/xtartup as described here:
> In my .vnc/xstartup it looks like:
> exec metacity --replace --sm-disable
then we could avoid leaking file descriptors

--
Matthias
Comment 19 Eclipse Webmaster CLA 2011-01-18 09:34:00 EST
I've updated the hudson xstartup file.

-M.
Comment 20 Matthias Sohn CLA 2011-01-21 11:46:10 EST
This doesn't work so swtbot can't create widgets this way. Hence I switched back to start metacity from my hudson job.
Comment 21 Andrew Overholt CLA 2011-01-21 12:10:33 EST
FWIW I have a local Hudson setup here that runs SWTBot tests and doesn't require anything special with the xvnc options.  Perhaps the system's default xinitrc is starting a full GNOME session and that's what takes care of it?  Maybe that's too resource intensive for Eclipse's Hudson slaves ...

I can investigate our setup more if you'd like.
Comment 22 Matthias Sohn CLA 2011-02-28 04:26:30 EST
closing this bug as current solution to start metacity from build job is good enough for us