Bug 79590

Summary: xserver crashes in glamor_egl_create_argb8888_based_texture when playing videos
Product: xorg Reporter: Erich Seifert <eseifert>
Component: Server/Acceleration/glamorAssignee: Zhigang Gong <zhigang.gong>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: eseifert
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Erich Seifert 2014-06-03 13:55:20 UTC
Since I upgraded my Gentoo box from Mesa 10.2.0 RC3 to Mesa 10.2.0 RC5 I'm experiencing segfaults when I try to play videos in VLC on my KDE 4.13.1 desktop.

The playback works sometimes after xserver has been restarted, but after a while starting the video causes xserver to segfault again.


Output from Xorg.0.log.old:

[ 17102.500] (EE) Backtrace:
[ 17102.500] (EE) 0: /usr/bin/X (xorg_backtrace+0x48) [0x596cd0]
[ 17102.500] (EE) 1: /usr/bin/X (0x400000+0x19aa55) [0x59aa55]
[ 17102.500] (EE) 2: /lib64/libc.so.6 (0x3b34e00000+0x38580) [0x3b34e38580]
[ 17102.500] (EE) 3: /usr/lib64/dri/radeonsi_dri.so (0x7f75b2b0d000+0x6c4b9) [0x7f75b2b794b9]
[ 17102.500] (EE) 4: /usr/lib64/dri/radeonsi_dri.so (0x7f75b2b0d000+0x6b36b) [0x7f75b2b7836b]
[ 17102.501] (EE) 5: /usr/lib64/dri/radeonsi_dri.so (0x7f75b2b0d000+0x1bdc9e) [0x7f75b2ccac9e]
[ 17102.501] (EE) 6: /usr/lib64/dri/radeonsi_dri.so (0x7f75b2b0d000+0x198f15) [0x7f75b2ca5f15]
[ 17102.501] (EE) 7: /usr/lib64/dri/radeonsi_dri.so (0x7f75b2b0d000+0x13952b) [0x7f75b2c4652b]
[ 17102.501] (EE) 8: /usr/lib64/xorg/modules/libglamoregl.so (0x7f75b4fa3000+0x1baa) [0x7f75b4fa4baa]
[ 17102.501] (EE) 9: /usr/lib64/xorg/modules/libglamoregl.so (glamor_egl_create_argb8888_based_texture+0x9d) [0x7f75b4fa4fff]
[ 17102.501] (EE) 10: /usr/lib64/libglamor.so.0 (0x7f75b4901000+0x2632e) [0x7f75b492732e]
[ 17102.501] (EE) 11: /usr/lib64/libglamor.so.0 (0x7f75b4901000+0x26c05) [0x7f75b4927c05]
[ 17102.501] (EE) 12: /usr/lib64/libglamor.so.0 (glamor_create_pixmap+0x229) [0x7f75b4906018]
[ 17102.501] (EE) 13: /usr/lib64/xorg/modules/drivers/radeon_drv.so (0x7f75b356f000+0x55d7c) [0x7f75b35c4d7c]
[ 17102.501] (EE) 14: /usr/bin/X (0x400000+0x358f9) [0x4358f9]
[ 17102.501] (EE) 15: /usr/bin/X (0x400000+0x39d87) [0x439d87]
[ 17102.501] (EE) 16: /usr/bin/X (0x400000+0x3d855) [0x43d855]
[ 17102.501] (EE) 17: /usr/bin/X (0x400000+0x29395) [0x429395]
[ 17102.501] (EE) 18: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x3b34e24bf5]
[ 17102.501] (EE) 19: /usr/bin/X (0x400000+0x292c9) [0x4292c9]
[ 17102.501] (EE) 
[ 17102.501] (EE) Segmentation fault at address 0x10
[ 17102.501] (EE) 
Fatal server error:
[ 17102.501] (EE) Caught signal 11 (Segmentation fault). Server aborting


Backtrace I obtained from gdb -p $(pidof X):

Program received signal SIGSEGV, Segmentation fault.
0x00007f75b2b794b9 in dri2_lookup_egl_image (screen=<optimized out>, handle=0x34f0140) at dri2.c:564
564     dri2.c: Datei oder Verzeichnis nicht gefunden.
(gdb) bt full
#0  0x00007f75b2b794b9 in dri2_lookup_egl_image (screen=<optimized out>, handle=0x34f0140) at dri2.c:564
        loader = 0x0
        img = <optimized out>
#1  0x00007f75b2b7836b in dri_get_egl_image (smapi=<optimized out>, egl_image=<optimized out>, stimg=0x7fffef803e40) at dri_screen.c:321
        screen = <optimized out>
        img = 0x0
#2  0x00007f75b2ccac9e in st_manager_get_egl_image_surface (st=0x3288c80, eglimg=<optimized out>) at state_tracker/st_manager.c:837
        smapi = <optimized out>
        stimg = {texture = 0x0, level = 0, layer = 0}
        ps = <optimized out>
        surf_tmpl = {reference = {count = -276808096}, texture = 0x3b351a5640, context = 0x7fffef803e80, format = 2283648, width = 0, height = 112, writable = 0, u = {tex = {level = 59459456, 
              first_layer = 0, last_layer = 0}, buf = {first_element = 59459456, last_element = 0}}}
