You are not logged in.

#1 2020-08-15 00:15:53

jetfrog28
Member
Registered: 2018-08-25
Posts: 17

[SOLVED] Qutebrowser crashing with glibc 2.31

Hello all,

Qutebrowser crashes upon startup and cannot load any pages:

$ qutebrowser --temp-basedir
propsReply "Method \"GetAll\" with signature \"s\" on interface \"org.freedesktop.DBus.Properties\" doesn't exist\n"
nmReply "Method \"GetDevices\" with signature \"\" on interface \"org.freedesktop.NetworkManager\" doesn't exist\n"
"Object path cannot be empty"
../../../../qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0403
../../../../qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0403
18:54:49 ERROR: Renderer process crashed
../../../../qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0403
18:54:51 ERROR: Renderer process crashed
../../../../qtwebengine-everywhere-src-5.15.0/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0403
18:54:52 ERROR: Renderer process crashed
18:54:54 ERROR: Renderer process crashed

As far as I can tell, it is the same problem that chromium faced, as addressed in [1], which was fixed by a patch Schnitzeltony gave.  The actual crash is occurring in qt5-webengine, which is a repackaged chromium.  It appears to have all the same files the patch modifies, and I'm hoping the same fix will work.  I'm going to try adapting the patch myself, but the package takes quite a bit of time to build on my machine and I haven't applied a patch to a package before, so it will be some time before I have results.  I will update back here when I determine whether the patch solves the problem.

In the meantime, if anybody has pointers on adapting or applying patches, they would be appreciated.

Note: I posted in [1] that qutebrowser's crashes were intermittent.  This is no longer the case; I believe that lasted until I restarted my machine.  Now the crash occurs as soon as the browser opens, and repeats until the browser is closed manually.  There doesn't seem to be a cap on how many times it tries.

Edit:  I believe the first three lines in the crash output above appeared even when the browser was fully functional.  The messages related to the crash seem to begin after "Object path cannot be empty".


[1] https://bbs.archlinux32.org/viewtopic.php?id=2897

Last edited by jetfrog28 (2020-08-15 23:19:32)

Offline

#2 2020-08-15 01:18:49

jetfrog28
Member
Registered: 2018-08-25
Posts: 17

Re: [SOLVED] Qutebrowser crashing with glibc 2.31

I've got the patching part figured out.  Now just waiting on the build.

Offline

#3 2020-08-15 06:35:09

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: [SOLVED] Qutebrowser crashing with glibc 2.31

This is the seccomp jail with new time functions, the patches from chromium itself should also apply here in their local copy
of chromium, see https://bugs.archlinux32.org/index.php? … ask_id=105 and
https://git.archlinux32.org/packages/tr … -407.patch

Offline

#4 2020-08-15 23:09:55

jetfrog28
Member
Registered: 2018-08-25
Posts: 17

Re: [SOLVED] Qutebrowser crashing with glibc 2.31

Indeed, that was the issue.  After 20+ hours of building, qutebrowser is fully functional and stable again.  It would be wonderful if this patch could be applied in the official repos.

Here is the patchfile, recreated for qt5-webengine, if that is helpful to you or anyone reading.

diff --unified --recursive --text qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc	2020-01-20 05:37:42.000000000 -0500
+++ qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc	2020-08-14 19:42:17.149097361 -0400
@@ -148,7 +148,14 @@
     return Allow();
 #endif
 
-  if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
+  if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep
+#if defined(__NR_clock_gettime64)
+                                  || sysno == __NR_clock_gettime64
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+                                  || sysno == __NR_clock_nanosleep_time64
+#endif
+    ) {
     return RestrictClockID();
   }
 
diff --unified --recursive --text qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
--- qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc	2020-01-20 05:37:42.000000000 -0500
+++ qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc	2020-08-14 19:44:56.061952024 -0400
@@ -60,6 +60,12 @@
       case __NR_clock_gettime:
       case __NR_clock_getres:
       case __NR_clock_nanosleep:
