nok ~ # gdb --pid=$(pidof X) $(which X) GNU gdb (Gentoo 7.10.1 vanilla) 7.10.1 Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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 "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/X...done. Attaching to program: /usr/bin/X, process 13075 Reading symbols from /lib64/libudev.so.1...Reading symbols from /usr/lib64/debug//lib64/libudev.so.1.6.4.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libcrypto.so.1.0.0...Reading symbols from /usr/lib64/debug//usr/lib64/libcrypto.so.1.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /lib64/libdl.so.2...Reading symbols from /usr/lib64/debug//lib64/libdl-2.22.so.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libpciaccess.so.0...Reading symbols from /usr/lib64/debug//usr/lib64/libpciaccess.so.0.11.1.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libdrm.so.2...Reading symbols from /usr/lib64/debug//usr/lib64/libdrm.so.2.4.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libpixman-1.so.0...Reading symbols from /usr/lib64/debug//usr/lib64/libpixman-1.so.0.34.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libXfont.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libXfont.so.1.4.1.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libXau.so.6...Reading symbols from /usr/lib64/debug//usr/lib64/libXau.so.6.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libxshmfence.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libxshmfence.so.1.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libXdmcp.so.6...Reading symbols from /usr/lib64/debug//usr/lib64/libXdmcp.so.6.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /lib64/libm.so.6...Reading symbols from /usr/lib64/debug//lib64/libm-2.22.so.debug...done. done. Reading symbols from /lib64/libc.so.6...Reading symbols from /usr/lib64/debug//lib64/libc-2.22.so.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /lib64/librt.so.1...Reading symbols from /usr/lib64/debug//lib64/librt-2.22.so.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /lib64/libresolv.so.2...Reading symbols from /usr/lib64/debug//lib64/libresolv-2.22.so.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /lib64/libcap.so.2...Reading symbols from /usr/lib64/debug//lib64/libcap.so.2.24.debug...done. done. Reading symbols from /lib64/libpthread.so.0...Reading symbols from /usr/lib64/debug//lib64/libpthread-2.22.so.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. [New LWP 13078] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Reading symbols from /lib64/ld-linux-x86-64.so.2...Reading symbols from /usr/lib64/debug//lib64/ld-2.22.so.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /lib64/libz.so.1...Reading symbols from /usr/lib64/debug//lib64/libz.so.1.2.8.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libfreetype.so.6...Reading symbols from /usr/lib64/debug//usr/lib64/libfreetype.so.6.12.3.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /lib64/libbz2.so.1...Reading symbols from /usr/lib64/debug//lib64/libbz2.so.1.0.6.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libfontenc.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libfontenc.so.1.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libbsd.so.0...Reading symbols from /usr/lib64/debug//usr/lib64/libbsd.so.0.8.2.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /lib64/libattr.so.1...Reading symbols from /usr/lib64/debug//lib64/libattr.so.1.1.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libpng16.so.16...Reading symbols from /usr/lib64/debug//usr/lib64/libpng16.so.16.21.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1...Reading symbols from /usr/lib64/debug//usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1.debug...done. done. Reading symbols from /usr/lib64/xorg/modules/extensions/libglx.so...done. Reading symbols from /usr/lib64/libGL.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libGL.so.1.2.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libexpat.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libexpat.so.1.6.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libxcb-dri3.so.0...Reading symbols from /usr/lib64/debug//usr/lib64/libxcb-dri3.so.0.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libxcb-present.so.0...Reading symbols from /usr/lib64/debug//usr/lib64/libxcb-present.so.0.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libxcb-sync.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libxcb-sync.so.1.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libglapi.so.0...Reading symbols from /usr/lib64/debug//usr/lib64/libglapi.so.0.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libXext.so.6...Reading symbols from /usr/lib64/debug//usr/lib64/libXext.so.6.4.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libXdamage.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libXdamage.so.1.1.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libXfixes.so.3...Reading symbols from /usr/lib64/debug//usr/lib64/libXfixes.so.3.1.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libX11-xcb.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libX11-xcb.so.1.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libX11.so.6...Reading symbols from /usr/lib64/debug//usr/lib64/libX11.so.6.3.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libxcb.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libxcb.so.1.1.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libxcb-glx.so.0...Reading symbols from /usr/lib64/debug//usr/lib64/libxcb-glx.so.0.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libxcb-dri2.so.0...Reading symbols from /usr/lib64/debug//usr/lib64/libxcb-dri2.so.0.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libXxf86vm.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libXxf86vm.so.1.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/xorg/modules/drivers/intel_drv.so...done. Reading symbols from /usr/lib64/xorg/modules/input/synaptics_drv.so...Reading symbols from /usr/lib64/debug//usr/lib64/xorg/modules/input/synaptics_drv.so.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libevdev.so.2...Reading symbols from /usr/lib64/debug//usr/lib64/libevdev.so.2.1.14.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/dri/i965_dri.so...Reading symbols from /usr/lib64/debug//usr/lib64/mesa/i915_dri.so.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libnettle.so.6...Reading symbols from /usr/lib64/debug//usr/lib64/libnettle.so.6.2.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libdrm_intel.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libdrm_intel.so.1.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6...Reading symbols from /usr/lib64/debug//usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6.0.20.debug...done. done. Reading symbols from /usr/lib64/xorg/modules/input/evdev_drv.so...Reading symbols from /usr/lib64/debug//usr/lib64/xorg/modules/input/evdev_drv.so.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. Reading symbols from /usr/lib64/libmtdev.so.1...Reading symbols from /usr/lib64/debug//usr/lib64/libmtdev.so.1.0.0.debug...(no debugging symbols found)...done. (no debugging symbols found)...done. 0x00007f0209e36eb3 in select () from /lib64/libc.so.6 (gdb) break exit Breakpoint 1 at 0x7f0209d8abf0 (gdb) continue Continuing. Breakpoint 1, 0x00007f0209d8abf0 in exit () from /lib64/libc.so.6 (gdb) bt #0 0x00007f0209d8abf0 in exit () from /lib64/libc.so.6 #1 0x000000000063baa3 in AbortServer () at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/os/log.c:878 #2 0x000000000063bfb6 in FatalError (f=0x7f0205eaa1a7 "%s:%d assertion '%s' failed\n") at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/os/log.c:1015 #3 0x00007f0205e62f57 in sna_dri2_schedule_swap (client=0x2600370, draw=0x271a840, front=0x27c5a50, back=0x27c5a00, target_msc=0x7fff6780c318, divisor=0, remainder=0, func=0x5ea9e6 , data=0x271a840) at /var/tmp/portage/x11-drivers/xf86-video-intel-2.99.917_p20160621-r1/work/c28e62f94f15c9f5c4fb0744588f08ae18e4a9b5/src/sna/sna_dri2.c:3330 #4 0x00000000005e8bf4 in DRI2SwapBuffers (client=0x2600370, pDraw=0x271a840, target_msc=305080, divisor=0, remainder=0, swap_target=0x7fff6780c3d8, func=0x5ea9e6 , data=0x271a840) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/hw/xfree86/dri2/dri2.c:1178 #5 0x00000000005eabe7 in ProcDRI2SwapBuffers (client=0x2600370) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/hw/xfree86/dri2/dri2ext.c:424 #6 0x00000000005eb2c6 in ProcDRI2Dispatch (client=0x2600370) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/hw/xfree86/dri2/dri2ext.c:621 #7 0x00000000004301b8 in Dispatch () at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/dix/dispatch.c:430 #8 0x000000000043f226 in dix_main (argc=9, argv=0x7fff6780c628, envp=0x7fff6780c678) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/dix/main.c:300 #9 0x000000000041fefe in main (argc=9, argv=0x7fff6780c628, envp=0x7fff6780c678) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/dix/stubmain.c:34 (gdb) frame 4 #4 0x00000000005e8bf4 in DRI2SwapBuffers (client=0x2600370, pDraw=0x271a840, target_msc=305080, divisor=0, remainder=0, swap_target=0x7fff6780c3d8, func=0x5ea9e6 , data=0x271a840) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/hw/xfree86/dri2/dri2.c:1178 1178 in /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/hw/xfree86/dri2/dri2.c (gdb) info locals pScreen = 0x1e09d00 ds = 0x1e1aaa0 pPriv = 0x27c5210 pDestBuffer = 0x27c5a50 pSrcBuffer = 0x27c5a00 ret = 0 i = 2 ust = 5104798128 current_msc = 305079 __func__ = "DRI2SwapBuffers" (gdb) bt #0 0x00007f0209d8abf0 in exit () from /lib64/libc.so.6 #1 0x000000000063baa3 in AbortServer () at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/os/log.c:878 #2 0x000000000063bfb6 in FatalError (f=0x7f0205eaa1a7 "%s:%d assertion '%s' failed\n") at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/os/log.c:1015 #3 0x00007f0205e62f57 in sna_dri2_schedule_swap (client=0x2600370, draw=0x271a840, front=0x27c5a50, back=0x27c5a00, target_msc=0x7fff6780c318, divisor=0, remainder=0, func=0x5ea9e6 , data=0x271a840) at /var/tmp/portage/x11-drivers/xf86-video-intel-2.99.917_p20160621-r1/work/c28e62f94f15c9f5c4fb0744588f08ae18e4a9b5/src/sna/sna_dri2.c:3330 #4 0x00000000005e8bf4 in DRI2SwapBuffers (client=0x2600370, pDraw=0x271a840, target_msc=305080, divisor=0, remainder=0, swap_target=0x7fff6780c3d8, func=0x5ea9e6 , data=0x271a840) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/hw/xfree86/dri2/dri2.c:1178 #5 0x00000000005eabe7 in ProcDRI2SwapBuffers (client=0x2600370) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/hw/xfree86/dri2/dri2ext.c:424 #6 0x00000000005eb2c6 in ProcDRI2Dispatch (client=0x2600370) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/hw/xfree86/dri2/dri2ext.c:621 #7 0x00000000004301b8 in Dispatch () at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/dix/dispatch.c:430 #8 0x000000000043f226 in dix_main (argc=9, argv=0x7fff6780c628, envp=0x7fff6780c678) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/dix/main.c:300 #9 0x000000000041fefe in main (argc=9, argv=0x7fff6780c628, envp=0x7fff6780c678) at /var/tmp/portage/x11-base/xorg-server-1.18.4/work/xorg-server-1.18.4/dix/stubmain.c:34 (gdb) printf "%d\n",pPriv->bufferCount 2 (gdb) printf "%d\n",pPriv->buffers[0]->attachment 1 (gdb) printf "%d\n",pPriv->buffers[1]->attachment 0 (gdb) printf "%p\n",pPriv->buffers[1] 0x27c5a50 (gdb) printf "%p\n",pPriv->buffers[0] 0x27c5a00 (gdb) frame 3 #3 0x00007f0205e62f57 in sna_dri2_schedule_swap (client=0x2600370, draw=0x271a840, front=0x27c5a50, back=0x27c5a00, target_msc=0x7fff6780c318, divisor=0, remainder=0, func=0x5ea9e6 , data=0x271a840) at /var/tmp/portage/x11-drivers/xf86-video-intel-2.99.917_p20160621-r1/work/c28e62f94f15c9f5c4fb0744588f08ae18e4a9b5/src/sna/sna_dri2.c:3330 3330 /var/tmp/portage/x11-drivers/xf86-video-intel-2.99.917_p20160621-r1/work/c28e62f94f15c9f5c4fb0744588f08ae18e4a9b5/src/sna/sna_dri2.c: No such file or directory. (gdb) printf "%p -> %p -> %p\n",front,get_private(front),get_private(front)->bo 0x27c5a50 -> 0x27c5a70 -> 0x27c54e0 (gdb) printf "%p -> %p -> %p\n",back,get_private(back),get_private(back)->bo 0x27c5a00 -> 0x27c5a20 -> 0x27c54e0