#3  0x00007f75b2ca5f15 in st_egl_image_target_texture_2d (ctx=0x3257240, target=<optimized out>, texObj=0x34cff00, texImage=0x300a420, image_handle=<optimized out>) at state_tracker/st_cb_eglimage.c:147
        ps = <optimized out>
#4  0x00007f75b2c4652b in _mesa_EGLImageTargetTexture2DOES (target=3553, image=0x34f0140) at main/teximage.c:3388
        texObj = 0x34cff00
        texImage = 0x300a420
        valid_target = <optimized out>
        ctx = 0x3257240
#5  0x00007f75b4fa4baa in glamor_create_texture_from_image (glamor_egl=glamor_egl@entry=0x14ec080, image=image@entry=0x34f0140, texture=texture@entry=0x7fffef803f4c)
    at /var/tmp/portage/x11-libs/glamor-9999/work/glamor-9999/src/glamor_egl.c:217
No locals.
#6  0x00007f75b4fa4fff in glamor_egl_create_argb8888_based_texture (screen=0x15d2e00, w=w@entry=88, h=h@entry=88) at /var/tmp/portage/x11-libs/glamor-9999/work/glamor-9999/src/glamor_egl.c:256
        scrn = <optimized out>
        glamor_egl = 0x14ec080
        image = 0x34f0140
        texture = 19
        bo = 0x3522f10
        native_pixmap = 0x3522f10
#7  0x00007f75b492732e in _glamor_create_tex (glamor_priv=glamor_priv@entry=0x15ff510, w=w@entry=88, h=h@entry=88, format=format@entry=6408)
    at /var/tmp/portage/x11-libs/glamor-9999/work/glamor-9999/src/glamor_fbo.c:344
        tex = 0
#8  0x00007f75b4927c05 in glamor_create_fbo (glamor_priv=glamor_priv@entry=0x15ff510, w=w@entry=88, h=h@entry=88, format=format@entry=6408, flag=flag@entry=0)
    at /var/tmp/portage/x11-libs/glamor-9999/work/glamor-9999/src/glamor_fbo.c:392
        fbo = <optimized out>
        tex = 0
        cache_flag = <optimized out>
#9  0x00007f75b4906018 in glamor_create_pixmap (screen=screen@entry=0x15d2e00, w=w@entry=88, h=h@entry=88, depth=depth@entry=24, usage=usage@entry=0)
    at /var/tmp/portage/x11-libs/glamor-9999/work/glamor-9999/src/glamor.c:175
        pixmap = 0x300a4a0
        type = GLAMOR_TEXTURE_ONLY
        pixmap_priv = 0x300a520
        glamor_priv = 0x15ff510
        fbo = 0x0
        pitch = <optimized out>
        format = 6408
#10 0x00007f75b35c4d7c in radeon_glamor_create_pixmap (screen=0x15d2e00, w=88, h=88, depth=24, usage=0)
    at /var/tmp/portage/x11-drivers/xf86-video-ati-7.3.0/work/xf86-video-ati-7.3.0/src/radeon_glamor.c:185
        scrn = 0x14ea150
        priv = <optimized out>
        pixmap = <optimized out>
        new_pixmap = 0x0
#11 0x00000000004358f9 in ProcCreatePixmap (client=0x20d6890) at /var/tmp/portage/x11-base/xorg-server-1.15.99.902-r2/work/xorg-server-1.15.99.902/dix/dispatch.c:1392
        pMap = <optimized out>
        pDraw = 0x1dbcda0
        stuff = 0x2f0bb70
        pDepth = <optimized out>
        i = <optimized out>
        rc = <optimized out>
#12 0x0000000000439d87 in Dispatch () at /var/tmp/portage/x11-base/xorg-server-1.15.99.902-r2/work/xorg-server-1.15.99.902/dix/dispatch.c:432
        clientReady = 0x1f73160
        result = 0
        client = 0x20d6890
        nready = 0
        icheck = 0x81e4d0 <checkForInput>
        start_tick = 640
#13 0x000000000043d855 in dix_main (argc=10, argv=0x7fffef804308, envp=<optimized out>) at /var/tmp/portage/x11-base/xorg-server-1.15.99.902-r2/work/xorg-server-1.15.99.902/dix/main.c:296
        i = <optimized out>
        alwaysCheckForInput = {0, 1}
#14 0x0000000000429395 in main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at /var/tmp/portage/x11-base/xorg-server-1.15.99.902-r2/work/xorg-server-1.15.99.902/dix/stubmain.c:34
No locals.


Hardware used:
- AMD Cape Verde XT (Radeon HD 7770)

Software used:
- Mesa 10.2.0 RC5
- llvm 3.4.1
- xorg-server 1.15.99.902
- xf86-video-ati 7.3.0
- glamor from git
- KWin 4.13.1
Comment 1 Erich Seifert 2014-06-03 14:31:16 UTC
This is probably related to the issue Michel mentioned on Mesa-dev a while ago:
http://lists.freedesktop.org/archives/mesa-dev/2014-March/055180.html
Comment 2 Erich Seifert 2014-06-03 21:43:28 UTC
I'm using Mesa from git now and the issue seems to be fixed. No segfaults so far.
Comment 3 Erich Seifert 2014-06-21 22:51:51 UTC
I'm closing this bug as it was fixed in more recent versions of Mesa.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.