NetBSD Problem Report #55730

From www@netbsd.org  Sat Oct 17 17:56:03 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 0C56C1A9250
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 17 Oct 2020 17:56:03 +0000 (UTC)
Message-Id: <20201017175601.D105B1A9251@mollari.NetBSD.org>
Date: Sat, 17 Oct 2020 17:56:02 +0000 (UTC)
From: electrolytes2@protonmail.com
Reply-To: electrolytes2@protonmail.com
To: gnats-bugs@NetBSD.org
Subject: linux-compat fails to run glxgears, lynx, palemoon with gentoo stage3, and palemoon, iceweasel with suse131
X-Send-Pr-Version: www-1.0

>Number:         55730
>Category:       kern
>Synopsis:       linux-compat fails to run glxgears, lynx, palemoon with gentoo stage3, and palemoon, iceweasel with suse131
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 17 18:00:00 +0000 2020
>Last-Modified:  Sun Oct 18 07:48:45 +0000 2020
>Originator:     Electrolytes
>Release:        9.99.74
>Organization:
>Environment:
NetBSD xxx 9.99.74 NetBSD 9.99.74 (CUSTOM) #0: Fri Oct 16 20:00:00 UTC 2020 electrolytes@xxx:/usr/obj/sys/arch/amd64/compile/CUSTOM amd64
>Description:
Some programs do not work under emul-linux using the suse131 packages due to various levels of missing libraries and old library versions (preventing the import of missing libraries)
Main test-case: palemoon linux version

Expected: palemoon launching.
Result: segfault (Assertion failure: !rv (...))

Secondary test-case: iceweasel from debian.

