viz_unittests RendererPixelTest/2.* failed on mac |
||||||||
Issue descriptionReproduce steps: 1. apply cl https://crrev.com/c/1374516 2. ninja -C out/Release viz_unittests 3. ./out/Release/viz_unittests --gtest_filter=RendererPixelTest/2.* The log: Note: Google Test filter = RendererPixelTest/2.SimpleGreenRect [==========] Running 1 test from 1 test case. [----------] Global test environment set-up. [----------] 1 test from RendererPixelTest/2, where TypeParam = <type> [ RUN ] RendererPixelTest/2.SimpleGreenRect [74999:775:1212/151942.088980:18077524755906:ERROR:skia_output_surface_impl.cc(260)] Not implemented reached in virtual void viz::SkiaOutputSurfaceImpl::EnsureBackbuffer() [74999:7939:1212/151942.107833:18077543599782:ERROR:GrGLGpu.cpp(2342)] GrGLGpu::flushRenderTarget glCheckFramebufferStatus 8cd7 [74999:775:1212/151942.144919:18077580687271:ERROR:pixel_comparator.cc(47)] Number of pixel with an error: 40000 [74999:775:1212/151942.144979:18077580743212:ERROR:pixel_comparator.cc(48)] Error Bounding Box : 0,0 200x200 [74999:775:1212/151942.157390:18077593157558:ERROR:pixel_test_utils.cc(74)] Pixels do not match! [74999:775:1212/151942.157456:18077593220463:ERROR:pixel_test_utils.cc(75)] Actual: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAsUlEQVR4nO3BAQEAAACCIP+vbkhAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8GXHmAAFMgHIEAAAAAElFTkSuQmCC [74999:775:1212/151942.157484:18077593248427:ERROR:pixel_test_utils.cc(76)] Expected: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAACEklEQVR4nO3SQQkAIADAQLV/Zy3hEOQuwR6bYw+4br0O4E/GImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBLGImEsEsYiYSwSxiJhLBIHiT4Cj0F2Di0AAAAASUVORK5CYII= ../../components/viz/service/display/renderer_pixeltest.cc:933: Failure Value of: this->RunPixelTest(&pass_list, base::FilePath(FILE_PATH_LITERAL("green.png")), cc::ExactPixelComparator(true)) Actual: false Expected: true Stack trace: 0 libbase.dylib 0x000000010bdd1ada base::debug::StackTrace::StackTrace() + 26 1 viz_unittests 0x0000000107bed6aa StackTraceGetter::CurrentStackTrace(int, int) + 90 2 viz_unittests 0x0000000107bfd237 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop(int) + 71 3 viz_unittests 0x0000000107bfcd11 testing::internal::AssertHelper::operator=(testing::Message const&) const + 145 4 viz_unittests 0x00000001079b8bb8 viz::(anonymous namespace)::RendererPixelTest_SimpleGreenRect_Test<viz::SkiaRenderer>::TestBody() + 552 [74999:7939:1212/151942.223294:18077659059881:FATAL:gl_context.cc(337)] Check failed: error == GL_NO_ERROR || error == GL_CONTEXT_LOST_KHR. GL error was: 1286 0 libbase.dylib 0x000000010c0e8863 base::debug::StackTrace::StackTrace(unsigned long) + 83 1 libbase.dylib 0x000000010c0e891d base::debug::StackTrace::StackTrace(unsigned long) + 29 2 libbase.dylib 0x000000010bdd1ada base::debug::StackTrace::StackTrace() + 26 3 libbase.dylib 0x000000010be1945e logging::LogMessage::~LogMessage() + 142 4 libbase.dylib 0x000000010be18255 logging::LogMessage::~LogMessage() + 21 5 libgl_wrapper.dylib 0x000000011d1a44bf gl::GLContext::MakeVirtuallyCurrent(gl::GLContext*, gl::GLSurface*) + 1023 6 libgles2.dylib 0x000000011b8c2e4a gpu::GLContextVirtual::MakeCurrent(gl::GLSurface*) + 138 7 libgl_in_process_context.dylib 0x000000011cac58d5 gpu::InProcessCommandBuffer::DestroyOnGpuThread() + 581 8 libgl_in_process_context.dylib 0x000000011cae14ed bool base::internal::FunctorTraits<bool (gpu::InProcessCommandBuffer::*)(), void>::Invoke<bool (gpu::InProcessCommandBuffer::*)(), gpu::InProcessCommandBuffer*>(bool (gpu::InProcessCommandBuffer::*)(), gpu::InProcessCommandBuffer*&&) + 125 9 libgl_in_process_context.dylib 0x000000011cae1431 bool base::internal::InvokeHelper<false, bool>::MakeItSo<bool (gpu::InProcessCommandBuffer::*)(), gpu::InProcessCommandBuffer*>(bool (gpu::InProcessCommandBuffer::*&&)(), gpu::InProcessCommandBuffer*&&) + 81 10 libgl_in_process_context.dylib 0x000000011cae1385 bool base::internal::Invoker<base::internal::BindState<bool (gpu::InProcessCommandBuffer::*)(), base::internal::UnretainedWrapper<gpu::InProcessCommandBuffer> >, bool ()>::RunImpl<bool (gpu::InProcessCommandBuffer::*)(), std::__1::tuple<base::internal::UnretainedWrapper<gpu::InProcessCommandBuffer> >, 0ul>(bool (gpu::InProcessCommandBuffer::*&&)(), std::__1::tuple<base::internal::UnretainedWrapper<gpu::InProcessCommandBuffer> >&&, std::__1::integer_sequence<unsigned long, 0ul>) + 85 11 libgl_in_process_context.dylib 0x000000011cae126e base::internal::Invoker<base::internal::BindState<bool (gpu::InProcessCommandBuffer::*)(), base::internal::UnretainedWrapper<gpu::InProcessCommandBuffer> >, bool ()>::RunOnce(base::internal::BindStateBase*) + 62 12 libgl_in_process_context.dylib 0x000000011cae1d8c base::OnceCallback<bool ()>::Run() && + 92 13 libgl_in_process_context.dylib 0x000000011cae1d14 base::OnceCallback<void ()> gpu::(anonymous namespace)::WrapTaskWithResult<bool>(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*)::'lambda'(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*)::operator()(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*) const + 36 14 libgl_in_process_context.dylib 0x000000011cae1ca5 void base::internal::FunctorTraits<base::OnceCallback<void ()> gpu::(anonymous namespace)::WrapTaskWithResult<bool>(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*)::'lambda'(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*), void>::Invoke<base::OnceCallback<void ()> gpu::(anonymous namespace)::WrapTaskWithResult<bool>(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*)::'lambda'(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*), base::OnceCallback<bool ()>, bool*, base::WaitableEvent*>(bool&&, base::OnceCallback<bool ()>&&, bool*&&, base::WaitableEvent*&&) + 117 15 libgl_in_process_context.dylib 0x000000011cae1b3c void base::internal::InvokeHelper<false, void>::MakeItSo<base::OnceCallback<void ()> gpu::(anonymous namespace)::WrapTaskWithResult<bool>(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*)::'lambda'(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*), base::OnceCallback<bool ()>, bool*, base::WaitableEvent*>(bool&&, base::OnceCallback<bool ()>&&, bool*&&, base::WaitableEvent*&&) + 92 16 libgl_in_process_context.dylib 0x000000011cae1ab4 void base::internal::Invoker<base::internal::BindState<base::OnceCallback<void ()> gpu::(anonymous namespace)::WrapTaskWithResult<bool>(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*)::'lambda'(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*), base::OnceCallback<bool ()>, bool*, base::WaitableEvent*>, void ()>::RunImpl<base::OnceCallback<void ()> gpu::(anonymous namespace)::WrapTaskWithResult<bool>(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*)::'lambda'(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*), std::__1::tuple<base::OnceCallback<bool ()>, bool*, base::WaitableEvent*>, 0ul, 1ul, 2ul>(bool&&, std::__1::tuple<base::OnceCallback<bool ()>, bool*, base::WaitableEvent*>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul>) + 132 17 libgl_in_process_context.dylib 0x000000011cae194e base::internal::Invoker<base::internal::BindState<base::OnceCallback<void ()> gpu::(anonymous namespace)::WrapTaskWithResult<bool>(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*)::'lambda'(base::OnceCallback<bool ()>, bool*, base::WaitableEvent*), base::OnceCallback<bool ()>, bool*, base::WaitableEvent*>, void ()>::RunOnce(base::internal::BindStateBase*) + 62 18 libbase.dylib 0x000000010bd9379c base::OnceCallback<void ()>::Run() && + 92 19 libbase.dylib 0x000000010bdd30f9 base::debug::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 729 20 libbase.dylib 0x000000010be5da3c base::MessageLoopImpl::RunTask(base::PendingTask*) + 796 21 libbase.dylib 0x000000010be5deb9 base::MessageLoopImpl::DeferOrRunPendingTask(base::PendingTask) + 89 22 libbase.dylib 0x000000010be5e967 base::MessageLoopImpl::DoWork() + 455 23 libbase.dylib 0x000000010be6804e base::MessagePumpDefault::Run(base::MessagePump::Delegate*) + 78 24 libbase.dylib 0x000000010be5d2a0 base::MessageLoopImpl::Run(bool) + 512 25 libbase.dylib 0x000000010bf0c7fd base::RunLoop::Run() + 525 26 libbase.dylib 0x000000010c036929 base::Thread::Run(base::RunLoop*) + 393 27 libbase.dylib 0x000000010c0370a3 base::Thread::ThreadMain() + 1107 28 libbase.dylib 0x000000010c10ee60 base::(anonymous namespace)::ThreadFunc(void*) + 192 29 libsystem_pthread.dylib 0x00007fff5763b661 _pthread_body + 340 30 libsystem_pthread.dylib 0x00007fff5763b50d _pthread_body + 0 31 libsystem_pthread.dylib 0x00007fff5763abf9 thread_start + 13 [74998:21255:1212/151942.287781:18077723560538:ERROR:kill_posix.cc(84)] Unable to terminate process group 74999: No such process (3) [1/1] RendererPixelTest/2.SimpleGreenRect (CRASHED) 1 test crashed: RendererPixelTest/2.SimpleGreenRect (../../components/viz/service/display/renderer_pixeltest.cc:916) Tests took 0 seconds.
,
Dec 12
,
Dec 12
,
Dec 13
Reassigning to viz.
,
Dec 13
,
Dec 13
I though the problem is because gl context state is modified by chrome, and GrContext isn't reset before calling skia methods. So I tired adding extra GrContext reset call before calling skia methods, but it problem still happens. So I am guessing this is an issue in skia. Hi Greg or Robert, could you please take a look? Thanks.
,
Dec 13
So I don't think resetting the context will effect whether or not a gl framebuffer is incomplete or not. Can you do some debugging and investigation into where the framebuffer is coming from. I'm guessing you are wrapping a framebuffer into an SkSurface? If so, can you check the framebuffer status at the time you originaly give it Skia? I believe skia never adds attachments to wrapped framebuffers, so I assume if it is complete when you give us the framebuffer it should stay complete. If I had to guess I would imagine this has something more to do with using virtual contexts and possibly trying to share framebuffers across them?
,
Dec 13
Thanks for the hints. I did some investigation, the results are: 1. incomplete framebuffer error is happen during GrContext::flush() at [1]. 2. Before the flush, chrome issued draw ddl operation on SkiaOutputSurface::surface_ 3. SkiaOutputSurface::surface_ is an offscreen GLSurface for viz_unittests. It is an EGLSurface on Mac created at [2]. 4. Also I verified the error in GrGLGpu::flushRenderTargetNoColorWrite(), the target->renderFBOID() is 0. Do you know how a default framebuffer 0 can be incompleted? [1] https://cs.chromium.org/chromium/src/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc?q=SkiaOutputSurfaceImplOnGpu&sq=package:chromium&g=0&l=218 [2] https://cs.chromium.org/chromium/src/ui/gl/gl_surface_egl.cc?type=cs&q=PbufferGLSurfaceEGL&g=0&l=1651
,
Dec 13
If I add an extra MakeCurrent(surface_.get()) with the real context(not the virtualized gl context), it fixes the problem. I guess the issue is related to virtualized gl context.
,
Dec 18
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/53776079784e4e76a2673e54b4d2745ac7475415 commit 53776079784e4e76a2673e54b4d2745ac7475415 Author: Jonathan Backer <backer@chromium.org> Date: Tue Dec 18 22:12:52 2018 Use a FakeOnScreenSurface for unit tests RendererPixelTests exercise SkiaRenderer and do a readback from the gl_surface_ in SkiaOutputSurfaceOnGpu. Using a FakeOnScreenSurface guarantees that GLContextVirtual will always make the surface current. Bug: 914495 Change-Id: I1cccad720780307d9e14fe3f6e064ea6fb5327d7 Reviewed-on: https://chromium-review.googlesource.com/c/1382860 Reviewed-by: Peng Huang <penghuang@chromium.org> Commit-Queue: Peng Huang <penghuang@chromium.org> Cr-Commit-Position: refs/heads/master@{#617650} [modify] https://crrev.com/53776079784e4e76a2673e54b4d2745ac7475415/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc [modify] https://crrev.com/53776079784e4e76a2673e54b4d2745ac7475415/gpu/ipc/in_process_command_buffer.cc [modify] https://crrev.com/53776079784e4e76a2673e54b4d2745ac7475415/gpu/ipc/service/gles2_command_buffer_stub.cc [modify] https://crrev.com/53776079784e4e76a2673e54b4d2745ac7475415/gpu/ipc/service/gpu_channel_manager.cc
,
Dec 18
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by penghuang@chromium.org
, Dec 12