NetBSD Problem Report #55050

From dholland@macaran.eecs.harvard.edu  Thu Mar  5 20:57:16 2020
Return-Path: <dholland@macaran.eecs.harvard.edu>
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 C0B1F1A9217
	for <gnats-bugs@gnats.NetBSD.org>; Thu,  5 Mar 2020 20:57:16 +0000 (UTC)
Message-Id: <20200305193947.B14766E2DC@macaran.eecs.harvard.edu>
Date: Thu,  5 Mar 2020 14:39:47 -0500 (EST)
From: dholland@eecs.harvard.edu
Reply-To: dholland@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: opengl segfaulting after updating to 9.99.42
X-Send-Pr-Version: 3.95

>Number:         55050
>Category:       xsrc
>Synopsis:       opengl segfaulting after updating to 9.99.42
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 05 21:00:00 +0000 2020
>Last-Modified:  Thu Mar 12 08:10:01 +0000 2020
>Originator:     David Holland
>Release:        NetBSD 9.99.42 (20200207)
>Organization:
>Environment:
System: NetBSD macaran 9.99.42 NetBSD 9.99.42 (MACARAN) #58: Fri Feb 7 22:38:20 EST 2020 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
Architecture: x86_64
Machine: amd64

% ldd /usr/pkg/bin/seamonkey 
/usr/pkg/bin/seamonkey:
        -lpthread.1 => /usr/lib/libpthread.so.1
        -lc.12 => /usr/lib/libc.so.12
        -lstdc++.9 => /usr/lib/libstdc++.so.9
        -lm.0 => /usr/lib/libm.so.0
        -lgcc_s.1 => /usr/lib/libgcc_s.so.1

That doesn't look very complete but I'm not sure where to find the rest...

The packages it depends on:

gtk2+>=2.24.32nb10		gtk2+-2.24.32nb11
libffi>=3.0.11			libffi-3.2.1nb4
cairo>=1.16.0			cairo-1.16.0
gtk3+>=3.24.8nb2		gtk3+-3.24.13
nspr>=4.12			nspr-4.24
icu>=64.1			icu-64.2nb2
nss>=3.43nb2			nss-3.48
jpeg>=9				jpeg-9cnb1
libvpx>=1.6.1			libvpx-1.8.1nb1
libIDL>=0.8.14nb4		libIDL-0.8.14nb4
hunspell>=1.7.0			hunspell-1.7.0nb1
ffmpeg3>=3.4.5nb2		ffmpeg3-3.4.6nb3

>Description:

I updated from current of 20191114 (or thereabouts) to 20200207 (or
thereabouts) and seamonkey started dumping core on startup. This turns
out to be in drm stuff:

#0  0x000078f35c1051b0 in ?? ()
#1  0x000078f357eef3b0 in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#2  0x000078f357eef873 in loader_get_driver_for_fd ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#3  0x000078f357eeeecd in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#4  0x000078f357eeefea in pipe_loader_drm_probe_fd ()
   from /usr/X11R7/lib/modules/dri/r600_dri.so
#5  0x000078f357790c94 in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#6  0x000078f35779abf5 in ?? () from /usr/X11R7/lib/modules/dri/r600_dri.so
#7  0x000078f35e83f209 in ?? () from /usr/X11R7/lib/libGL.so
#8  0x000078f35e82613c in __glXInitialize () from /usr/X11R7/lib/libGL.so
#9  0x000078f35e8280e5 in ?? () from /usr/X11R7/lib/libGL.so
#10 0x000078f35e8284fe in glXQueryServerString () from /usr/X11R7/lib/libGL.so
#11 0x000078f36fa5e61e in epoxy_glx_version ()
   from /usr/X11R7/lib/libepoxy.so.0
#12 0x000078f37565d5c3 in gdk_x11_screen_init_gl ()
   from /usr/pkg/lib/libgdk-3.so.0
#13 0x000078f37565d994 in _gdk_x11_screen_update_visuals_for_gl ()
   from /usr/pkg/lib/libgdk-3.so.0
#14 0x000078f375665a9e in _gdk_x11_screen_init_visuals ()
   from /usr/pkg/lib/libgdk-3.so.0
#15 0x000078f3756630ac in _gdk_x11_screen_new ()
   from /usr/pkg/lib/libgdk-3.so.0
#16 0x000078f37565408a in _gdk_x11_display_open ()
   from /usr/pkg/lib/libgdk-3.so.0
#17 0x000078f37562b048 in gdk_display_manager_open_display ()
   from /usr/pkg/lib/libgdk-3.so.0
#18 0x000078f368d3cf99 in ?? () from /usr/pkg/lib/seamonkey/libxul.so
#19 0x000078f368d40771 in ?? () from /usr/pkg/lib/seamonkey/libxul.so
#20 0x000078f368d40a8d in XRE_main () from /usr/pkg/lib/seamonkey/libxul.so
#21 0x000000015580573f in _start ()

mpv (from the same package rebuild run) manages to go through
__glXInitialize without dying. So does gource. At least mpv goes
through loader_get_driver_for_fd too. I don't know what's different
about these.

dosbox is linked to libGL but does not seem to go through
__glXinitialize by default.

