[Bug 104546] Crash happens when running compute pipeline after calling glxMakeCurrent two times

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 9 06:48:55 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=104546

            Bug ID: 104546
           Summary: Crash happens when running compute pipeline after
                    calling glxMakeCurrent two times
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: major
          Priority: medium
         Component: Drivers/DRI/i965
          Assignee: intel-3d-bugs at lists.freedesktop.org
          Reporter: xinghua.cao at intel.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org

Reproduce steps:
1. Attached file is the C source code;
2. Build the source file, "gcc -o test test.c -lX11 -lepoxy";
3. run "./test", crash happens.

Actually, I summerized above case from ANGLE project, the crash issue was found
on ANGLE project initially. If you want to produce this issue on ANGLE, follow
below steps:
1. Download ANGLE source code, https://github.com/google/angle
2. Build it follow ./doc/DevSetup.md document
3. run "./angle_deqp_gles31_tests
--gtest_filter=dEQP_GLES31.Default/functional_synchronization_in_invocation_image_write_read
"

I had also debugged this issue in mesa, crash for attempting to access a null
pointer, the call stack is as below,
#0  0x00007ffff356d818 in intel_disable_rb_aux_buffer (brw=0x7ffff7fc9040,
tex_mt=0x5555558eb910, min_level=0, num_levels=4294967295, usage=0x7ffff3b8c0ad
"as a shader image") at brw_draw.c:359
#1  0x00007ffff356dc8e in brw_predraw_resolve_inputs (brw=0x7ffff7fc9040,
rendering=false) at brw_draw.c:444
#2  0x00007ffff35644b1 in brw_dispatch_compute_common (ctx=0x7ffff7fc9040) at
brw_compute.c:180
#3  0x00007ffff35646f0 in brw_dispatch_compute (ctx=0x7ffff7fc9040,
num_groups=0x7fffffffdd9c) at brw_compute.c:234
#4  0x00007ffff30786cd in dispatch_compute (no_error=false, num_groups_z=1,
num_groups_y=2, num_groups_x=1) at main/compute.c:265
#5  _mesa_DispatchCompute (num_groups_x=1, num_groups_y=2, num_groups_z=1) at
main/compute.c:280

In intel_disable_rb_aux_buffer function, the mip tree of renderbuffer is not
created, irb->mt is null pointer,
   if (irb && irb->mt->bo == tex_mt->bo &&       // crash here
          irb->mt_level >= min_level &&
          irb->mt_level < min_level + num_levels)

The second drawable overrides the first one when call glXMakeCurrent the second
time. In ./i965/brw_context.c::intelMakeCurrent function,
brw->ctx.ViewportInitialized is setted to true when call glXMakeCurrent the
first time, it does not call intel_prepare_render to update the render buffer
when call glXMakeCurrent the second time, the mip tree is not created.
Because currently use computation pipeline, so it seems that render buffer does
need to real memory buffer and mip tree, is it right? Is it a mesa bug? Or Do
we use the apis incorrectly?

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180109/067c683b/attachment-0001.html>


More information about the intel-3d-bugs mailing list