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

Servo is crashing immediately #536

Closed
fflorent opened this issue Jun 23, 2013 · 12 comments
Closed

Servo is crashing immediately #536

fflorent opened this issue Jun 23, 2013 · 12 comments

Comments

@fflorent
Copy link
Contributor

@fflorent fflorent commented Jun 23, 2013

I immediately get a crash when starting servo. Here is the stacktrace:

florent@aptosidbox:~/servo$ gdb --args ./build/servo ./src/test/html/about-mozilla.html 
GNU gdb (GDB) 7.6-debian
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/florent/servo/build/servo...(no debugging symbols found)...done.
(gdb) r
Starting program: /home/florent/servo/build/servo ./src/test/html/about-mozilla.html
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7fed700 (LWP 28778)]
[New Thread 0x7ffff7fd4700 (LWP 28779)]
[New Thread 0x7ffff7fb9700 (LWP 28780)]
[New Thread 0x7ffff7fa0700 (LWP 28781)]
[New Thread 0x7ffff7f87700 (LWP 28782)]
[New Thread 0x7ffff7f6e700 (LWP 28783)]
rust: ~"Elided an `UnscannedTextbox` because it was zero-length after compression; box b27: UnscannedTextRenderBox(\n\n)"
rust: ~"Elided an `UnscannedTextbox` because it was zero-length after compression; box b28: UnscannedTextRenderBox(\n)"
rust: ~"Elided an `UnscannedTextbox` because it was zero-length after compression; box b27: UnscannedTextRenderBox(\n\n)"
rust: ~"Elided an `UnscannedTextbox` because it was zero-length after compression; box b28: UnscannedTextRenderBox(\n)"
intel_do_flush_locked failed: No such file or directory
intel_do_flush_locked failed: No such file or directory

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fb9700 (LWP 28780)]
0x00007fffecb9a47d in ?? () from /usr/lib/x86_64-linux-gnu/libdricore9.1.3.so.1

Uname -a: Linux aptosidbox 3.9-7.slh.1-aptosid-amd64 #1 SMP PREEMPT Fri Jun 21 00:50:22 UTC 2013 x86_64 GNU/Linux

Graphic card: 00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 18)

@burg
Copy link

@burg burg commented Jun 23, 2013

Looks like a graphics driver problem. You didn't actually post a backtrace, could you try setting

RUST_LOG=::rt::backtrace

before running the program? Or, gdb --ex "catch throw" --ex run ./build/servo blahblah might work better.

If it is a graphics problem, then @pcwalton can probably tell you some additional RUST_LOG flags to make debugging easier.

@jdm
Copy link
Member

@jdm jdm commented Jun 24, 2013

http://en.sfml-dev.org/forums/index.php?topic=9149.0 suggests that there's an intel driver bug that can be worked around by limiting the number of XOpenDisplay calls to 1. I'm hitting this now as well on tip.

@fflorent
Copy link
Contributor Author

@fflorent fflorent commented Jun 25, 2013

Or, gdb --ex "catch throw" --ex run ./build/servo blahblah might work better.
Looks better:

florent@aptosidbox:~/servo$ gdb --ex "catch throw" --ex run ./build/servo ./src/test/html/about-mozilla.html
GNU gdb (GDB) 7.6-debian
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/florent/servo/build/servo...(no debugging symbols found)...done.
"/home/florent/servo/./src/test/html/about-mozilla.html" is not a core dump: Format de fichier non reconnu
Function "__cxa_throw" not defined.
Catchpoint 1 (throw)
Starting program: /home/florent/servo/build/servo 
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7fed700 (LWP 4945)]
[New Thread 0x7ffff7fd4700 (LWP 4946)]
rust: task failed at 'servo asks that you provide 1 or more URLs', /home/florent/servo/src/components/gfx/opts.rs:43
[Switching to Thread 0x7ffff7fed700 (LWP 4945)]
Catchpoint 1 (exception thrown), 0x00007ffff31bc430 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00007ffff31bc430 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007ffff28934b0 in rust_task::begin_failure (this=0x7912b0, expr=<optimized out>, file=<optimized out>, line=<optimized out>)
    at /home/florent/servo/src/compiler/rust/src/rt/rust_task.cpp:338
#2  0x00007ffff28a4129 in __morestack ()
   from /home/florent/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so
#3  0x00007ffff28953d8 in call_on_c_stack (fn_ptr=0x7ffff2894ad0 <upcall_s_fail(s_fail_args*)>, args=0x7fffef23bfc0, this=0x7912b0)
    at /home/florent/servo/src/compiler/rust/src/rt/rust_task.h:481
#4  call_upcall_on_c_stack (fn_ptr=0x7ffff2894ad0 <upcall_s_fail(s_fail_args*)>, args=0x7fffef23bfc0, task=<optimized out>)
    at /home/florent/servo/src/compiler/rust/src/rt/rust_upcall.cpp:51
#5  upcall_fail (expr=<optimized out>, file=0x7ffff4d50e10 <str10688> "/home/florent/servo/src/components/gfx/opts.rs", line=43)
    at /home/florent/servo/src/compiler/rust/src/rt/rust_upcall.cpp:134
