[Bug 44919] New: Wayland clients segfault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

             Bug #: 44919
           Summary: Wayland clients segfault
    Classification: Unclassified
           Product: Mesa
           Version: git
          Platform: x86 (IA32)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/Gallium/r300
        AssignedTo: dri-devel@xxxxxxxxxxxxxxxxxxxxx
        ReportedBy: oreaus@xxxxxxxxx


I have been testing wayland on r300g and things have been working reasonably
until now. I get a segfault when trying to start any weston client except
simple-egl. Here is the back trace with mesa, cairo and weston built with -O0:

$ gdb ./clients/weston-desktop-shell 
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 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 "i686-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/scott/src/wayland/weston/clients/weston-desktop-shell...done.
(gdb) run
Starting program: /home/scott/src/wayland/weston/clients/weston-desktop-shell 
[Thread debugging using libthread_db enabled]
XDG_RUNTIME_DIR not set, falling back to .

Program received signal SIGSEGV, Segmentation fault.
0x00d9488d in st_framebuffer_validate (stfb=0x184b700, st=0x80e11d8) at
state_tracker/st_manager.c:186
186       int32_t new_stamp = p_atomic_read(&stfb->iface->stamp);
(gdb) bt
#0  0x00d9488d in st_framebuffer_validate (stfb=0x184b700, st=0x80e11d8) at
state_tracker/st_manager.c:186
#1  0x00d958a3 in st_api_make_current (stapi=0x1802620, stctxi=0x80e11d8,
stdrawi=0x0, streadi=0x0) at state_tracker/st_manager.c:731
#2  0x00d35ac6 in dri_make_current (cPriv=0x8073800, driDrawPriv=0x0,
driReadPriv=0x0) at dri_context.c:216
#3  0x00d30bfc in driBindContext (pcp=0x8073800, pdp=0x0, prp=0x0) at
../../../../src/mesa/drivers/dri/common/dri_util.c:330
#4  0x00149efa in dri2_make_current (drv=0x8064910, disp=0x8063c38, dsurf=0x0,
rsurf=0x0, ctx=0x8073858) at egl_dri2.c:818
#5  0x0013eb9b in eglMakeCurrent (dpy=0x8063c38, draw=0x0, read=0x0,
ctx=0x8073858) at eglapi.c:502
#6  0x0028e4d2 in _egl_make_current_surfaceless (ctx=0x81bc548) at
cairo-egl-context.c:127
#7  0x0028e5b9 in cairo_egl_device_create (dpy=0x8063c38, egl=0x8073858) at
cairo-egl-context.c:160
#8  0x08050fe6 in init_egl (d=0x805ef00) at window.c:2787
#9  0x08051362 in display_create (argc=0xbffff350, argv=0xbffff354,
option_entries=0x0) at window.c:2891
#10 0x0804c1f6 in main (argc=1, argv=0xbffff3f4) at desktop-shell.c:669
(gdb) bt full
#0  0x00d9488d in st_framebuffer_validate (stfb=0x184b700, st=0x80e11d8) at
state_tracker/st_manager.c:186
        textures = {0x1842ff4, 0xbffff058, 0xd943dc, 0xbffff0ac, 0x184b700,
0x5f03, 0x184b700}
        width = 3221221512
        height = 25474816
        i = 3221221548
        changed = 0 '\000'
        new_stamp = 14242151
#1  0x00d958a3 in st_api_make_current (stapi=0x1802620, stctxi=0x80e11d8,
stdrawi=0x0, streadi=0x0) at state_tracker/st_manager.c:731
        st = 0x80e11d8
        stdraw = 0x184b700
        stread = 0x184b700
        ret = 8 '\b'
#2  0x00d35ac6 in dri_make_current (cPriv=0x8073800, driDrawPriv=0x0,
driReadPriv=0x0) at dri_context.c:216
        ctx = 0x80720c0
        draw = 0x0
        read = 0x0
        old_st = 0x80e11d8
