NetBSD Problem Report #55093

From www@netbsd.org  Sat Mar 21 09:49:56 2020
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AC3121A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 21 Mar 2020 09:49:56 +0000 (UTC)
Message-Id: <20200321094955.A28021A9228@mollari.NetBSD.org>
Date: Sat, 21 Mar 2020 09:49:55 +0000 (UTC)
From: stackfield0trpg@gmail.com
Reply-To: stackfield0trpg@gmail.com
To: gnats-bugs@NetBSD.org
Subject: glxinfo crashed on MesaLib 20.0.2 on moduler X in NetBSD-current/i386.
X-Send-Pr-Version: www-1.0

>Number:         55093
>Category:       pkg
>Synopsis:       glxinfo crashed on MesaLib 20.0.2 on moduler X in NetBSD-current/i386.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    tnn
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 21 09:50:00 +0000 2020
>Last-Modified:  Sat Mar 21 20:10:01 +0000 2020
>Originator:     stackfield
>Release:        NetBSD-current and pkgsrc-current
>Organization:
>Environment:
NetBSD 9.99.50 (MYKERNEL) #6: Sat Mar 21 13:31:25 JST 2020  root@rainsbase:/usr/obj/home/src/sys/arch/i386/compile/MYKERNEL i386
>Description:
glxinfo crashes on MesaLib 20.0.2 on moduler X in NetBSD-current/i386.

I was running modular x with nvidia GT730 card in NetBSD-current,
After updated MesaLib from 19.2.7 to 20.0.2, was running glxinfo in xterm,
was saw out to below messages at terminal.

--------------------------------------------------------------------------- 
name of display: :0.0
Warning: GL error 0x502 at line 501
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_no_error, 
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_multisample, 
    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_libglvnd, GLX_EXT_no_config_context, 
    GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_OML_swap_method, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_context_flush_control, GLX_ARB_create_context, 
    GLX_ARB_create_context_no_error, GLX_ARB_create_context_profile, 
    GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, 
    GLX_ARB_framebuffer_sRGB, 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_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
GLX version: 1.4
GLX extensions:
    GLX_ARB_create_context, GLX_ARB_create_context_no_error, 
    GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, 
    GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, 
    GLX_ARB_get_proc_address, GLX_ARB_multisample, 
    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_texture_from_pixmap, GLX_EXT_visual_info, 
    GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_OML_swap_method, 
    GLX_OML_sync_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: nouveau (0x10de)
    Device: NV106 (0x1287)
    Version: 20.0.2
    Accelerated: yes
    Video memory: 1013MB
    Unified memory: no
    Preferred profile: core (0x1)
    Max core profile version: 4.3
    Max compat profile version: 4.3
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.2
Segmentation fault (core dumped)
--------------------------------------------------------------------------- 

>How-To-Repeat:

>Fix:
1. delete patches/patch-src_mapi_entry__x86__tls.
2. make mps.
3. make replace
4. work for me :)

I think that a matter of mentioned by this patch was cleared because of which
STUB_ASM_CODE and x86_current_tls macros on src/mapi/entry_x86_tls.h 
were rewrited when Mesa 19.3 was appeared. maybe. please to check it.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->tnn
Responsible-Changed-By: tnn@NetBSD.org
Responsible-Changed-When: Sat, 21 Mar 2020 10:31:07 +0000
Responsible-Changed-Why:
I will check. Deleting the patch will almost certainly cause other problems.


From: Tobias Nygren <tnn@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/55093 (glxinfo crashed on MesaLib 20.0.2 on moduler X in
 NetBSD-current/i386.)
Date: Sat, 21 Mar 2020 21:06:16 +0100

 This problem due not occur under all configurations. For example it
 does not happen with modesetting on i915 or radeon. It can be triggered
 on those by setting environment variables:

 GALLIUM_DRIVER=llvmpipe LIBGL_ALWAYS_SOFTWARE=true

 This is also true for x86_64. What happens then is that glGetString()
 doesn't get resolved to any implementation and glxinfo crashes.

 There is only one call to u_current_set_table and we do return the same
 table pointer at the time when glGetString() gets called so I don't
 think the problem is in the patch. There may be code on in some of the
 backends that make false assumptions about the startup value of TLS
 variables. Need to compare with pkgsrc on Linux.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.