Too much data requested from _Xread

Issue #134 invalid
B Tekin
created an issue

I'm trying to use Pyglet to render a 3D object over X11 forwarding, but I get the following error:

[xcb] Too much data requested from _XRead
[xcb] This is most likely caused by a broken X extension library
[xcb] Aborting, sorry about that.
python: ../../src/xcb_io.c:736: _XRead: Assertion `!xcb_xlib_too_much_data_requested' failed.

This might be a hardware issue, but does anybody know a workaround to this problem?

Comments (7)

  1. B Tekin reporter

    python -m pyglet.info returns the following:

    $ python -m pyglet.info
    Python
    ------------------------------------------------------------------------------
    sys.version: 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:09:15)                                                                                           
    [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
    sys.platform: linux2
    sys.maxint: 9223372036854775807
    os.getcwd(): /home/ABC
    
    pyglet
    ------------------------------------------------------------------------------
    pyglet.version: 1.2.4
    pyglet.compat_platform: linux2
    pyglet.__file__: /home/ABC/lib/python2.7/site-packages/pyglet/__init_                                                                                           _.pyc
    pyglet.options['search_local_libs'] = True
    pyglet.options['debug_win32'] = False
    pyglet.options['xlib_fullscreen_override_redirect'] = False
    pyglet.options['debug_trace_args'] = False
    pyglet.options['font'] = ('gdiplus', 'win32')
    pyglet.options['debug_gl_trace_args'] = False
    pyglet.options['debug_trace'] = False
    pyglet.options['debug_gl_trace'] = False
    pyglet.options['debug_x11'] = False
    pyglet.options['debug_media'] = False
    pyglet.options['debug_trace_depth'] = 1
    pyglet.options['vsync'] = None
    pyglet.options['debug_gl'] = True
    pyglet.options['darwin_cocoa'] = False
    pyglet.options['debug_trace_flush'] = True
    pyglet.options['shadow_window'] = True
    pyglet.options['xsync'] = True
    pyglet.options['debug_font'] = False
    pyglet.options['graphics_vbo'] = True
    pyglet.options['debug_lib'] = False
    pyglet.options['debug_graphics_batch'] = False
    pyglet.options['audio'] = ('directsound', 'pulse', 'openal', 'silent')
    pyglet.options['debug_texture'] = False
    
    pyglet.window
    ------------------------------------------------------------------------------
    platform: <pyglet.window.Platform object at 0x7f23081d8110>
    display: <pyglet.canvas.xlib.XlibDisplay object at 0x7f23031b6750>
    screens[0]: XlibScreen(display=<pyglet.canvas.xlib.XlibDisplay object at 0x7f230                                                                                           31b6750>, x=0, y=0, width=3360, height=1050, xinerama=0)
    config['double_buffer'] = 1
    config['stereo'] = 0
    config['buffer_size'] = 24
    config['aux_buffers'] = 0
    config['sample_buffers'] = 0
    config['samples'] = 0
    config['red_size'] = 8
    config['green_size'] = 8
    config['blue_size'] = 8
    config['alpha_size'] = 0
    config['depth_size'] = 24
    config['stencil_size'] = 0
    config['accum_red_size'] = 0
    config['accum_green_size'] = 0
    config['accum_blue_size'] = 0
    config['accum_alpha_size'] = 0
    config['major_version'] = None
    config['minor_version'] = None
    config['forward_compatible'] = None
    config['debug'] = None
    context: XlibContext10()
    
    window.context._info
    ------------------------------------------------------------------------------
    gl_info.get_version(): 1.2 (4.5.0 NVIDIA 361.91)
    gl_info.get_vendor(): NVIDIA Corporation
    gl_info.get_renderer(): Quadro 600/PCIe/SSE2
    gl_info.get_extensions():
       GL_ARB_depth_texture
       GL_ARB_imaging
       GL_ARB_multitexture
       GL_ARB_point_parameters
       GL_ARB_point_sprite
       GL_ARB_shadow
       GL_ARB_texture_border_clamp
       GL_ARB_texture_cube_map
       GL_ARB_texture_env_add
       GL_ARB_texture_env_combine
       GL_ARB_texture_env_crossbar
       GL_ARB_texture_env_dot3
       GL_ARB_texture_mirrored_repeat
       GL_ARB_transpose_matrix
       GL_ARB_window_pos
       GL_ATI_texture_mirror_once
       GL_EXT_abgr
       GL_EXT_bgra
       GL_EXT_blend_color
       GL_EXT_blend_func_separate
       GL_EXT_blend_minmax
       GL_EXT_blend_subtract
       GL_EXT_draw_range_elements
       GL_EXT_fog_coord
       GL_EXT_multi_draw_arrays
       GL_EXT_packed_pixels
       GL_EXT_rescale_normal
       GL_EXT_secondary_color
       GL_EXT_separate_specular_color
       GL_EXT_shadow_funcs
       GL_EXT_stencil_two_side
       GL_EXT_stencil_wrap
       GL_EXT_texture3D
       GL_EXT_texture_edge_clamp
       GL_EXT_texture_env_add
       GL_EXT_texture_env_combine
       GL_EXT_texture_env_dot3
       GL_EXT_texture_lod
       GL_EXT_texture_lod_bias
       GL_EXT_texture_object
       GL_EXT_vertex_array
       GL_IBM_texture_mirrored_repeat
       GL_NV_blend_square
       GL_NV_point_sprite
       GL_NV_texgen_reflection
       GL_NV_texture_rectangle
       GL_SGIS_generate_mipmap
       GL_SGIS_texture_lod
       GL_SGIX_depth_texture
       GL_SGIX_shadow
    
    pyglet.gl.glu_info
    ------------------------------------------------------------------------------
    glu_info.get_version(): 1.3
    glu_info.get_extensions():
       GLU_EXT_nurbs_tessellator
       GLU_EXT_object_space_tess
    
    pyglet.gl.glx_info
    ------------------------------------------------------------------------------
    context.is_direct(): 0
    glx_info.get_server_vendor(): SGI
    glx_info.get_server_version(): 1.2
    glx_info.get_server_extensions():
       GLX_ARB_multisample
       GLX_EXT_visual_info
       GLX_EXT_visual_rating
       GLX_EXT_import_context
       GLX_OML_swap_method
       GLX_SGI_make_current_read
       GLX_SGIS_multisample
       GLX_SGIX_hyperpipe
       GLX_SGIX_swap_barrier
       GLX_SGIX_fbconfig
    glx_info.get_client_vendor(): NVIDIA Corporation
    glx_info.get_client_version(): 1.4
    glx_info.get_client_extensions():
       GLX_ARB_get_proc_address
       GLX_ARB_multisample
       GLX_EXT_visual_info
       GLX_EXT_visual_rating
       GLX_EXT_import_context
       GLX_SGI_video_sync
       GLX_NV_swap_group
       GLX_NV_video_out
       GLX_SGIX_fbconfig
       GLX_SGIX_pbuffer
       GLX_SGI_swap_control
       GLX_EXT_swap_control
       GLX_EXT_swap_control_tear
       GLX_EXT_buffer_age
       GLX_ARB_create_context
       GLX_ARB_create_context_profile
       GLX_NV_float_buffer
       GLX_ARB_fbconfig_float
       GLX_EXT_fbconfig_packed_float
       GLX_EXT_texture_from_pixmap
       GLX_EXT_framebuffer_sRGB
       GLX_NV_present_video
       GLX_NV_copy_image
       GLX_NV_copy_buffer
       GLX_NV_multisample_coverage
       GLX_NV_video_capture
       GLX_EXT_create_context_es_profile
       GLX_EXT_create_context_es2_profile
       GLX_ARB_create_context_robustness
       GLX_NV_delay_before_swap
       GLX_EXT_stereo_tree
       GLX_ARB_context_flush_control
       GLX_NV_robustness_video_memory_purge
    glx_info.get_extensions():
       GLX_ARB_multisample
       GLX_EXT_visual_info
       GLX_EXT_visual_rating
       GLX_EXT_import_context
       GLX_SGIX_fbconfig
       GLX_ARB_get_proc_address
    
    pyglet.media
    ------------------------------------------------------------------------------
    audio driver: <pyglet.media.drivers.silent.SilentAudioDriver object at 0x7f23009                                                                                           7c4d0>
    
    pyglet.media.avbin
    ------------------------------------------------------------------------------
    AVbin not available.
    
    pyglet.media.drivers.openal
    ------------------------------------------------------------------------------
    OpenAL not available.
    
    pyglet.input.wintab
    ------------------------------------------------------------------------------
    WinTab not available.
    
  2. Benjamin Moran

    Hi @B Tekin,

    This error is being returned directly by xlib, and unfortunately it's not clear what the cause is. Your card (Quadro 600) seems to be perfectly adequate, but forwarding OpenGL over SSH can be finicky. Does it work with simple OpenGL applications, like glxgears, and more complex applications?

    Also, is your remote system really Red Hat 4.4.7?

  3. B Tekin reporter

    Glxgears display works but it does not report the fps values:

    glxgears.png

    And with glmark2 it gives a segmentation fault.

    gcc version is 4.7.7 and lsb_release -a returns the following for the remote system:

    Distributor ID: Ubuntu
    Description:    Ubuntu 16.04.2 LTS
    Release:        16.04
    Codename:       xenial
    

    Furthermore, glxinfo returns the following:

    name of display: localhost:10.0
    display: localhost:10  screen: 0
    direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
    server glx vendor string: SGI
    server glx version string: 1.2
    server glx extensions:
        GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info,
        GLX_EXT_visual_rating, GLX_OML_swap_method, GLX_SGIS_multisample,
        GLX_SGIX_fbconfig, GLX_SGIX_hyperpipe, GLX_SGIX_swap_barrier,
        GLX_SGI_make_current_read
    client glx vendor string: NVIDIA Corporation
    client glx version string: 1.4
    client glx extensions:
        GLX_ARB_context_flush_control, GLX_ARB_create_context,
        GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness,
        GLX_ARB_fbconfig_float, GLX_ARB_get_proc_address, GLX_ARB_multisample,
        GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile,
        GLX_EXT_create_context_es_profile, GLX_EXT_fbconfig_packed_float,
        GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, GLX_EXT_stereo_tree,
        GLX_EXT_swap_control, GLX_EXT_swap_control_tear,
        GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating,
        GLX_NV_copy_buffer, GLX_NV_copy_image, GLX_NV_delay_before_swap,
        GLX_NV_float_buffer, GLX_NV_multisample_coverage, GLX_NV_present_video,
        GLX_NV_robustness_video_memory_purge, GLX_NV_swap_group,
        GLX_NV_video_capture, GLX_NV_video_out, GLX_SGIX_fbconfig,
        GLX_SGIX_pbuffer, GLX_SGI_swap_control, GLX_SGI_video_sync
    GLX version: 1.2
    GLX extensions:
        GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,
        GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_SGIX_fbconfig
    OpenGL vendor string: NVIDIA Corporation
    OpenGL renderer string: Quadro 600/PCIe/SSE2
    OpenGL version string: 1.2 (4.5.0 NVIDIA 361.91)
    OpenGL extensions:
        GL_ARB_depth_texture, GL_ARB_imaging, GL_ARB_multitexture,
        GL_ARB_point_parameters, GL_ARB_point_sprite, GL_ARB_shadow,
        GL_ARB_texture_border_clamp, GL_ARB_texture_cube_map,
        GL_ARB_texture_env_add, GL_ARB_texture_env_combine,
        GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,
        GL_ARB_texture_mirrored_repeat, GL_ARB_transpose_matrix,
        GL_ARB_window_pos, GL_ATI_texture_mirror_once, GL_EXT_abgr, GL_EXT_bgra,
        GL_EXT_blend_color, GL_EXT_blend_func_separate, GL_EXT_blend_minmax,
        GL_EXT_blend_subtract, GL_EXT_draw_range_elements, GL_EXT_fog_coord,
        GL_EXT_multi_draw_arrays, GL_EXT_packed_pixels, GL_EXT_rescale_normal,
        GL_EXT_secondary_color, GL_EXT_separate_specular_color,
        GL_EXT_shadow_funcs, GL_EXT_stencil_two_side, GL_EXT_stencil_wrap,
        GL_EXT_texture3D, GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,
        GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, GL_EXT_texture_lod,
        GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array,
        GL_IBM_texture_mirrored_repeat, GL_NV_blend_square, GL_NV_point_sprite,
        GL_NV_texgen_reflection, GL_NV_texture_rectangle, GL_SGIS_generate_mipmap,
        GL_SGIS_texture_lod, GL_SGIX_depth_texture, GL_SGIX_shadow
    
  4. Benjamin Moran

    Hi @B Tekin,

    I just noticed you're installing with Anaconda, which explains the old RHEL version. (They build against a really old distro for maximum forward compatibility).

    The direct rendering: No line is telling. I did a quick search, and it seems that the proprietary Nvidia driver only provides direct rendering for local GL applications, and fall back to the software rasterizer for remote applications. This is OK for glxgears, but little else. If this is the case, unfortunately pyglet won't be usable .

    Is using the proprietary graphics driver necessary? It seems like people have better luck with the open source graphics stack and remote X forwarding.

  5. Benjamin Moran

    Hi @B Tekin,

    This is something that we won't be able to fix in pyglet since it's caused by the pequliarities of X forwarding and the hardware drivers.

    I'm curious if this works with the Open Source graphics stack, however, just for the information of other users. I believe it should, but it would be good to know.

    Thanks, -Benjamin

  6. Log in to comment