Expected: able to launch iceweasel.
Result: Failure to go past Create Profile Wizard: Profile Creation Failed: Profile couldn't be created. Probably the chosen folder isn't writable.
[Exception... "Component returned failure code [...] (NS_ERROR_FILE_ALREADY_EXISTS) [...]"]
(folder is writable and profile folder does not exist until the program complains. This actually creates the profile directories, but profiles aren't recognized by iceweasel, thus it accept launching the browser).

Another attempt was made with a /emul/linux/ root based on a gentoo stage3 using cloveros binary packages for missing dependencies.
Using that setup,
glxgears segfaults on start, env vars change nothing, ktruss reports no errors, it simply receives SIGSEGV. Lynx starts but fails to connect to anything (ktruss shows err-22 on a readlink, which may be responsible). nano (included with the stage3 tarball) works fine. With all the dependencies installed, palemoon (either from the cloveros repo or as described in "how to repeat the problem") segfaults as glxgears (errors reported by ktruss are: err-38 for readahead and prlimit64).
>How-To-Repeat:
Iceweasel:
wget http://archive.debian.org/debian/pool/main/i/iceweasel/iceweasel_38.8.0esr-1~deb7u1_amd64.deb
tar -xvf iceweasel_38.8.0esr-1~deb7u1_amd64.deb
tar -xvf data.tar.xz
./usr/bin/iceweasel
(required dependencies: libevent-2.0-5_2.0.21-stable-2+deb8u1_amd64.deb libhunspell-1.3.0_1.3.2-4_amd54 libxcb-util0_0.3.8-3_amd64.deb libffi5_3.0.10-3_amd64.deb libstartup-notification0_0.12-4_amd64.deb)

Palemoon:
wget http://linux.palemoon.org/datastore/release/palemoon-28.14.2.linux-x86_64.tar.xz
mkdir palemoon && tar -xvf palemoon-28.14.2.linux-x86_64.tar.xz -C palemoon

stage3-based emul linux root:
cd /emul/linux/
wget https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/20201015T131958Z/stage3-amd64-20201015T131958Z.tar.xz
tar -xvf stage3-amd64-20201015T131958Z.tar.xz --exclude "proc/" --exclude "dev/"

Dependencies:
wget https://cloveros.ga/<category>/<package-name>
with the following list:

media-libs:
alsa-lib-1.2.2-r1.tbz2
mesa-20.1.4.tbz2
libpng-1.6.37.tbz2
fontconfig-2.13.0-r4.tbz2
harfbuzz-2.6.7.tbz2
freetype-2.10.2-r1.tbz2

media-gfx:
graphite2-1.3.14.tbz2

dev-libs:
wayland-1.18.0.tbz2
atk-2.34.1.tbz2
fribidi-1.0.9.tbz2
glib-2.62.6.tbz2
dbus-glib-0.110.tbz2
libressl-3.1.3.tbz2

sys-apps:
dbus-1.12.18.tbz2

x11-libs:
libXext-1.3.4.tbz2
libXt-1.2.0.tbz2
libX11-1.6.11.tbz2
libXfixes-5.0.3-r1.tbz2
libXxf86vm-1.1.4-r1.tbz2
gdk-pixbuf-2.40.0.tbz2
libSM-1.2.3.tbz2
cairo-1.16.0-r4.tbz2
libXau-1.0.9.tbz2
libXi-1.7.10.tbz2
libdrm-2.4.102.tbz2
libXcomposite-0.4.5.tbz2
libXinerama-1.1.4.tbz2
gtk+-2.24.32-r1.tbz2
libXcursor-1.2.0.tbz2
libXmu-1.1.3.tbz2
pango-1.42.4-r2
libXdamage-1.1.5.tbz2
libXrandr-1.5.2.tbz2
libxcb-1.14.tbz2
pixman-0.40.0.tbz2
libICE-1.0.10.tbz2
libXdmcp-1.1.3.tbz2
libXrender-0.9.10-r1.tbz2
libxshmfence-1.3-r1.tbz2

tbz2 files are not .tar.bz2 but rather .tar.xz files with metadata concatenated. bsdtar can extra most, but not all of them correctly. A better approach is to get
app-portage/portage-utils-0.87.tbz2
as above, use tar to extra that one, and then use the provided linux qtbz2 as such:
usr/bin/qtbz2 -s <file>.tbz2
This produces two files, with <file>.tar.xz being of interest (simply 
tar -xvf <file>.tar.xz
to proceed).

Finally, the following test programs were installed as per the dependencies for testing:

x11-apps:
mesa-progs-8.4.0.tbz2
cd /emul/linux/
./usr/bin/glxgears

www-client:
lynx-2.8.9_p1.tbz2
cd /emul/linux/
./usr/bin/lynx
>Fix:

>Release-Note:

>Audit-Trail:
From: electrolytes2 <electrolytes2@protonmail.com>
To: "gnats-bugs@netbsd.org" <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: kern/55730: linux-compat fails to run glxgears, lynx, palemoon with gentoo stage3, and palemoon, iceweasel with suse131
Date: Sun, 18 Oct 2020 01:57:13 +0000

 Tarballs for the relevant environments and test executables are available at:

 as follows:
 - stage3-based /emul/linux environment with all dependencies mentioned:
   http://instance-e2d421.xen.prgmr.com:8080/emul-linux-gentoo.tar.gz
 - suse131-based /emul/linux environment with dependencies pulled from debian
   repos as described: http://instance-e2d421.xen.prgmr.com:8080/emul-linux.tar.gz
 - iceweasel from debian repos: http://instance-e2d421.xen.prgmr.com:8080/iceweasel.tar.gz
 - standalone palemoon from upstream: http://instance-e2d421.xen.prgmr.com:8080/palemoon-standalone.tar.gz

 The stage3-based system fails to launch iceweasel with "too much recursion"=
  -> segfault. There are rendering issues with the suse131-based environment=
  but it does launch about 25% of the times it is invoked with those prepare=
 d environments.
 Palemoon fails in either case on segfault as described.

 The stage3-based environment also includes glxgears and lynx for testing.

>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.