<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - X 1.16.1 RC 1 segfaults and reports "XXX fail to create fbo" with Radeon HD 7970."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=84186#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - X 1.16.1 RC 1 segfaults and reports "XXX fail to create fbo" with Radeon HD 7970."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=84186">bug 84186</a>
              from <span class="vcard"><a class="email" href="mailto:toojays@toojays.net" title="John Steele Scott <toojays@toojays.net>"> <span class="fn">John Steele Scott</span></a>
</span></b>
        <pre>Okay, I've figured out how to get a bit more debug information out of glamor
(setting the environment variable GLAMOR_DEBUG=1), and have installed debug
symbols.

The following log message is shown twice before the segfault:

         glamor_pixmap_ensure_fb:    glamor: Failed to create fbo, incomplete
attachment

The backtrace at the first of these points looks like:

#0  glamor_pixmap_ensure_fb (fbo=fbo@entry=0x555556212e50) at
../../glamor/glamor_fbo.c:218
        str = 0x7ffff13b66ab "incomplete attachment"
        status = 36054
        err = 0
        __PRETTY_FUNCTION__ = "glamor_pixmap_ensure_fb"
        __FUNCTION__ = "glamor_pixmap_ensure_fb"
#1  0x00007ffff13ac2b5 in glamor_create_fbo_from_tex
(glamor_priv=0x555555b24740, w=1024, h=1056, format=6408, tex=2, flag=261) at
../../glamor/glamor_fbo.c:250
        fbo = 0x555556212e50
#2  0x00007ffff13837d8 in glamor_create_pixmap (screen=0x5555559d57e0, w=1024,
h=1056, depth=32, usage=261) at ../../glamor/glamor.c:201
        type = GLAMOR_MEMORY
        pixmap_priv = 0x555556212dd0
        fbo = 0x8cd6
#3  0x00007ffff203ab01 in radeon_glamor_create_pixmap (screen=0x5555559d57e0,
w=1024, h=1056, depth=32, usage=261) at ../../src/radeon_glamor.c:197
        priv = 0x555555af5290
        new_pixmap = 0x105
#4  0x00007ffff138bfc1 in glamor_realize_glyph_caches (pScreen=0x5555559d57e0)
at ../../glamor/glamor_glyphs.c:332
        depth = 32
        pPictFormat = 0x555555a2b9c8
        pixmap = 0x20
        picture = 0x555555a2b9c8
        component_alpha = 0
        error = 0
        formats = {134316032, 537036936}
#5  0x00007ffff138277d in glamor_create_screen_resources
(screen=0x5555559d57e0) at ../../glamor/glamor.c:305
        ret = 1
#6  0x00007ffff20332d3 in RADEONCreateScreenResources_KMS
(pScreen=0x5555559d57e0) at ../../src/radeon_kms.c:229
        pScrn = 0x5555559d64b0
        info = 0x5555559d7300
        pixmap = <optimized out>
#7  0x000055555561fc3e in xf86CrtcCreateScreenResources (screen=0x5555559d57e0)
at ../../../../hw/xfree86/modes/xf86Crtc.c:709
        scrn = <optimized out>
        config = <optimized out>
#8  0x00005555555aef26 in dix_main (argc=3, argv=0x7fffffffe6a8,
envp=<optimized out>) at ../../dix/main.c:223
        pScreen = 0x5555559d57e0
        i = 0
        alwaysCheckForInput = {0, 1}
#9  0x00007ffff5d13b45 in __libc_start_main (main=0x5555555994e0 <main>,
argc=3, argv=0x7fffffffe6a8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe698) at libc-start.c:287
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -8785920377037677806,
93824992515301, 140737488348832, 0, 0, 8785920376303360786,
8785898719497657106}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0,
0x55555571a810 <__libc_csu_init>, 0x7fffffffe6a8}, data = {prev = 0x0, cleanup
= 0x0, canceltype = 1433511952}}}
        not_first_call = <optimized out>
#10 0x000055555559950e in _start ()
No symbol table info available.


The backtrace at the second looks like:

#0  glamor_pixmap_ensure_fb (fbo=fbo@entry=0x555556219e50) at
../../glamor/glamor_fbo.c:218
        str = 0x7ffff13b66ab "incomplete attachment"
        status = 36054
        err = 0
        __PRETTY_FUNCTION__ = "glamor_pixmap_ensure_fb"
        __FUNCTION__ = "glamor_pixmap_ensure_fb"
#1  0x00007ffff13ac2b5 in glamor_create_fbo_from_tex
(glamor_priv=glamor_priv@entry=0x555555b24740, w=2560, h=1440, format=6408,
tex=tex@entry=3, flag=flag@entry=0) at ../../glamor/glamor_fbo.c:250
        fbo = 0x555556219e50
#2  0x00007ffff1383192 in glamor_set_pixmap_texture
(pixmap=pixmap@entry=0x5555561edb60, tex=3) at ../../glamor/glamor.c:103
        screen = <optimized out>
        pixmap_priv = 0x555555ac7160
        fbo = <optimized out>
