servo: WebGL paint thread failure should not cause the constellation to panic

godot2:dev-servo jdm$ ./mach run http://shadertoy.com
assertion failed: gl::CheckFramebufferStatus(gl::FRAMEBUFFER) == gl::FRAMEBUFFER_COMPLETE (thread WebGLThread, at /Users/jdm/.cargo/registry/src/github.com-1ecc6299db9ec823/offscreen_gl_context-0.4.0/src/draw_buffer.rs:112)
stack backtrace:
   0:        0x106d34e11 - backtrace::backtrace::trace::h22a738598d75d447
   1:        0x106d354a0 - backtrace::capture::Backtrace::new::h1a277804460ccff5
   2:        0x1023b35ab - servo::main::_{{closure}}::h5d02d94265372533
   3:        0x106f69a13 - std::panicking::rust_panic_with_hook::h2224f33fb7bf2f4c
   4:        0x1069534c3 - std::panicking::begin_panic::h6da27a7ee15843ce
   5:        0x1068e224a - offscreen_gl_context::draw_buffer::DrawBuffer::new::h2b71fa45226d97ad
   6:        0x10688ee54 - _<offscreen_gl_context..gl_context..GLContext<T> as offscreen_gl_context..gl_context..GLContextPrivateMethods>::create_draw_buffer::hf6015c2bbc2ff32d
   7:        0x10688ec90 - _<offscreen_gl_context..gl_context..GLContext<T> as offscreen_gl_context..gl_context..GLContextPrivateMethods>::init_offscreen::ha4f6e85aa2d767e0
   8:        0x106989822 - _<offscreen_gl_context..gl_context..GLContext<Native>>::new::h79ebdf3f7844fc16
   9:        0x1069ab729 - canvas::webgl_paint_thread::create_readback_painter::hca68d045150a9c2b
  10:        0x1069abed3 - canvas::webgl_paint_thread::WebGLPaintThread::new::hf4f8c004868e26d5
  11:        0x1069b2d25 - canvas::webgl_paint_thread::WebGLPaintThread::start::_{{closure}}::hb649bd4c5c843507
  12:        0x1069a237b - _<std..panic..AssertUnwindSafe<F> as core..ops..FnOnce<()>>::call_once::h94eebf41684dcbdd
  13:        0x106953f06 - std::panicking::try::do_call::hedb00b102a1306cc
  14:        0x106f6a8ba - __rust_maybe_catch_panic
  15:        0x106953610 - std::panicking::try::h1f4d90ec8f9999d9
  16:        0x106951db5 - std::panic::catch_unwind::hdf18e5da8a5d0f6a
  17:        0x1069af09d - std::thread::Builder::spawn::_{{closure}}::h7baa89fe768adb2b
  18:        0x106974af0 - _<F as alloc..boxed..FnBox<A>>::call_box::had0c681e0c921554
  19:        0x106f68815 - std::sys::thread::Thread::new::thread_start::he0bf102845911132
  20:     0x7fff945f2898 - _pthread_body
  21:     0x7fff945f2729 - _pthread_start
ERROR:servo: assertion failed: gl::CheckFramebufferStatus(gl::FRAMEBUFFER) == gl::FRAMEBUFFER_COMPLETE
called `Result::unwrap()` on an `Err` value: RecvError (thread Constellation, at ../src/libcore/result.rs:788)
stack backtrace:
   0:        0x106d34e11 - backtrace::backtrace::trace::h22a738598d75d447
   1:        0x106d354a0 - backtrace::capture::Backtrace::new::h1a277804460ccff5
   2:        0x1023b35ab - servo::main::_{{closure}}::h5d02d94265372533
   3:        0x106f69a13 - std::panicking::rust_panic_with_hook::h2224f33fb7bf2f4c
   4:        0x106f698e4 - std::panicking::begin_panic::hcb11a4dc6d779ae5
   5:        0x106f697f2 - std::panicking::begin_panic_fmt::h310416c62f3935b3
   6:        0x106f69757 - rust_begin_unwind
   7:        0x106f979f0 - core::panicking::panic_fmt::hc5789f4e80194729
   8:        0x10696dc9e - core::result::unwrap_failed::h3e79b7b152b9c363
   9:        0x10695c56d - _<core..result..Result<T, E>>::unwrap::hce2603c0b42c5aeb
  10:        0x1069ad013 - canvas::webgl_paint_thread::WebGLPaintThread::start::hcdf61900f8e552c5
  11:        0x102759ae2 - _<constellation..constellation..Constellation<Message, LTF, STF>>::handle_create_webgl_paint_thread_msg::h91924153644a7572
  12:        0x10274faf6 - _<constellation..constellation..Constellation<Message, LTF, STF>>::handle_request_from_script::h2a1ea5e32d176549
  13:        0x10273ddaf - _<constellation..constellation..Constellation<Message, LTF, STF>>::handle_request::hd167862f08820b10
  14:        0x10275bc8a - _<constellation..constellation..Constellation<Message, LTF, STF>>::run::h2434fad64328ddce
  15:        0x102786fed - _<constellation..constellation..Constellation<Message, LTF, STF>>::start::_{{closure}}::h0a495ecf784e0490
  16:        0x102764d5a - _<std..panic..AssertUnwindSafe<F> as core..ops..FnOnce<()>>::call_once::h3c04c39622311abd
  17:        0x1025c5058 - std::panicking::try::do_call::h93a6fe0bf7844672
  18:        0x106f6a8ba - __rust_maybe_catch_panic
  19:        0x1025c4709 - std::panicking::try::h348cdfbf5c0cf771
  20:        0x1025c2ed4 - std::panic::catch_unwind::hb7588df7deec106c
  21:        0x10277cfc1 - std::thread::Builder::spawn::_{{closure}}::hc6015bde0121ea95
  22:        0x1026737b9 - _<F as alloc..boxed..FnBox<A>>::call_box::ha6269c3c12fd936c
  23:        0x106f68815 - std::sys::thread::Thread::new::thread_start::he0bf102845911132
  24:     0x7fff945f2898 - _pthread_body
  25:     0x7fff945f2729 - _pthread_start
ERROR:servo: called `Result::unwrap()` on an `Err` value: RecvError
called `Result::unwrap()` on an `Err` value: IoError(Error { repr: Custom(Custom { kind: Other, error: StringError("Unknown Mach error: 46") }) }) (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(0), index: PipelineIndex(0) }, at ../src/libcore/result.rs:788)

About this issue

  • Original URL
  • State: open
  • Created 10 years ago
  • Comments: 32 (21 by maintainers)

Most upvoted comments

A couple of (maybe obvious) things I’ve been able to learn:

  • image_template panics when trying to fetch an image that is dropped in WebGLPaintThread::drop. Somehow the constellation sends a GenerateFrame for a frame that is… “invalid”?
  • I think this frame request is due to the panic handler that is supposed to take you to about:failure. Servo doesn’t crash1 when removing this behavior.

[1]: it does crash, but after trying to interact with the browser, instead of automatically.