+#if defined(__NR_clock_nanosleep_time64)
+      case __NR_clock_nanosleep_time64:
+#endif
+#if defined(__NR_clock_gettime64)
+      case __NR_clock_gettime64:
+#endif
         return RestrictClockID();
       default:
         return Allow();
diff --unified --recursive --text qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
--- qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc	2020-01-20 05:37:42.000000000 -0500
+++ qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc	2020-08-14 19:46:31.793599483 -0400
@@ -39,6 +39,12 @@
                                 // filtered by RestrictClokID().
     case __NR_clock_gettime:    // Parameters filtered by RestrictClockID().
     case __NR_clock_nanosleep:  // Parameters filtered by RestrictClockID().
+#if defined(__NR_clock_gettime64)
+    case __NR_clock_gettime64:  // Parameters filtered by RestrictClockID().
+#endif
+#if defined(__NR_clock_nanosleep_time64)
+    case __NR_clock_nanosleep_time64:  // Parameters filtered by RestrictClockID().
+#endif
     case __NR_clock_settime:    // Privileged.
 #if defined(__i386__) || \
     (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
diff --unified --recursive --text qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h
--- qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h	2020-01-20 05:37:42.000000000 -0500
+++ qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h	2020-08-14 19:48:02.545121302 -0400
@@ -1385,6 +1385,14 @@
 #define __NR_memfd_create (__NR_SYSCALL_BASE+385)
 #endif
 
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407)
+#endif
+
 // ARM private syscalls.
 #if !defined(__ARM_NR_BASE)
 #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000)
diff --unified --recursive --text qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h
--- qtwebengine-everywhere-src-5.14.1/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h	2020-01-20 05:37:42.000000000 -0500
+++ qtwebengine-everywhere-src-5.14.1.new/src/3rdparty/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h	2020-08-14 19:48:48.505879294 -0400
@@ -1433,4 +1433,12 @@
 #define __NR_memfd_create (__NR_Linux + 354)
 #endif
 
+#if !defined(__NR_clock_gettime64)
+#define __NR_clock_gettime64 (__NR_Linux + 403)
+#endif
+
+#if !defined(__NR_clock_nanosleep_time64)
+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407)
+#endif
+
 #endif  // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_

Thank you very much for your time and all the work you put into maintaining this distro.

Offline

#5 2020-08-16 07:10:33

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: [SOLVED] Qutebrowser crashing with glibc 2.31

Sure thing, I'll patch qt5-webengine and rebuild the package.

Thanks for testing. :-)

What makes me really sad is the state of the Linux nation: there
are at least 30 packages just embedding chromium, and those
have all to be locally patched. This is software enginering in 2020
at it's finest. :->

At least this is not a meson script calling some Python code downloading
chromium while building, so that it would be utterly painful to introduce
a patch there.. :-)

Offline

#6 2020-08-16 19:09:22

jetfrog28
Member
Registered: 2018-08-25
Posts: 17

Re: [SOLVED] Qutebrowser crashing with glibc 2.31

The repo package works again.  Thanks!

"But code reuse is good practice, so we should have the same code in as many places as possible".  In seriousness, yeah, that looks like a mess.  Is that download-in-build problem something you've needed to face elsewhere?

I noticed the patch for the package seems to have been regenerated.  Is this related to some automated patch tooling that Arch 32 uses?  I'm curious as to how you handle all the patches you need to deal with.

Offline

#7 2020-08-17 14:20:04

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: [SOLVED] Qutebrowser crashing with glibc 2.31

The meson download chromium was a made-up example, but I'm sure it exists (or will exist soon). :-)

I had minor issues with the patch, but most likely because 10 other patches before changed
the sources too much for the last chromium patch to succeed.

There are no strict rules for patch (but the diff -rauN options). For chromium I thought it would
be neat, if the patches can be copied between packages using chromium as third party software,
but OTOH they might differ again too much.

Offline

#8 2020-08-18 21:58:46

jetfrog28
Member
Registered: 2018-08-25
Posts: 17

Re: [SOLVED] Qutebrowser crashing with glibc 2.31

Fair enough.  Well, thanks much for all the help and info!

Offline

Board footer

Powered by FluxBB