#3  0x00007ffff137fe49 in glamor_egl_create_textured_pixmap
(pixmap=pixmap@entry=0x5555561edb60, handle=handle@entry=49,
stride=stride@entry=10240) at ../../../../glamor/glamor_egl.c:314
        screen = 0x5555559d57e0
        scrn = <optimized out>
        pixmap_priv = 0x55555622d0d0
        texture = 3
        name = <optimized out>
        ret = 0
        __PRETTY_FUNCTION__ = "glamor_egl_create_textured_pixmap"
#4  0x00007ffff138003d in glamor_egl_create_textured_screen
(screen=screen@entry=0x5555559d57e0, handle=handle@entry=49,
stride=stride@entry=10240) at ../../../../glamor/glamor_egl.c:232
        scrn = 0x5555559d64b0
        pixmap_priv = 0x55555622d0d0
        screen_pixmap = 0x5555561edb60
#5  0x00007ffff138013d in glamor_egl_create_textured_screen_ext
(screen=screen@entry=0x5555559d57e0, handle=49, stride=10240,
back_pixmap=back_pixmap@entry=0x0) at ../../../../glamor/glamor_egl.c:254
        scrn = <optimized out>
#6  0x00007ffff203a6ec in radeon_glamor_create_screen_resources
(screen=screen@entry=0x5555559d57e0) at ../../src/radeon_glamor.c:67
        scrn = 0x5555559d64b0
        info = 0x5555559d7300
#7  0x00007ffff203343a in RADEONCreateScreenResources_KMS
(pScreen=0x5555559d57e0) at ../../src/radeon_kms.c:258
        pScrn = <optimized out>
        info = 0x5555559d7300
        pixmap = <optimized out>
#8  0x000055555561fc3e in xf86CrtcCreateScreenResources (screen=0x5555559d57e0)
at ../../../../hw/xfree86/modes/xf86Crtc.c:709
        scrn = <optimized out>
        config = <optimized out>
#9  0x00005555555aef26 in dix_main (argc=3, argv=0x7fffffffe6a8,
envp=<optimized out>) at ../../dix/main.c:223
        pScreen = 0x5555559d57e0
        i = 0
        alwaysCheckForInput = {0, 1}
#10 0x00007ffff5d13b45 in __libc_start_main (main=0x5555555994e0 <main>,
argc=3, argv=0x7fffffffe6a8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe698) at libc-start.c:287
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -8785920377037677806,
93824992515301, 140737488348832, 0, 0, 8785920376303360786,
8785898719497657106}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0,
0x55555571a810 <__libc_csu_init>, 0x7fffffffe6a8}, data = {prev = 0x0, cleanup
= 0x0, canceltype = 1433511952}}}
        not_first_call = <optimized out>
#11 0x000055555559950e in _start ()
No symbol table info available.


Then I guess the segfault itself is pretty boring since we already know the fbo
is NULL.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff13833b0 in glamor_set_screen_pixmap
(screen_pixmap=screen_pixmap@entry=0x5555561edb60, back_pixmap=0x0) at
../../glamor/glamor.c:122
122        glamor_priv->screen_fbo = pixmap_priv->base.fbo->fb;
(gdb) bt
#0  0x00007ffff13833b0 in glamor_set_screen_pixmap
(screen_pixmap=screen_pixmap@entry=0x5555561edb60, back_pixmap=0x0) at
../../glamor/glamor.c:122
#1  0x00007ffff1380060 in glamor_egl_create_textured_screen
(screen=screen@entry=0x5555559d57e0, handle=handle@entry=49,
stride=stride@entry=10240) at ../../../../glamor/glamor_egl.c:239
#2  0x00007ffff138013d in glamor_egl_create_textured_screen_ext
(screen=screen@entry=0x5555559d57e0, handle=49, stride=10240,
back_pixmap=back_pixmap@entry=0x0) at ../../../../glamor/glamor_egl.c:254
#3  0x00007ffff203a6ec in radeon_glamor_create_screen_resources
(screen=screen@entry=0x5555559d57e0) at ../../src/radeon_glamor.c:67
#4  0x00007ffff203343a in RADEONCreateScreenResources_KMS
(pScreen=0x5555559d57e0) at ../../src/radeon_kms.c:258
#5  0x000055555561fc3e in xf86CrtcCreateScreenResources (screen=0x5555559d57e0)
at ../../../../hw/xfree86/modes/xf86Crtc.c:709
#6  0x00005555555aef26 in dix_main (argc=3, argv=0x7fffffffe6a8,
envp=<optimized out>) at ../../dix/main.c:223
#7  0x00007ffff5d13b45 in __libc_start_main (main=0x5555555994e0 <main>,
argc=3, argv=0x7fffffffe6a8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffe698) at libc-start.c:287
#8  0x000055555559950e in _start ()
(gdb) p pixmap_priv->base.fbo
$22 = (glamor_pixmap_fbo *) 0x0</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>