pigment is a framework for doing openGL based UI and there is a python binding for the pigment library as well. I'm using pigment-python to load a picture into a gdk pixbuf and then show it on screen in a opengl viewport. When I do this in EXA using ubuntu package versions the xserver SEGVs, when I do it in in UXA using ubuntu package versions then I get a python SEGV instead but the python SEGV stack happens deep inside the miptree code in i965_dri.so so I think it's an intel mesa bug. I've managed to reduce my python app down to a minimal testcase which can be used to repro this bug (see attchments). In all comments and attachments below, I will be using post-ubuntu bits like .29 kernel and intel+libdrm from git but still mesa7.4. REPRO STEPS: On intel G45, download the testcase.tgz extract it and run "python main.py"
Here is the testcase: http://temp.minimum.se/pigment-python_testcase.tgz
There is lots of useful info regarding this bug available in the downstream bug report: https://bugs.launchpad.net/ubuntu/+bug/355137
Created attachment 24547 [details] dmesg (UXA_kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402)
Created attachment 24548 [details] gpu regs (UXA_kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402)
Created attachment 24549 [details] gem_objects (UXA_kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402)
Created attachment 24550 [details] gem_interrupts (UXA_kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402)
Created attachment 24551 [details] exact package versions (UXA_kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402)
Created attachment 24552 [details] xorg conf (UXA_kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402)
Created attachment 24553 [details] xorg.log.old (UXA_kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402)
Created attachment 24554 [details] xorg.log (UXA_kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402)
Created attachment 24555 [details] xsession-errors (UXA_kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402)
Here is the stacktrace I'm seeing inside python2.6 when running the testcase in UXA with the above config i.e. kernel2.6.29_libdrm2.4.6git20090403_ubuntumesa7.4_intelDDX2.6.99.1git20090402 Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f47f5a50950 (LWP 7855)] *__GI___libc_free (mem=0x13d51) at malloc.c:3599 3599 malloc.c: No such file or directory. in malloc.c (gdb) bt #0 *__GI___libc_free (mem=0x13d51) at malloc.c:3599 #1 0x00007f47f4df449d in intel_miptree_set_level_info () from /usr/lib/dri/i965_dri.so #2 0x00007f47f4e0df5c in i945_miptree_layout_2d () from /usr/lib/dri/i965_dri.so #3 0x00007f47f4e22a0d in brw_miptree_layout () from /usr/lib/dri/i965_dri.so #4 0x00007f47f4df46e2 in ?? () from /usr/lib/dri/i965_dri.so #5 0x00007f47f4df4810 in intel_miptree_create () from /usr/lib/dri/i965_dri.so #6 0x00007f47f4e0d8e5 in ?? () from /usr/lib/dri/i965_dri.so #7 0x00007f47f4e0dd3d in intelTexImage2D () from /usr/lib/dri/i965_dri.so #8 0x00007f47f4ea8e4a in _mesa_TexImage2D () from /usr/lib/dri/i965_dri.so #9 0x00007f47f62f974e in do_rgb_create (texture=0x2726130) at pgmtexture.c:141 #10 0x00007f47f62fa7bd in flush_task_queue (context=0x27b8000, queue=<value optimized out>) at pgmcontext.c:1083 #11 0x00007f47f62fca98 in immediate_io_cb (source=<value optimized out>, condition=<value optimized out>, data=0x27b8000) at pgmcontext.c:1104 #12 0x00007f48024880ca in IA__g_main_context_dispatch (context=0x2318800) at /build/buildd/glib2.0-2.20.0/glib/gmain.c:1814 #13 0x00007f480248b7a0 in g_main_context_iterate (context=0x2318800, block=1, dispatch=1, self=<value optimized out>) at /build/buildd/glib2.0-2.20.0/glib/gmain.c:2448 #14 0x00007f480248bc6d in IA__g_main_loop_run (loop=0x27b6fe0) at /build/buildd/glib2.0-2.20.0/glib/gmain.c:2656 #15 0x00007f47f62fc32c in render_loop (data=<value optimized out>) at pgmcontext.c:1421 #16 0x00007f48024b1954 in g_thread_create_proxy (data=0x2318ac0) at /build/buildd/glib2.0-2.20.0/glib/gthread.c:635 #17 0x00007f4804a363ba in start_thread (arg=<value optimized out>) at pthread_create.c:297 #18 0x00007f4803efefcd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112 #19 0x0000000000000000 in ?? ()
Created attachment 24556 [details] xserver "bt full" for the SEGV that's triggered in EXA I will now attach similar logs recorded with the exact same package versions but in EXA (in this case the xserver hits a SEGV). First off, here is the backtrace from the xserver: Program received signal SIGSEGV, Segmentation fault. *__GI___libc_free (mem=0x21) at malloc.c:3599 3599 malloc.c: No such file or directory. in malloc.c #0 *__GI___libc_free (mem=0x21) at malloc.c:3599 #1 0x00007fa79270449d in intel_miptree_set_level_info () from /usr/lib/dri/i965_dri.so #2 0x00007fa79271df5c in i945_miptree_layout_2d () from /usr/lib/dri/i965_dri.so #3 0x00007fa792732a0d in brw_miptree_layout () from /usr/lib/dri/i965_dri.so #4 0x00007fa7927046e2 in ?? () from /usr/lib/dri/i965_dri.so #5 0x00007fa792704810 in intel_miptree_create () from /usr/lib/dri/i965_dri.so #6 0x00007fa79271d8e5 in ?? () from /usr/lib/dri/i965_dri.so #7 0x00007fa79271dd3d in intelTexImage2D () from /usr/lib/dri/i965_dri.so #8 0x00007fa7927b8e4a in _mesa_TexImage2D () from /usr/lib/dri/i965_dri.so #9 0x00007fa7a416c07a in __glXDisp_TexImage2D (pc=0x7fa78b83c018 "") at ../../glx/indirect_dispatch.c:1153 #10 0x00007fa7a418efbd in __glXDisp_RenderLarge (cl=0x681ffa0, pc=0x736a8f0 "") at ../../glx/glxcmds.c:1984 #11 0x00007fa7a4192de2 in __glXDispatch (client=0x6938c40) at ../../glx/glxext.c:523 #12 0x000000000044e304 in Dispatch () at ../../dix/dispatch.c:437 #13 0x0000000000433d8d in main (argc=10, argv=0x7fffaf948b08, envp=<value optimized out>) at ../../dix/main.c:397
Created attachment 24557 [details] dmesg (EXA)
Created attachment 24558 [details] gpu regs (EXA)
Created attachment 24559 [details] gem_objects (EXA)
Created attachment 24560 [details] gem_interrupts (EXA)
Created attachment 24561 [details] xorg conf (EXA)
Created attachment 24562 [details] xorg.log.old (EXA)
Created attachment 24563 [details] xorg.log (EXA)
Created attachment 24564 [details] xsession-errors (EXA)
The most interesting part in all the EXA logs (imo), is the following line from the bottom of xorg.log: (EE) DoSwapInterval: cx = 0x6905be0, GLX screen = 0x39ff080
On top of the versions I used for EXA testing, if I installing mesa git HEAD as of April 4th 2009, this is what I see: for UXA, the scenario is fixed (image now loads and renders fine) for EXA, the xserver does not SEGV anymore but the app is extremely buggy, hogging CPU, runs in all constant "grayed out unresponsive" state, shows many rendering defects etc (even when minimized it keeps blurbing stuff to the screen).
Reported fixed with DRI2 at this point, so closing.
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.