#3  0x00d30bfc in driBindContext (pcp=0x8073800, pdp=0x0, prp=0x0) at
../../../../src/mesa/drivers/dri/common/dri_util.c:330
No locals.
#4  0x00149efa in dri2_make_current (drv=0x8064910, disp=0x8063c38, dsurf=0x0,
rsurf=0x0, ctx=0x8073858) at egl_dri2.c:818
        dri2_drv = 0x8064910
        dri2_dpy = 0x8064b28
        dri2_dsurf = 0x0
        dri2_rsurf = 0x0
        dri2_ctx = 0x8073858
        old_ctx = 0x8073858
        old_dsurf = 0x0
        old_rsurf = 0x0
        ddraw = 0x0
        rdraw = 0x0
        cctx = 0x8073800
        __PRETTY_FUNCTION__ = "dri2_make_current"
#5  0x0013eb9b in eglMakeCurrent (dpy=0x8063c38, draw=0x0, read=0x0,
ctx=0x8073858) at eglapi.c:502
        disp = 0x8063c38
        context = 0x8073858
        draw_surf = 0x0
        read_surf = 0x0
        drv = 0x8064910
        ret = 0
        __FUNCTION__ = "eglMakeCurrent"
#6  0x0028e4d2 in _egl_make_current_surfaceless (ctx=0x81bc548) at
cairo-egl-context.c:127
        extensions = 0x80644a0 "EGL_MESA_drm_image EGL_WL_bind_wayland_display
EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_image
EGL_KHR_gl_renderbuffer_image EGL_KHR_surfaceless_gles1
EGL_KHR_surfaceless_gles2 EGL_KHR_surfacele"...
#7  0x0028e5b9 in cairo_egl_device_create (dpy=0x8063c38, egl=0x8073858) at
cairo-egl-context.c:160
        ctx = 0x81bc548
        status = 134690904
        attribs = {12375, 1, 12374, 1, 12344}
        config = 0x123c40
        numConfigs = -1073745240
#8  0x08050fe6 in init_egl (d=0x805ef00) at window.c:2787
        major = 1
        minor = 4
        n = 1
        argb_cfg_attribs = {12339, 6, 12324, 1, 12323, 1, 12322, 1, 12321, 1,
12325, 1, 12352, 8, 12344}
        rgb_cfg_attribs = {12339, 6, 12324, 1, 12323, 1, 12322, 1, 12321, 0,
12325, 1, 12352, 8, 12344}
#9  0x08051362 in display_create (argc=0xbffff350, argv=0xbffff354,
option_entries=0x0) at window.c:2891
        d = 0x805ef00
        context = 0x805e990
        xkb_option_group = 0x805e9c0
        error = 0xbffff348
#10 0x0804c1f6 in main (argc=1, argv=0xbffff3f4) at desktop-shell.c:669
        desktop = {display = 0x0, shell = 0x0, unlock_dialog = 0x0, unlock_task
= {run = 0x804be34 <unlock_dialog_finish>, link = {prev = 0x0, 
              next = 0x0}}, outputs = {prev = 0xbffff31c, next = 0xbffff31c}}
        config_file = 0x76e324 ""
        output = 0xbffff348
(gdb) q
A debugging session is active.

    Inferior 1 [process 24323] will be killed.

Quit anyway? (y or n) y


After fiddling around a bit, I found a good mesa commit and bisected to arrive
at the following:

c87247f6a8c5505fea3fa29dac372f9f5316a118 is the first bad commit
commit c87247f6a8c5505fea3fa29dac372f9f5316a118
Author: Brian Paul <brianp@xxxxxxxxxx>
Date:   Fri Jan 6 12:42:40 2012 -0700

    mesa: remove gl_framebuffer:_DepthBuffer, _StencilBuffer fields

    These were used by swrast to make a combined depth+stencil buffer look
    like separate depth and stencil buffers.  But that's no longer needed
    after rewriting the depth/stencil code in swrast.

    Reviewed-by: Eric Anholt <eric@xxxxxxxxxx>


I double checked and the previous commit does indeed work, while this one
causes the issue. System is x86 32 bit with RV350. Kernel 2.6.38. Please let me
know if any further information or testing is needed.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux