Bug 42540 - glxgears segfaults on POWER / Xvnc
Summary: glxgears segfaults on POWER / Xvnc
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/llvmpipe (show other bugs)
Version: 7.11
Hardware: PowerPC Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-02 20:59 UTC by hugh.m.bright
Modified: 2019-09-18 18:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description hugh.m.bright 2011-11-02 20:59:58 UTC
to reproduce:



EXPORT display=:5
Xvnc :5 -screen 0 800x600x24 &
glxgears
Segmentation fault



gdb glxgears



...
Program received signal SIGSEGV, Segmentation fault.
0x7c0802a6f8010010 in ?? ()
(gdb) bt
#0  0x7c0802a6f8010010 in ?? ()
#1  0x00000fffb7cd1454 in ?? () from /usr/lib64/dri/swrast_dri.so
#2  0x00000fffb7cd1588 in ?? () from /usr/lib64/dri/swrast_dri.so
#3  0x00000fffb7c61d58 in ?? () from /usr/lib64/dri/swrast_dri.so
#4  0x00000fffb7c5cc2c in ?? () from /usr/lib64/dri/swrast_dri.so
#5  0x00000fffb7c5d098 in ?? () from /usr/lib64/dri/swrast_dri.so
#6  0x00000fffb7a6968c in ?? () from /usr/lib64/dri/swrast_dri.so
#7  0x00000fffb7b39428 in ?? () from /usr/lib64/dri/swrast_dri.so
#8  0x00000fffb7c15b08 in ?? () from /usr/lib64/dri/swrast_dri.so
#9  0x00000fffb7a8f930 in ?? () from /usr/lib64/dri/swrast_dri.so
#10 0x00000fffb7a94024 in ?? () from /usr/lib64/dri/swrast_dri.so
#11 0x000000806c10e998 in .glCallList () from /usr/lib64/libGL.so.1
#12 0x0000000010002b54 in ?? ()
#13 0x000000001000201c in ?? ()
#14 0x000000806b3e1fa8 in .generic_start_main.isra.0 () from /lib64/libc.so.6
#15 0x000000806b3e219c in .__libc_start_main () from /lib64/libc.so.6
#16 0x0000000000000000 in ?? ()



glxinfo



name of display: :5
display: :5  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB, 
    GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap, 
    GLX_INTEL_swap_event
GLX version: 1.4
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_MESA_multithread_makecurrent, GLX_OML_swap_method, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_INTEL_swap_event
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe
OpenGL version string: 2.1 Mesa 7.11
OpenGL shading language version string: 1.20
...


uname -a

Linux gcc1-power7.osuosl.org 3.1.0-0.rc9.git0.2.fc16.kh.ppc64 #1 SMP Wed Oct 12 22:41:01 UTC 2011 ppc64 ppc64 ppc64 GNU/Linux

cat /etc/issue

Fedora release 16 (Verne)


another opengl program segfaults like so:


#0  0x7c0802a6f8010010 in ?? ()
#1  0x00000fffb1121454 in ?? () from /usr/lib64/dri/swrast_dri.so
#2  0x00000fffb1121588 in ?? () from /usr/lib64/dri/swrast_dri.so
#3  0x00000fffb10b1d58 in ?? () from /usr/lib64/dri/swrast_dri.so
#4  0x00000fffb10acc2c in ?? () from /usr/lib64/dri/swrast_dri.so
#5  0x00000fffb10ad098 in ?? () from /usr/lib64/dri/swrast_dri.so
#6  0x00000fffb0eb968c in ?? () from /usr/lib64/dri/swrast_dri.so
#7  0x00000fffb0f89428 in ?? () from /usr/lib64/dri/swrast_dri.so
#8  0x00000fffb0f85910 in ?? () from /usr/lib64/dri/swrast_dri.so
#9  0x00000fffb0f7ce70 in ?? () from /usr/lib64/dri/swrast_dri.so
#10 0x00000fffb0f82fd8 in ?? () from /usr/lib64/dri/swrast_dri.so
#11 0x00000fffb0f14a44 in ?? () from /usr/lib64/dri/swrast_dri.so
#12 0x000000806c1186f0 in .glPopMatrix () from /usr/lib64/libGL.so.1
. . . 


Another GL program segfaults with a similar pattern.


Thank you for any help you can provide.
Comment 1 Jose Fonseca 2011-11-02 23:46:35 UTC
llvmpipe hasn't received much testing or any attention on POWERPC.  I'm not even sure how robust is LLVM support for POWERPC.


Does it work any better on regular X, as opposed to Xvnc?

If you do

    export GALLIUM_DRIVER=softpipe
    export DRAW_USE_LLVM=no

then does it work.

Also, please install the debugging symbols so that we can have a stack trace with symbols.
Comment 2 hugh.m.bright 2011-11-04 12:53:06 UTC
José Fonseca 

Thanks very much for your help. 

I dont know if "real X" works; I dont have root access. I asked the admin to install a few debug libraries. Here is the result:

#0  0x7c0802a6f8010010 in ?? ()
#1  0x00000fffb7cd1454 in llvm_pipeline_generic (middle=0x100a3840, 
    fetch_info=0xfffffffe098, prim_info=0xfffffffe068)
    at draw/draw_pt_fetch_shade_pipeline_llvm.c:246
#2  0x00000fffb7cd1588 in llvm_middle_end_linear_run (middle=<optimized out>, 
    start=<optimized out>, count=value has been optimized out
)
    at draw/draw_pt_fetch_shade_pipeline_llvm.c:364
#3  0x00000fffb7c61d58 in vsplit_segment_simple_linear (icount=82, istart=0, 
    flags=0, vsplit=0x100a09f0) at draw/draw_pt_vsplit_tmp.h:237
#4  vsplit_run_linear (frontend=0x100a09f0, start=<optimized out>, count=82)
    at draw/draw_split_tmp.h:61
#5  0x00000fffb7c5cc2c in draw_pt_arrays (draw=<optimized out>, 
    prim=<optimized out>, start=<optimized out>, count=82)
    at draw/draw_pt.c:113
#6  0x00000fffb7c5d098 in draw_vbo (draw=0x100980d0, info=0xfffffffe3e4)
    at draw/draw_pt.c:491
#7  0x00000fffb7a6968c in llvmpipe_draw_vbo (pipe=0x100534e0, 
    info=0xfffffffe3e4) at lp_draw_arrays.c:81
#8  0x00000fffb7b39428 in st_draw_vbo (ctx=0x100f9690, arrays=<optimized out>, 
    prims=<optimized out>, nr_prims=<optimized out>, ib=<optimized out>, 
    index_bounds_valid=<optimized out>, min_index=0, max_index=161)
    at state_tracker/st_draw.c:763
#9  0x00000fffb7c15b08 in vbo_save_playback_vertex_list (ctx=0x100f9690, 
    data=0x10152908) at vbo/vbo_save_draw.c:293
#10 0x00000fffb7a8f930 in ext_opcode_execute (node=0x10152900, ctx=0x100f9690)
    at main/dlist.c:592
#11 execute_list (ctx=0x100f9690, list=<optimized out>) at main/dlist.c:7464
#12 0x00000fffb7a94024 in _mesa_CallList (list=<optimized out>)
    at main/dlist.c:8873
#13 0x00000080b2d7e998 in glCallList (list=<optimized out>)
    at ../../../src/mapi/glapi/glapitemp.h:97
#14 0x0000000010002b54 in draw () at glxgears.c:263
#15 0x000000001000201c in draw_gears () at glxgears.c:315
#16 draw_frame (win=<optimized out>, dpy=<optimized out>) at glxgears.c:340
#17 event_loop (win=2097154, dpy=0x10030010) at glxgears.c:696
#18 main (argc=<optimized out>, argv=<optimized out>) at glxgears.c:776

On your other question:

export GALLIUM_DRIVER=softpipe
export DRAW_USE_LLVM=no

this makes it work OK with Xvnc. Thank you!
Comment 3 Ben Crocker 2018-01-27 23:09:42 UTC
This is (or was) a bug in the LLVM pipe; it has nothing to do, per se,
with Xvnc.  The stack trace indicates a call to the runtime-compiled
vertex shader program.

A lot of development has gone into both Mesa and LLVM since 2011;
Mesa is up to version 17.3.4 (and work is underway on 18.0), while
LLVM is up to version 5.0.1.

I have not seen a crash in glxgears since the beginning of my tenure
at Red Hat.  While there was a period in late 2016 to mid-2017 when
glxgears geometry was broken on big-endian platforms, that problem was
fixed in Mesa 17.2.1 ca. September 2017.

If at all possible, could you retest with the newest Mesa and LLVM,
so we can close this as RESOLVED?

  Thanks!
  Ben
Comment 4 GitLab Migration User 2019-09-18 18:31:09 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/223.


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.