Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't run servo headlessly in Xvfb #10985

Closed
shinglyu opened this issue May 3, 2016 · 9 comments
Closed

Can't run servo headlessly in Xvfb #10985

shinglyu opened this issue May 3, 2016 · 9 comments

Comments

@shinglyu
Copy link
Member

@shinglyu shinglyu commented May 3, 2016

Step to reproduce

I follow @larsbergstrom 's instruction to start my Xvfb this way:

Xvfb :10 -screen 0 1280x960x24 +extension RANDR +extension RENDER +extension GLX

Then I run servo in another shell

export DISPLAY=:10
./servo -z -x -o output.png about:blank                                                            

but it crashes and produce the error messages below

P.S. I copied the servo binary and resources folder instead of using ./mach run, because I want to run tests on a specific Servo version in my CI system.

Environment

Servo version: 074c7e8
OS: Linux slyu-workstation 3.13.0-68-generic #111-Ubuntu SMP Fri Nov 6 18:17:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux (Linux Mint)

Logs

Servo:

./servo/servo -z -x -o output.png about:blank                                                            
Xlib:  extension "XFree86-VidModeExtension" missing on display ":10.0".
Xlib:  extension "GLX" missing on display ":10.0".
Xlib:  extension "GLX" missing on display ":10.0".
[1]    5098 segmentation fault (core dumped)  ./servo/servo -z -x -o output.png about:blank

Xvfb:

Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension SECURITY
Initializing built-in extension XINERAMA
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension Present
Initializing built-in extension DRI3
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension SELinux
Initializing built-in extension GLX
[dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/100dpi, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/75dpi, removing from list!
6 XSELINUXs still allocated at reset
SCREEN: 0 objects of 256 bytes = 0 total bytes 0 private allocs
DEVICE: 0 objects of 96 bytes = 0 total bytes 0 private allocs
CLIENT: 0 objects of 144 bytes = 0 total bytes 0 private allocs
WINDOW: 0 objects of 48 bytes = 0 total bytes 0 private allocs
PIXMAP: 1 objects of 16 bytes = 16 total bytes 0 private allocs
GC: 4 objects of 16 bytes = 64 total bytes 0 private allocs
CURSOR: 1 objects of 8 bytes = 8 total bytes 0 private allocs
TOTAL: 6 objects, 88 bytes, 0 allocs
1 PIXMAPs still allocated at reset
PIXMAP: 1 objects of 16 bytes = 16 total bytes 0 private allocs
GC: 4 objects of 16 bytes = 64 total bytes 0 private allocs
CURSOR: 1 objects of 8 bytes = 8 total bytes 0 private allocs
TOTAL: 6 objects, 88 bytes, 0 allocs
4 GCs still allocated at reset
GC: 4 objects of 16 bytes = 64 total bytes 0 private allocs
CURSOR: 1 objects of 8 bytes = 8 total bytes 0 private allocs
TOTAL: 5 objects, 72 bytes, 0 allocs
1 CURSORs still allocated at reset
CURSOR: 1 objects of 8 bytes = 8 total bytes 0 private allocs
TOTAL: 1 objects, 8 bytes, 0 allocs
1 CURSOR_BITSs still allocated at reset
TOTAL: 0 objects, 0 bytes, 0 allocs
[dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/100dpi/:unscaled, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/75dpi/:unscaled, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/100dpi, removing from list!
[dix] Could not init font path element /usr/share/fonts/X11/75dpi, removing from list!
@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented May 3, 2016

If I run it using ./mach run -r -z -x -o output.png about:blank, there is not error.
I can observe the servo process showed up for a while in top. But after it disappear, the ./mach command doesn't exit, and there is no output of any kind.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 3, 2016

Just to confirm, do you have all of the relevant mesa packages installed? The list we have on our buildbot instances is here:
https://github.com/servo/saltfs/blob/master/servo-build-dependencies/init.sls#L15-L25

I'm not able to reproduce this problem locally, but my machine is configured identically to the Linux buildbots.

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented May 4, 2016

I installed all the mesa packages but no luck.

I saw there was a build option for headless, but was removed in https://github.com/servo/servo/pull/8641/files#diff-4b02cf15724590179b4a5025f1a81a0dL379 , is that related?

I'll try it in a Ubuntu 14.04 VM, probably my Linux Mint modified some Ubuntu graphics stuff.

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented May 4, 2016

In a Ubuntu 14.04 VM, the GLX missing error was gone, but I still get this:

vagrant@vagrant-ubuntu-trusty-64:~/MozITP/test/servo$ ./servo -z -x -o output.png about:blank                                    
Xlib:  extension "XFree86-VidModeExtension" missing on display ":10".
Segmentation fault (core dumped)

I'll try to run it using saltfs's servo-master1 setup.

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented May 4, 2016

@shinglyu Heads up, servo-linux1 is probably a better choice because it will already have our xvfb setup installed (which is also kept in the saltfs repo, see the xvfb folder).

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented May 4, 2016

@aneeshusa Thanks. I found that out before I leave the office. Now my office machine is running servo-linux1 and building Servo in it. By the way, where will the servo root directory be in servo-linux1? I believe the Git() step will clone it, but I'm not sure where it will place it. All the other steps just use ./mach build ... without cd so I guess there is a convention for where it should be placed?

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented May 4, 2016

@shinglyu This is in the servo-linux1 Vagrant VM, not the actual servo-linux1.servo.org machine, right?

You don't need to use Buildbot at all to build Servo; you can just git clone the repo anywhere, cd into it, and ./mach build ... from there, so there's no special place for the servo root directory. I believe you may have to increase the memory given to Vagrant to build Servo successfully though - just increase the 1024 number in the Vagrantfile.

On our actual builders, I believe Buildbot will use /home/servo/buildbot/slave/${builder_name}/build directories, where builder_name is one of linux-rel, mac-dev-unit, etc.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 4, 2016

@shinglyu Can you also try on a page other than about:blank? That error (about XFree86-VidModeExtension) is also printed in successful runs with Xvfb. I haven't looked into it yet.

@shinglyu
Copy link
Member Author

@shinglyu shinglyu commented May 5, 2016

I tested in servo-linux1 Vagrant VM (locally, of course). It works, and it prints the XFree86-VidModeExtension too, so it's not the problem.

I tried about:blank and https://www.wikipedia.org, both works.

So I believe there is some difference between Linux Mint and its base Ubuntu version. I'll close this and use the VM to run my tests.

Thanks @larsbergstrom and @aneeshusa !

@shinglyu shinglyu closed this May 5, 2016
scottbez1 added a commit to scottbez1/splitflap that referenced this issue Aug 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.