#6  0x00007ffff78b2e82 in sys::rustrt::rust_upcall_fail::_a697feb665ab3b38::_07pre ()
   from /home/florent/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#7  0x00007ffff79342ec in __morestack ()
   from /home/florent/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#8  0x00007ffff78b31c0 in sys::begin_unwind_::_615cb041c655a97::_07pre ()
   from /home/florent/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#9  0x00007ffff78b30fb in sys::__extensions__::fail_with::anon::anon::expr_fn_19928 ()
   from /home/florent/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#10 0x00007ffff78b2f42 in str::as_buf_19923::_73a19a2b609993d::_07pre ()
   from /home/florent/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#11 0x00007ffff78b302f in sys::__extensions__::fail_with::anon::expr_fn_19926 ()
---Type <return> to continue, or q <return> to quit---
   from /home/florent/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#12 0x00007ffff78b2f42 in str::as_buf_19923::_73a19a2b609993d::_07pre ()
   from /home/florent/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#13 0x00007ffff775ba2c in sys::__extensions__::meth_8944::fail_with::_ac9eb45dc42bd690::_07pre ()
   from /home/florent/servo/build/src/compiler/rust/x86_64-unknown-linux-gnu/stage2/lib/rustc/x86_64-unknown-linux-gnu/lib/libcore-c3ca5d77d81b46c1-0.7-pre.so
#14 0x00007ffff4d35848 in opts::from_cmdline_args::_d2f439953e16463::_01 () from /home/florent/servo/build/src/components/gfx/libgfx-9c247398498f8-0.1.so
#15 0x00007ffff4d4ff08 in __morestack () from /home/florent/servo/build/src/components/gfx/libgfx-9c247398498f8-0.1.so
#16 0x0000000000540f5d in _rust_main ()
#17 0x00007ffff2893e04 in task_start_wrapper (a=0x792220) at /home/florent/servo/src/compiler/rust/src/rt/rust_task.cpp:167
#18 0x0000000000000000 in ?? ()
@metajack
Copy link
Contributor

@metajack metajack commented Jun 25, 2013

@fflorent that's just yelling at you for not providing a URL.

@jdm
Copy link
Member

@jdm jdm commented Jun 25, 2013

In particular, you probably still need --args before the path to the html file.

@metajack
Copy link
Contributor

@metajack metajack commented Jun 26, 2013

This appears to a kernel/driver bug that is now fixed. See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1094173/comments/14 for some more info.

I am running Fedora 18 with i915, and I'm not seeing crashes, although the textures don't work. If someone who is hitting this can upgrade and see if that fixes it, that would be awesome.

In the meantime, I'll debug the bad rendering I'm seeing and maybe that will fix it on the buggy driver.

@jdm
Copy link
Member

@jdm jdm commented Jun 27, 2013

Having upgraded to Fedora 18, I now see a window appear with garbage in it. If I resize the window, it quits instantly with the same failure message.

@andrewguertin
Copy link
Contributor

@andrewguertin andrewguertin commented Jun 27, 2013

I am seeing this on Gentoo with linux 3.10.0-rc6, mesa git, libdrm 2.4.45 and xf86-video-intel 2.21.10, on an ivybridge chip.

This regressed (unsuprisingly) between 96731e9 and 93eea6b. That's a small branch with just six commits, one of which is "Switch to GPU rendering." I had trouble bisecting inside, because of build problems.

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1094173/comments/14

This is a crash with "intel_do_flush_locked failed: Device or resource busy", not "intel_do_flush_locked failed: No such file or directory"

@metajack
Copy link
Contributor

@metajack metajack commented Jun 28, 2013

So here's the current status:

intel i915 and i965 cards seem to quit after intel_do_flush_locked (tracking this down with gdb seems to point to glClear(GL_STENCIL_BUFFER_BIT) being the thing that makes it fail)
nouveau drivers can segfault (this appears to happen in a slightly different place (on the first glXMakeCurrent)
proprietary nvidia drivers appear to work fine

some people don't get a crash or failure but instead get garbage data.

This appears to be a set of driver bugs relating to shared contexts, and after some digging online by jdm and myself, I think this is caused by the XOpenDisplay() return pointer interacting badly with driver intialization. Basically the driver iterates over the pointers instead of over the unique displays, so things are getting initialized multiple times and clobbering each other.

Reusing the Display pointer and the GLXPixmap will probably fix this, but glut does not provide access to these internal structures. EGL does, but glut does not use EGL.

The current plan is to port servo to glfw and use that, which does provide a native api to access the Display pointer as other bits that are needed to create a new shared context.

@vvuk
Copy link
Contributor

@vvuk vvuk commented Jun 28, 2013

glfw is a good option. Most apps don't call XOpenDisplay more than once, and I hope you're not mixing resources between different display pointers :)

@metajack
Copy link
Contributor

@metajack metajack commented Jun 28, 2013

Current workaround until a fix is applied:

LIBGL_ALWAYS_SOFTWARE=1 ./servo ARGS

@jdm
Copy link
Member

@jdm jdm commented Jul 10, 2013

This has been fixed by #563.

@jdm jdm closed this Jul 10, 2013
ChrisParis pushed a commit to ChrisParis/servo that referenced this issue Sep 7, 2014
Move tests for non-support of historical features in FileAPI to a separate test.
glennw pushed a commit to glennw/servo that referenced this issue Jan 16, 2017
Add a debug_colors module, to be used for gpu profile tags etc.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/536)
<!-- Reviewable:end -->
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
6 participants
You can’t perform that action at this time.