The only other pkgsrc thing I have on this machine that's linked to
libGL is tyrquake, and it seems to be having other probably unrelated
problems.

Note that the update spans the gcc 7 -> 8 change for amd64 so that
might be partly implicated, or it might not.

Either way unless we can ascertain this is something current-only it
is presumptively a binary compat problem for -10.

>How-To-Repeat:

% seamonkey
Segmentation fault
% 

>Fix:

>Audit-Trail:
From: Thomas Klausner <tk@giga.or.at>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: xsrc/55050: opengl segfaulting after updating to 9.99.42
Date: Thu, 5 Mar 2020 23:40:58 +0100

 On Thu, Mar 05, 2020 at 09:00:00PM +0000, dholland@eecs.harvard.edu wrote:
 > >Release:        NetBSD 9.99.42 (20200207)

 20200207 should be something newer than .42:

 revision 1.649
 date: 2020-02-07 14:37:20 +0100;  author: thorpej;  state: Exp;  lines: +2 -2;  commitid: 7EGqboneJIghkKVB;
 NetBSD 9.99.46 - percpu_foreach_xcall().

 > >Organization:
 > >Environment:
 > System: NetBSD macaran 9.99.42 NetBSD 9.99.42 (MACARAN) #58: Fri Feb 7 22:38:20 EST 2020 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
 > Architecture: x86_64
 > Machine: amd64
 > 

 > % ldd /usr/pkg/bin/seamonkey 
 > /usr/pkg/bin/seamonkey:
 >         -lpthread.1 => /usr/lib/libpthread.so.1
 >         -lc.12 => /usr/lib/libc.so.12
 >         -lstdc++.9 => /usr/lib/libstdc++.so.9
 >         -lm.0 => /usr/lib/libm.so.0
 >         -lgcc_s.1 => /usr/lib/libgcc_s.so.1
 > 
 > That doesn't look very complete but I'm not sure where to find the rest...

 /usr/pkg/lib/seamonkey/seamonkey ?
 /usr/pkg/lib/seamonkey/seamonkey-bin ?

 > I updated from current of 20191114 (or thereabouts) to 20200207 (or
 > thereabouts) and seamonkey started dumping core on startup. This turns
 > out to be in drm stuff:

 There was a change in GL support (I forgot the actual name).
 Try updating to a newer current, there were further changes.
  Thomas

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: xsrc-manager@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
	dholland@NetBSD.org
Subject: Re: xsrc/55050: opengl segfaulting after updating to 9.99.42
Date: Fri, 6 Mar 2020 17:15:34 +0000

 On Thu, Mar 05, 2020 at 10:45:01PM +0000, Thomas Klausner wrote:
  >  On Thu, Mar 05, 2020 at 09:00:00PM +0000, dholland@eecs.harvard.edu wrote:
  >  > >Release:        NetBSD 9.99.42 (20200207)
  >  
  >  20200207 should be something newer than .42:

 Hmm. That's when I built the kernel, usually the right date, but the
 tree seems to have actually been from 20200126. oops.

  >  > % ldd /usr/pkg/bin/seamonkey 
  >  > /usr/pkg/bin/seamonkey:
  >  >         -lpthread.1 => /usr/lib/libpthread.so.1
  >  >         -lc.12 => /usr/lib/libc.so.12
  >  >         -lstdc++.9 => /usr/lib/libstdc++.so.9
  >  >         -lm.0 => /usr/lib/libm.so.0
  >  >         -lgcc_s.1 => /usr/lib/libgcc_s.so.1
  >  > 
  >  > That doesn't look very complete but I'm not sure where to find the rest...
  >  
  >  /usr/pkg/lib/seamonkey/seamonkey ?
  >  /usr/pkg/lib/seamonkey/seamonkey-bin ?

 Those were the same.

  >  > I updated from current of 20191114 (or thereabouts) to 20200207 (or
  >  > thereabouts) and seamonkey started dumping core on startup. This turns
  >  > out to be in drm stuff:
  >  
  >  There was a change in GL support (I forgot the actual name).
  >  Try updating to a newer current, there were further changes.

 Ok... may take a bit before I get a chance...

 -- 
 David A. Holland
 dholland@netbsd.org

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: xsrc/55050: opengl segfaulting after updating to 9.99.42
Date: Thu, 12 Mar 2020 08:05:18 +0000

 On Fri, Mar 06, 2020 at 05:20:01PM +0000, David Holland wrote:
  >  >  > I updated from current of 20191114 (or thereabouts) to 20200207 (or
  >  >  > thereabouts) and seamonkey started dumping core on startup. This turns
  >  >  > out to be in drm stuff:
  >  >  
  >  >  There was a change in GL support (I forgot the actual name).
  >  >  Try updating to a newer current, there were further changes.
  >  
  >  Ok... may take a bit before I get a chance...

 Update:

 (1) It isn't a compat problem, recompiling seamonkey on the system
 from January still resulted in one that segfaults on startup.

 (2) It doesn't happen if it can't open the drm stuff, so using a
 second X server under a separate uid is an (annoying) workaround.

 (3) I updated the machine to 20200310 (yesterday) and it still
 segfaults, though I haven't tried recompiling it again yet.

 -- 
 David A. Holland
 dholland@netbsd.org

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.