flypig.co.uk

Gecko-dev Diary

Between August 2023 and September 2024 I upgrading the Sailfish OS browser from Gecko version ESR 78 to ESR 91, writing a daily blog as I went along. This page catalogues my progress, alongside the other browser-related topics I've looked in to since.

Latest code changes are in the gecko-dev sailfishos-esr91 branch.

There is an index of all posts in case you want to jump to a particular day.

Gecko RSS feed Click the icon for the Gecko-dev Diary RSS feed.

Gecko

5 most recent items

19 Aug 2024 : Day 324 #
This morning I woke up to find the gecko libraries had successfully built. Which means today it's time to test them. But before I can do that I'll need to also rebuild all of the packages that depend on the new gecko library. This includes qtmozembed, embedlite-components, sailfish-components-webview, sailfish-browser and the browser booster. Thankfully building all of these turns out to be pretty straightforward using the SDK's nice output-prefix option.
$ cd ../qtmozembed/
$ sfdk build -d -p
[...]
$ cd ../embedlite-components
$ sfdk build -d -p
[...]
$ cd ../sailfish-components-webview/
$ sfdk build -d -p
[...]
$ cd ../sailfish-browser/
$ sfdk build -d -p
[...]
$ cd ../mapplauncherd-booster-browser/
$ sfdk build -d -p
[...]
$ cd ../harbour-webview-example/
$ sfdk build -d -p
[...]
This leaves me with the following projects, each of which has several associated packages:
  1. rust-cbindgen
  2. nspr
  3. xulrunner-qt5
  4. qtmozembed-qt5
  5. embedlite-components-qt5
  6. sailfish-components-webview-qt5
  7. sailfish-browser
  8. mapplauncherd-booster-browser
  9. harbour-webview
As I was explaining yesterday, I've upgraded one of my two development phones so that it's now running Sailfish OS 4.6. Having transferred all of the packages over to it as well they now need to be installed. There are, it has to be said, quite a few packages to install.
$ rpm -U --force xulrunner-qt5-91.*.rpm xulrunner-qt5-debuginfo-91.*.rpm \
    xulrunner-qt5-debugsource-91.*.rpm xulrunner-qt5-misc-91.*.rpm \
    qtmozembed-qt5-1.*.rpm qtmozembed-qt5-debuginfo-1.*.rpm \
    qtmozembed-qt5-debugsource-1.*.rpm sailfish-components-webview-qt5-1.*.rpm \
    sailfish-components-webview-qt5-debuginfo-1.*.rpm \
    sailfish-components-webview-qt5-debugsource-1.*.rpm \
    sailfish-components-webview-qt5-pickers-1.*.rpm \
    sailfish-components-webview-qt5-popups-1.*.rpm \
    embedlite-components-qt5-1.*.rpm embedlite-components-qt5-debuginfo-1.*.rpm \
    embedlite-components-qt5-debugsource-1.*.rpm \
    sailfish-browser-2.*.rpm sailfish-browser-debuginfo-2.*.rpm \
    sailfish-browser-debugsource-2.*.rpm sailfish-browser-settings-2.*.rpm \
    mapplauncherd-booster-browser-0.*.rpm \
    mapplauncherd-booster-browser-debuginfo-0.*.rpm \
    mapplauncherd-booster-browser-debugsource-0.*.rpm harbour-webview-0.*.rpm \
    harbour-webview-debuginfo-0.*.rpm harbour-webview-debugsource-0.*.rpm
With those installed it's now, finally, time to test out ESR 91 on Sailfish OS 4.6. Sadly, the results are as expected, in that it fails to get to the first page render before crashing:
$ sailfish-browser 
[D] unknown:0 - Using Wayland-EGL
library "libui_compat_layer.so" not found
library "libGLESv2_adreno.so" not found
library "eglSubDriverAndroid.so" not found
greHome from GRE_HOME:/usr/bin
libxul.so is not found, in /usr/bin/libxul.so
Created LOG for EmbedLiteTrace
[W] unknown:0 - MeeGo.QOfono QML module name is deprecated and subject for 
    removal. Please adapt code to "import QOfono".
[D] onCompleted:108 - ViewPlaceholder requires a SilicaFlickable parent
Created LOG for EmbedLite
[D] unknown:0 - Updating services as GetServices returns
[D] unknown:0 - No default route set, services: 3
[D] unknown:0 - Selected service "kolbe" path "/net/connman/
    service/wifi_3c01efa2be4a_6b6f6c6265_managed_psk"
Created LOG for EmbedPrefs
Created LOG for EmbedLiteLayerManager
Segmentation fault (core dumped)
Since I'd already been told by the devs at Jolla that it wasn't working for them, it's not a surprise that it's crashing for me as well. A small part of me had hoped that the fixes I added to address video rendering, which prevented multiple GLLibraryEGL instances from being created, might have helped with this issue too. But sadly that wasn't to be.

Now is probably a good time to note that this diary entry is a messy one today. I've collected lots of logs, but they don't make for good reading. On the other hand, it helps for me to keep a record, so while I'll try to only include the relevant parts, there's still going to be a lot of cruft today.

Running with the debugger doesn't turn out to be especially informative. The backtrace for the crash is nonexistent and there are way too many threads to easily pick out where the actual problem lies:
$ gdb sailfish-browser
[...]
Thread 42 "Compositor" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ef28bd830 (LWP 15325)]
0x0000007faef77360 in ?? ()
(gdb) bt
#0  0x0000007faef77360 in ?? ()
#1  0x0000007f7598c6b0 in ?? ()
Backtrace stopped: not enough registers or memory available to unwind further
(gdb) info thread
  Id   Target Id                                         Frame 
  1    Thread 0x7fb2e75010 (LWP 14987) "sailfish-browse" 
    0x0000007fb7061e14 in __GI___poll (fds=0x5555c94a40, nfds=5, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  2    Thread 0x7fac607830 (LWP 15281) &quot;QQmlThread&quot;      
    0x0000007fb7061e14 in __GI___poll (fds=0x7fa80013d0, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  3    Thread 0x7fac406830 (LWP 15282) &quot;QDBusConnection&quot; 
    0x0000007fb7061e14 in __GI___poll (fds=0x7fa000d290, nfds=4, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  4    Thread 0x7fac205830 (LWP 15283) &quot;pool-spawner&quot;    syscall () 
    at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
  5    Thread 0x7fa77fe830 (LWP 15284) &quot;gmain&quot;           
    0x0000007fb7061e14 in __GI___poll (fds=0x5555847530, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  6    Thread 0x7fa75fd830 (LWP 15285) &quot;dconf worker&quot;    
    0x0000007fb7061e14 in __GI___poll (fds=0x7f90000b80, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  7    Thread 0x7fa73fc830 (LWP 15286) &quot;gdbus&quot;           
    0x0000007fb7061e14 in __GI___poll (fds=0x7f94000b80, nfds=3, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  8    Thread 0x7fa6826830 (LWP 15290) &quot;QThread&quot;         
    0x0000007fb7061e14 in __GI___poll (fds=0x7f880013d0, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  9    Thread 0x7fa64ec830 (LWP 15291) &quot;QQuickPixmapRea&quot; 
    0x0000007fb7061e14 in __GI___poll (fds=0x7f8c00b400, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  10   Thread 0x7fa62eb830 (LWP 15292) &quot;Qt bearer threa&quot; 
    0x0000007fb7061e14 in __GI___poll (fds=0x7f80001430, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  11   Thread 0x7fa6027830 (LWP 15293) &quot;GeckoWorkerThre&quot; clone () at 
    ../sysdeps/unix/sysv/linux/aarch64/clone.S:63
  13   Thread 0x7fa5e26830 (LWP 15295) &quot;QSGRenderThread&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x5555ceb87c)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  14   Thread 0x7fa5ac1830 (LWP 15296) &quot;IPC I/O Parent&quot;  syscall () 
    at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:39
  15   Thread 0x7fa4079830 (LWP 15297) &quot;Netlink Monitor&quot; 
    0x0000007fb7061e14 in __GI___poll (fds=fds@entry=0x7fa4078be8, 
    nfds=nfds@entry=2, 
    timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
  16   Thread 0x7ef83fe830 (LWP 15298) &quot;Socket Thread&quot;   
    0x0000007fb7061e14 in __GI___poll (fds=0x7ef83fd800, nfds=2, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  17   Thread 0x7ef3dbe830 (LWP 15299) &quot;TaskCon~read #0&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  18   Thread 0x7ef3bbf830 (LWP 15300) &quot;TaskCon~read #1&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84030910)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  19   Thread 0x7ef39c0830 (LWP 15301) &quot;TaskCon~read #2&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84030910)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  20   Thread 0x7ef37c1830 (LWP 15302) &quot;TaskCon~read #3&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  21   Thread 0x7ef35c2830 (LWP 15303) &quot;TaskCon~read #4&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  22   Thread 0x7ef33c3830 (LWP 15304) &quot;TaskCon~read #5&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84030910)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  23   Thread 0x7ef31c4830 (LWP 15305) &quot;TaskCon~read #6&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84030910)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  24   Thread 0x7ef2fc5830 (LWP 15306) &quot;TaskCon~read #7&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84030910)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  26   Thread 0x7ef80fe830 (LWP 15308) &quot;Timer&quot;           
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7ef80fdb58, 
    clockid=<optimized out>, expected=0, futex_word=0x7f8403158c) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  27   Thread 0x7ef80bd830 (LWP 15309) &quot;IPDL Background&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8444ed94)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  28   Thread 0x7ef8329830 (LWP 15310) &quot;Cache2 I/O&quot;      
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8444a184)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  29   Thread 0x7ef807c830 (LWP 15311) &quot;Cookie&quot;          
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84622e40)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  30   Thread 0x7ef3efe830 (LWP 15312) &quot;Backgro~Pool #1&quot; 
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7ef3efdb28, 
    clockid=<optimized out>, expected=0, futex_word=0x7f840312ac) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  31   Thread 0x7ef3ebd830 (LWP 15313) &quot;StreamTrans #1&quot;  
    0x0000007fb7007330 in _int_free (av=0x7eb4000020, p=0x7eb445b300, 
    have_lock=0) at malloc.c:4184
  32   Thread 0x7ef3e7c830 (LWP 15314) &quot;QuotaManager IO&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7ec4003dd4)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  34   Thread 0x7ef2d64830 (LWP 15316) &quot;ProxyResolution&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84abc064)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  35   Thread 0x7ef2b08830 (LWP 15317) &quot;Worker Launcher&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84b29470)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  36   Thread 0x7ef2ac7830 (LWP 15318) &quot;StreamTrans #2&quot;  
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7ef2ac6b28, 
    clockid=<optimized out>, expected=0, futex_word=0x7f8420a238) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  37   Thread 0x7ef2839830 (LWP 15320) &quot;IndexedDB #1&quot;    
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7ec4005704)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  38   Thread 0x7ef2a86830 (LWP 15321) &quot;StreamTrans #3&quot;  
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7ef2a85b28, 
    clockid=<optimized out>, expected=0, futex_word=0x7f8420a238) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  39   Thread 0x7ef8392830 (LWP 15322) &quot;TRR Background&quot;  
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f84adbb80)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  40   Thread 0x7ef2a45830 (LWP 15323) &quot;DNS Resolver #1&quot; 
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7ef2a449e8, 
    clockid=<optimized out>, expected=0, futex_word=0x7f84af875c) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  41   Thread 0x7ef28fe830 (LWP 15324) &quot;Softwar~cThread&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7ef28fdcc8)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
* 42   Thread 0x7ef28bd830 (LWP 15325) &quot;Compositor&quot;      
    0x0000007faef77360 in ?? ()
  43   Thread 0x7ef27f8830 (LWP 15326) &quot;ImageIO&quot;         
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f847a9ab0)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  44   Thread 0x7ef27b7830 (LWP 15327) &quot;DNS Resolver #2&quot; 
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7ef27b69e8, 
    clockid=<optimized out>, expected=0, futex_word=0x7f84af875c) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  45   Thread 0x7ef2776830 (LWP 15328) &quot;DNS Resolver #3&quot; 
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7ef27759e8, 
    clockid=<optimized out>, expected=0, futex_word=0x7f84af875c) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  46   Thread 0x7fa5c25830 (LWP 15331) &quot;ImageBridgeChld&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f847b3080)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  47   Thread 0x7ef2735830 (LWP 15332) &quot;Compositor&quot;      
    0x0000007fae9fb4f4 in ?? ()
  48   Thread 0x7ef2534830 (LWP 15333) &quot;GeckoWorkerThre&quot; clone () at 
    ../sysdeps/unix/sysv/linux/aarch64/clone.S:63
(gdb) 
To help pin down the problem I've placed a breakpoint on the GLLibraryEGL constructor to find out whether the crash comes before or after. It turns out to be after, which means I can also step through the code from there to try to figure out when it crashes with a bit more accuracy.
Thread 42 &quot;Compositor&quot; hit Breakpoint 1, mozilla::gl::GLLibraryEGL::
    GLLibraryEGL (this=0x7e8c1113d0) at gfx/gl/GLLibraryEGL.h:113
113     class GLLibraryEGL final {
(gdb) n
mozilla::gl::GLLibraryEGL::Create (
    out_failureId=out_failureId@entry=0x7ef28bbfe0, aDisplay=0x1) at gfx/gl/
    GLLibraryEGL.cpp:344
344       RefPtr<GLLibraryEGL> ret = new GLLibraryEGL;
(gdb) n
345       if (!ret->Init(false, out_failureId, aDisplay)) {
(gdb) n
348       return ret;
(gdb) n
mozilla::gl::GLContextProviderEGL::CreateWrappingExisting (
    aContext=0x7e8c004230, aSurface=0x5555c135d0, aDisplay=<optimized out>) at 
    gfx/gl/GLContextProviderEGL.cpp:1008
1008        gDefaultEglLibrary = GLLibraryEGL::Create(&failureId, aDisplay);
(gdb) n
[...]
1005      nsCString failureId;
(gdb) n
mozilla::embedlite::nsWindow::GetGLContext (this=this@entry=0x7f847b9c20) at 
    mobile/sailfishos/embedshared/nsWindow.cpp:406
406           if (!mozContext || !mozContext->Init()) {
(gdb) n
mozilla::layers::CompositorOGL::CreateContext (this=this@entry=0x7e8c110d80) at 
    gfx/layers/opengl/CompositorOGL.cpp:234
234       if (widgetOpenGLContext) {
(gdb) n
79      ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/RefPtr.h: No such 
    file or directory.
(gdb) n
mozilla::layers::CompositorOGL::Initialize (this=0x7e8c110d80, 
    out_failureReason=0x7ef28bc5a0) at gfx/layers/opengl/CompositorOGL.cpp:387
387         mGLContext = CreateContext();
(gdb) n
397       if (!mGLContext) {
(gdb) n
[...]
379       ScopedGfxFeatureReporter reporter(&quot;GL Layers&quot;);
(gdb) n
mozilla::layers::CompositorBridgeParent::NewCompositor (
    this=this@entry=0x7f84c16450, aBackendHints=...) at ${PROJECT}/
    obj-build-mer-qt-xr/dist/include/nsTStringRepr.h:91
1495            failureReason = &quot;SUCCESS&quot;;
(gdb) n
[...]
1488          return nullptr;
(gdb) n
mozilla::layers::CompositorBridgeParent::InitializeLayerManager (
    this=this@entry=0x7f84c16450, aBackendHints=...) at gfx/layers/ipc/
    CompositorBridgeParent.cpp:1436
1436      mCompositor = NewCompositor(aBackendHints);
(gdb) n
[...]
1450      MonitorAutoLock lock(*sIndirectLayerTreesLock);
(gdb) n
mozilla::layers::CompositorBridgeParent::AllocPLayerTransactionParent (
    this=this@entry=0x7f84c16450, aBackendHints=..., aId=...) at gfx/layers/ipc/
    CompositorBridgeParent.cpp:1548
1548      if (!mLayerManager) {
(gdb) n
[...]
1561      p->AddIPDLReference();
(gdb) n
mozilla::embedlite::EmbedLiteCompositorBridgeParent::
    AllocPLayerTransactionParent (this=0x7f84c16450, aBackendHints=..., 
    aId=...) at mobile/sailfishos/embedthread/
    EmbedLiteCompositorBridgeParent.cpp:83
83        EmbedLiteWindowParent *parentWindow = EmbedLiteWindowParent::From(
    mWindowId);
(gdb) n
[...]
88        if (!StaticPrefs::embedlite_compositor_external_gl_context()) {
(gdb) n

mozilla::layers::PCompositorBridgeParent::OnMessageReceived (this=0x7f84c16450, 
    msg__=...) at PCompositorBridgeParent.cpp:1286
1286    PCompositorBridgeParent.cpp: No such file or directory.
(gdb) n
1291    in PCompositorBridgeParent.cpp
(gdb) n
1292    in PCompositorBridgeParent.cpp
(gdb) n
1294    in PCompositorBridgeParent.cpp
(gdb) n
1254    in PCompositorBridgeParent.cpp
(gdb) n
1250    in PCompositorBridgeParent.cpp
(gdb) n
mozilla::layers::PCompositorManagerParent::OnMessageReceived (this=<optimized 
    out>, msg__=...) at PCompositorManagerParent.cpp:199
199     PCompositorManagerParent.cpp: No such file or directory.
(gdb) n
mozilla::ipc::MessageChannel::DispatchAsyncMessage (
    this=this@entry=0x7f84dd3ca8, aProxy=aProxy@entry=0x7e8c10be10, aMsg=...) 
    at ipc/glue/MessageChannel.cpp:2075
2075                                         nestedLevel);
(gdb) n
[...]
2078      MaybeHandleError(rv, aMsg, &quot;DispatchAsyncMessage&quot;);
(gdb) n
mozilla::ipc::MessageChannel::DispatchMessage (this=this@entry=0x7f84dd3ca8, 
    aMsg=...) at ipc/glue/MessageChannel.cpp:1992
1992          CxxStackFrame frame(*this, IN_MESSAGE, &aMsg);
(gdb) n
[...]
1971      RefPtr<ActorLifecycleProxy> listenerProxy = 
    mListener->GetLifecycleProxy();
(gdb)
mozilla::ipc::MessageChannel::MessageTask::Run (this=0x5555941070) at ipc/glue/
    MessageChannel.cpp:1877
1877      MonitorAutoLock lock(*mMonitor);
(gdb) n
nsThread::ProcessNextEvent (this=0x7f84d05580, aMayWait=<optimized out>, 
    aResult=0x7ef28bcd07) at xpcom/threads/nsThread.cpp:1158
1158            mPerformanceCounterState.RunnableDidRun(std::move(snapshot.ref(
    )));
(gdb) n
[...]
1120          Maybe<LogRunnable::Run> log;
(gdb) n
NS_ProcessNextEvent (aThread=<optimized out>, aThread@entry=0x7f84d05580, 
    aMayWait=aMayWait@entry=true) at ${PROJECT}/obj-build-mer-qt-xr/dist/
    include/nsError.h:30
(gdb) n
mozilla::ipc::MessagePumpForNonMainThreads::Run (this=0x7e8c001840, 
    aDelegate=0x7ef28bce00) at ipc/glue/MessagePump.cpp:300
300         bool didWork = NS_ProcessNextEvent(thread, false) ? true : false;
(gdb) n
[...]
300         bool didWork = NS_ProcessNextEvent(thread, false) ? true : false;
(gdb)
301         if (!keep_running_) {
(gdb)
interface '(null)' has no event 0
[C] unknown:0 - The Wayland connection experienced a fatal error (Resource 
    temporarily unavailable)
305         didWork |= aDelegate->DoDelayedWork(&delayed_work_time_);
(gdb)
307         if (didWork && delayed_work_time_.is_null()) {
(gdb)
333       bool is_null() const { return ticks_ == 0; }
(gdb)
308           mDelayedWorkTimer->Cancel();
(gdb)
311         if (!keep_running_) {
(gdb)
[Parent 16750, StreamTrans #8] ###!!! ABORT: file ${PROJECT}/gecko-dev/ipc/
    chromium/src/base/thread_local_posix.cc:35
[Parent 16750, StreamTrans #8] ###!!! ABORT: file ${PROJECT}/gecko-dev/ipc/
    chromium/src/base/thread_local_posix.cc:35

Thread 58 &quot;StreamTrans #8&quot; received signal SIGSEGV, Segmentation 
    fault.
[Switching to Thread 0x7ef2768830 (LWP 18288)]
0x0000007fbfb8d1e8 in mozalloc_abort () from /usr/lib64/libqt5embedwidget.so.1
(gdb)
Single stepping until exit from function mozalloc_abort,
which has no line number information.
[New Thread 0x7ef27a9830 (LWP 18290)]
WasmTrapHandler (signum=11, info=0x7ef27663f0, context=0x7ef2766470) at js/src/
    wasm/WasmSignalHandlers.cpp:705
705     static void WasmTrapHandler(int signum, siginfo_t* info, void* context) 
    {
(gdb)

Thread 1 &quot;sailfish-browse&quot; received signal SIGSEGV, Segmentation 
    fault.
[Switching to Thread 0x7fb2e75010 (LWP 16750)]
0x0000007faef777e0 in ?? ()
(gdb)
Cannot find bounds of current function
(gdb)
Stepping through isn't completely enlightening, but it does throw up some potentially useful information. For example, while stepping through the code the following shows up in the debug output:
interface '(null)' has no event 0
[C] unknown:0 - The Wayland connection experienced a fatal error (Resource 
    temporarily unavailable)
A search of the Web for this shows some hits, notably in the Qt libraries, but nothing to fully uncover what's going on here. I figure it's also worth checking with the WebView, which has a substantially different rendering pipeline, to see whether that's working or not. It turns out it's not... the crash happens in pretty much the same place:
$ gdb harbour-webview
[...]
Created LOG for EmbedLiteLayerManager
[New Thread 0x7ebbda5830 (LWP 23770)]
library &quot;libui_compat_layer.so&quot; not found
[New Thread 0x7ebb7fe830 (LWP 23771)]
=============== Preparing offscreen rendering context ===============
[New Thread 0x7ebbaef830 (LWP 23772)]
[New Thread 0x7ebbaae830 (LWP 23773)]
[New Thread 0x7ebb3fe830 (LWP 23774)]

Thread 10 &quot;QSGRenderThread&quot; received signal SIGSEGV, Segmentation 
    fault.
[Switching to Thread 0x7fa73f8830 (LWP 23733)]
0x0000007faf60a360 in ?? ()
(gdb) bt
#0  0x0000007faf60a360 in ?? ()
#1  0x0000007fae0f99f8 in ?? ()
Backtrace stopped: not enough registers or memory available to unwind further
(gdb) 
Just in case it's related, I'm also going to install the NSPR packages that I built against, even if they should be the same as the packages already available in Sailfish OS 4.6:
$ rpm -U --force nspr-4.*.rpm nspr-debuginfo-4.*.rpm nspr-debugsource-4.*.rpm
Another thing that could be worth trying is running with the WAYLAND_DEBUG> environment variable set to 1. This will print out a huge amount of debug info related to Wayland, so could throw something useful up.
$ WAYLAND_DEBUG=1 sailfish-browser
[3059655.707]  -> wl_display@1.get_registry(new id wl_registry@2)
[3059655.852]  -> wl_display@1.sync(new id wl_callback@3)
[3059657.925] wl_display@1.delete_id(3)
[3059658.067] wl_registry@2.global(1, &quot;wl_compositor&quot;, 3)
[3059658.109]  -> wl_registry@2.bind(1, &quot;wl_compositor&quot;, 3, new id 
    [unknown]@4)
[3059658.169] wl_registry@2.global(2, &quot;wl_data_device_manager&quot;, 1)
[3059658.240]  -> wl_registry@2.bind(2, &quot;wl_data_device_manager&quot;, 1, 
    new id [unknown]@5)
[3059658.288] wl_registry@2.global(3, &quot;wl_shm&quot;, 1)
[3059658.296]  -> wl_registry@2.bind(3, &quot;wl_shm&quot;, 1, new id 
    [unknown]@6)
[3059658.306] wl_registry@2.global(4, &quot;qt_hardware_integration&quot;, 1)
[3059658.351]  -> wl_registry@2.bind(4, &quot;qt_hardware_integration&quot;, 1, 
    new id [unknown]@7)
[3059658.433]  -> wl_display@1.sync(new id wl_callback@8)
[3059658.511] wl_registry@2.global(5, &quot;android_wlegl&quot;, 2)
[3059658.520] wl_registry@2.global(6, &quot;qt_surface_extension&quot;, 1)
[3059658.543]  -> wl_registry@2.bind(6, &quot;qt_surface_extension&quot;, 1, 
    new id [unknown]@9)
[3059658.552] wl_registry@2.global(7, &quot;qt_touch_extension&quot;, 1)
[3059658.581]  -> wl_registry@2.bind(7, &quot;qt_touch_extension&quot;, 1, new 
    id [unknown]@10)
[3059658.598] wl_registry@2.global(8, &quot;qt_windowmanager&quot;, 1)
[3059658.614]  -> wl_registry@2.bind(8, &quot;qt_windowmanager&quot;, 1, new id 
    [unknown]@11)
[3059658.627] wl_registry@2.global(9, &quot;wl_seat&quot;, 3)
[3059658.663]  -> wl_registry@2.bind(9, &quot;wl_seat&quot;, 3, new id 
    [unknown]@12)
[3059658.689]  -> wl_data_device_manager@5.get_data_device(new id 
    wl_data_device@13, wl_seat@12)
[3059658.776] wl_registry@2.global(10, &quot;wl_output&quot;, 2)
[3059658.813]  -> wl_registry@2.bind(10, &quot;wl_output&quot;, 2, new id 
    [unknown]@14)
[3059658.837]  -> wl_display@1.sync(new id wl_callback@15)
[...]
Created LOG for EmbedPrefs
[3061814.124]  -> wl_surface@20.set_buffer_transform(0)
[3061814.556]  -> wl_surface@20.commit()
[3061821.476] wl_display@1.delete_id(42)
[3061821.549] wl_buffer@4278190084.release()
[3061821.570] wl_callback@42.done(17852739)
[3061821.612]  -> wl_surface@24.frame(new id wl_callback@42)
[3061821.645]  -> wl_surface@24.attach(wl_buffer@4278190083, 0, 0)
[3061821.690]  -> wl_surface@24.damage(0, 0, 1080, 2520)
[3061821.770]  -> wl_surface@24.commit()
[3061821.787]  -> wl_display@1.sync(new id wl_callback@47)
[3061825.338] discarded [unknown]@47.[event 0](0 fd, 12 byte)
[...]
[3061998.156] wl_callback@51.done(1181)
[3061997.685] wl_buffer@4278190084.release()
[3061998.422] wl_display@1.delete_id(42)
[3061998.473] wl_callback@42.done(17852914)
[3061998.518]  -> wl_surface@24.frame(new id wl_callback@42)
[3061998.559]  -> wl_surface@24.attach(wl_buffer@4278190083, 0, 0)
[3061998.596]  -> wl_surface@24.damage(0, 0, 1080, 2520)
[3061998.631]  -> wl_surface@24.commit()
[3061998.663]  -> wl_display@1.sync(new id wl_callback@51)
[3062000.088] discarded [unknown]@51.[event 0](0 fd, 12 byte)
[3062000.249] wl_display@1.delete_id(51)
[3062015.861] wl_buffer@4278190081.release()
[3062017.381] wl_display@1.delete_id(50)
[3062018.195] wl_callback@50.done(17852935)
[3062018.284]  -> wl_surface@20.frame(new id wl_callback@50)
[3062018.309]  -> wl_surface@20.attach(wl_buffer@4278190080, 0, 0)
[3062018.331]  -> wl_surface@20.damage(0, 0, 1080, 2520)
[3062018.387]  -> wl_surface@20.commit()
[3062018.435]  -> wl_display@1.sync(new id wl_callback@51)
[3062017.374] wl_display@1.delete_id(42)
[3062023.593] discarded [unknown]@51.[event 0](0 fd, 12 byte)
[3062023.788] wl_display@1.delete_id(51)
library &quot;libui_compat_layer.so&quot; not found
Segmentation fault (core dumped)
In practice the Wayland debug output isn't immediately helpful. It's pretty overwhelming actually. From what I can tell it looks cyclical and I can't see any obvious reasons why it would work on one loop but fail on the next. Placing a breakpoint on the AllocPLayerTransactionParent() method and giving it another go doesn't uncover anything else that might be useful for fixing this either:
Created LOG for EmbedLiteLayerManager
[3818873.473]  -> wl_compositor@4.create_surface(new id wl_surface@46)
[3818873.680]  -> android_wlegl@27.get_server_buffer_handle(new id 
    android_wlegl_server_buffer_handle@45, 1, 1, 1, 768)
[3818873.754]  -> wl_display@1.sync(new id wl_callback@47)
[3818875.442] wl_display@1.delete_id(45)
[3818875.533] android_wlegl_server_buffer_handle@45.buffer_ints(array[88])
[3818875.462] wl_display@1.delete_id(47)
[3818875.672] android_wlegl_server_buffer_handle@45.buffer_fd(fd 71)
[3818876.108] android_wlegl_server_buffer_handle@45.buffer_fd(fd 72)
[3818876.130] android_wlegl_server_buffer_handle@45.buffer(new id 
    wl_buffer@4278190086, 1, 64)
[3818876.210] wl_callback@47.done(1189)
[3818876.255]  -> android_wlegl@27.get_server_buffer_handle(new id 
    android_wlegl_server_buffer_handle@47, 1, 1, 1, 768)
[3818876.299]  -> wl_display@1.sync(new id wl_callback@48)
[...]
[3818901.384] wl_display@1.delete_id(46)
[New Thread 0x7fa607e830 (LWP 27221)]
[3818920.750] wl_display@1.delete_id(49)
[Switching to Thread 0x7efacf7830 (LWP 27215)]

Thread 37 &quot;Compositor&quot; hit Breakpoint 1, mozilla::embedlite::
    EmbedLiteCompositorBridgeParent::AllocPLayerTransactionParent (
    this=0x7f8cb1f6e0, aBackendHint
s=..., aId=...) at mobile/sailfishos/embedthread/
    EmbedLiteCompositorBridgeParent.cpp:79
79      {
(gdb) n
[3829046.000] wl_shell_surface@22.ping(1190)
[3829046.245]  -> wl_shell_surface@22.pong(1190)
[3829054.933] wl_buffer@4278190083.release()
[3829055.084] wl_callback@42.done(18583961)
[3829067.657]  -> wl_surface@24.frame(new id wl_callback@42)
80        PLayerTransactionParent* p =
(gdb) n
[...]
[3833740.282] wl_callback@46.done(1190)
[3833753.149]  -> wl_surface@20.frame(new id wl_callback@46)
[3833753.227]  -> wl_surface@20.attach(wl_buffer@4278190080, 0, 0)
[3833753.246]  -> wl_surface@20.damage(0, 0, 1080, 2520)
[3833753.260]  -> wl_surface@20.commit()
[3833753.272]  -> wl_display@1.sync(new id wl_callback@50)
[3833754.672] discarded [unknown]@50.[event 0](0 fd, 12 byte)
[3833754.801] wl_display@1.delete_id(50)

Thread 1 &quot;sailfish-browse&quot; received signal SIGSEGV, Segmentation 
    fault.
[Switching to Thread 0x7fb2e75010 (LWP 26774)]
0x0000007faf31f2d0 in wl_display_read_events () from /usr/lib64/
    libwayland-client.so.0
(gdb) bt
#0  0x0000007faf31f2d0 in wl_display_read_events () from /usr/lib64/
    libwayland-client.so.0
#1  0x0000007faf3fbb50 in QtWaylandClient::QWaylandDisplay::flushRequests() () 
    from /usr/lib64/libQt5WaylandClient.so.5
#2  0x0000007fb76e6cdc in QMetaObject::activate(QObject*, int, int, void**) () 
    from /usr/lib64/libQt5Core.so.5
#3  0x0000007fb7761698 in QSocketNotifier::activated(int, QSocketNotifier::
    QPrivateSignal) () from /usr/lib64/libQt5Core.so.5
#4  0x0000007fb76f3cac in QSocketNotifier::event(QEvent*) () from /usr/lib64/
    libQt5Core.so.5
#5  0x0000007fb76bab98 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (
    ) from /usr/lib64/libQt5Core.so.5
#6  0x0000007fb770eb34 in ?? () from /usr/lib64/libQt5Core.so.5
#7  0x0000007fb6dd94dc in ?? () from /usr/lib64/libglib-2.0.so.0
#8  0x0000007fb6ddc648 in ?? () from /usr/lib64/libglib-2.0.so.0
#9  0x0000007fb6ddce34 in g_main_context_iteration () from /usr/lib64/
    libglib-2.0.so.0
#10 0x0000007fb770e67c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop:
    :ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#11 0x0000007fb76b8f84 in QEventLoop::exec(QFlags<QEventLoop::
    ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#12 0x0000007fb76c09e4 in QCoreApplication::exec() () from /usr/lib64/
    libQt5Core.so.5
#13 0x000000555557d294 in main (argc=<optimized out>, argv=<optimized out>) at 
    main.cpp:203
(gdb) info thread
  Id   Target Id                                         Frame
* 1    Thread 0x7fb2e75010 (LWP 26774) &quot;sailfish-browse&quot; 
    0x0000007faf31f2d0 in wl_display_read_events () from /usr/lib64/
    libwayland-client.so.0
  2    Thread 0x7fac607830 (LWP 26933) &quot;QQmlThread&quot;      
    0x0000007fb7061e14 in __GI___poll (fds=0x7fa80013d0, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  3    Thread 0x7fac406830 (LWP 26934) &quot;QDBusConnection&quot; 
    0x0000007fb7061e14 in __GI___poll (fds=0x7fa000c700, nfds=4, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  4    Thread 0x7fac205830 (LWP 26935) &quot;pool-spawner&quot;    syscall () 
    at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:38
  5    Thread 0x7fa77fe830 (LWP 26936) &quot;gmain&quot;           
    0x0000007fb7061e14 in __GI___poll (fds=0x5555847210, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  6    Thread 0x7fa75fd830 (LWP 26937) &quot;dconf worker&quot;    
    0x0000007fb7061e14 in __GI___poll (fds=0x7f90000b80, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  7    Thread 0x7fa73fc830 (LWP 26938) &quot;gdbus&quot;           
    0x0000007fb7061e14 in __GI___poll (fds=0x7f94000b80, nfds=3, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  8    Thread 0x7fa67c2830 (LWP 27156) &quot;QThread&quot;         
    0x0000007fb7061e14 in __GI___poll (fds=0x7f880013d0, nfds=1, 
    timeout=<optimized out>)
    at ../sysdeps/unix/sysv/linux/poll.c:41
  9    Thread 0x7fa6487830 (LWP 27166) &quot;GeckoWorkerThre&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7eac001c90)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  11   Thread 0x7fa6286830 (LWP 27168) &quot;QSGRenderThread&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x5555c6e73c)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  12   Thread 0x7fa5ea6830 (LWP 27177) &quot;IPC I/O Parent&quot;  syscall () 
    at ../sysdeps/unix/sysv/linux/aarch64/syscall.S:39
  13   Thread 0x7fa44d0830 (LWP 27181) &quot;Netlink Monitor&quot; 
    0x0000007fb7061e14 in __GI___poll (fds=fds@entry=0x7fa44cfbe8, 
    nfds=nfds@entry=2,
    timeout=<optimized out>) at ../sysdeps/unix/sysv/linux/poll.c:41
  14   Thread 0x7fa448f830 (LWP 27182) &quot;Socket Thread&quot;   
    0x0000007fb7061e14 in __GI___poll (fds=fds@entry=0x7fa448e800, 
    nfds=nfds@entry=2,
    timeout=timeout@entry=7000) at ../sysdeps/unix/sysv/linux/poll.c:41
  15   Thread 0x7f002fd830 (LWP 27183) &quot;TaskCon~read #0&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  16   Thread 0x7efbffe830 (LWP 27184) &quot;TaskCon~read #1&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  17   Thread 0x7efbdff830 (LWP 27185) &quot;TaskCon~read #2&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  18   Thread 0x7efbc00830 (LWP 27186) &quot;TaskCon~read #3&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  19   Thread 0x7efba01830 (LWP 27187) &quot;TaskCon~read #4&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c030910)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  20   Thread 0x7efb802830 (LWP 27188) &quot;TaskCon~read #5&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  21   Thread 0x7efb603830 (LWP 27189) &quot;TaskCon~read #6&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  22   Thread 0x7efb404830 (LWP 27190) &quot;TaskCon~read #7&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c030914)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  24   Thread 0x7fa43b7830 (LWP 27192) &quot;Timer&quot;           
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7fa43b6b58,
    clockid=<optimized out>, expected=0, futex_word=0x7f8c031588) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  25   Thread 0x7fa4376830 (LWP 27193) &quot;IPDL Background&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c448b90)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  26   Thread 0x7fa4335830 (LWP 27194) &quot;Cache2 I/O&quot;      
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c575320)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  27   Thread 0x7fa40fe830 (LWP 27195) &quot;Cookie&quot;          
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c62b530)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  28   Thread 0x7fa40bd830 (LWP 27196) &quot;StreamTrans #1&quot;  
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7fa40bcb28,
    clockid=<optimized out>, expected=0, futex_word=0x7f8c2852fc) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  29   Thread 0x7efb0fe830 (LWP 27203) &quot;Backgro~Pool #1&quot; 
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7efb0fdb28,
    clockid=<optimized out>, expected=0, futex_word=0x7f8c0312a8) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  30   Thread 0x7efb0bd830 (LWP 27204) &quot;ProxyResolution&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c9ffb70)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  31   Thread 0x7efaffa830 (LWP 27205) &quot;Worker Launcher&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c983a20)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  32   Thread 0x7efafb9830 (LWP 27209) &quot;StreamTrans #2&quot;  
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7efafb8b28,
    clockid=<optimized out>, expected=0, futex_word=0x7f8c2852fc) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  33   Thread 0x7efaf78830 (LWP 27211) &quot;QuotaManager IO&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7ecc003dd4)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  34   Thread 0x7fa43f8830 (LWP 27212) &quot;StreamTrans #3&quot;  
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7fa43f7b28,
    clockid=<optimized out>, expected=0, futex_word=0x7f8c2852fc) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  35   Thread 0x7efaf37830 (LWP 27213) &quot;DOM Worker&quot;      
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8cc1be6c)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  36   Thread 0x7efad38830 (LWP 27214) &quot;Softwar~cThread&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7efad37cc8)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  37   Thread 0x7efacf7830 (LWP 27215) &quot;Compositor&quot;      
    __GI__dl_debug_state () at dl-debug.c:74
  38   Thread 0x7efaca6830 (LWP 27216) &quot;ImageIO&quot;         
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8ccc2500)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  39   Thread 0x7efac65830 (LWP 27217) &quot;TRR Background&quot;  
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8ca94ca0)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  40   Thread 0x7efac24830 (LWP 27218) &quot;DNS Resolver #1&quot; 
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7efac239e8,
    clockid=<optimized out>, expected=0, futex_word=0x7f8ccc8748) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  41   Thread 0x7efabe3830 (LWP 27219) &quot;IndexedDB #1&quot;    
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7ecc0059a0)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  42   Thread 0x7efaba2830 (LWP 27220) &quot;StreamTrans #4&quot;  
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7efaba1b28,
    clockid=<optimized out>, expected=0, futex_word=0x7f8c2852fc) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
  43   Thread 0x7fa607e830 (LWP 27221) &quot;ImageBridgeChld&quot; 
    futex_wait_cancelable (private=128, expected=0, futex_word=0x7f8c7736d0)
    at ../sysdeps/unix/sysv/linux/futex-internal.h:80
  44   Thread 0x7fa603d830 (LWP 27232) &quot;SSL Cert #1&quot;     
    futex_abstimed_wait_cancelable (private=<optimized out>, 
    abstime=0x7fa603cb28, 
    clockid=<optimized out>, expected=0, futex_word=0x7ef4001a88) at ../sysdeps/
    unix/sysv/linux/futex-internal.h:208
(gdb) thread 11
[Switching to thread 11 (Thread 0x7fa6286830 (LWP 27168))]
#0  futex_wait_cancelable (private=128, expected=0, futex_word=0x5555c6e73c) at 
    ../sysdeps/unix/sysv/linux/futex-internal.h:80
80        int err = lll_futex_timed_wait (futex_word, expected, NULL, private);
(gdb) bt
#0  futex_wait_cancelable (private=128, expected=0, futex_word=0x5555c6e73c) at 
    ../sysdeps/unix/sysv/linux/futex-internal.h:80
#1  __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x5555c6e6e0, 
    cond=0x5555c6e710) at pthread_cond_wait.c:508
#2  __pthread_cond_wait (cond=0x5555c6e710, mutex=0x5555c6e6e0) at 
    pthread_cond_wait.c:638
#3  0x0000007fb74fbefc in QWaitCondition::wait(QMutex*, unsigned long) () from /
    usr/lib64/libQt5Core.so.5
#4  0x0000007fb86a354c in ?? () from /usr/lib64/libQt5Quick.so.5
#5  0x0000007fb86a56e8 in ?? () from /usr/lib64/libQt5Quick.so.5
#6  0x0000007fb74fb6a8 in ?? () from /usr/lib64/libQt5Core.so.5
#7  0x0000007fb73dab98 in start_thread (arg=0x7fa6286130) at pthread_create.c:
    479
#8  0x0000007fb706b7cc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/
    clone.S:78
(gdb) thread 37
[Switching to thread 37 (Thread 0x7efacf7830 (LWP 27215))]
#0  __GI__dl_debug_state () at dl-debug.c:74
74      }
(gdb) bt
#0  __GI__dl_debug_state () at dl-debug.c:74
#1  0x0000007fbfcd2038 in dl_open_worker (a=a@entry=0x7efacf5180) at dl-open.c:
    292
#2  0x0000007fb70aa2a4 in __GI__dl_catch_exception (exception=0x7efacf5168, 
    operate=0x7fbfcd1f10 <dl_open_worker>, args=0x7efacf5180)
    at dl-error-skeleton.c:196
#3  0x0000007fbfcd1a6c in _dl_open (file=0x7efacf5498 &quot;/usr/lib64/
    libhybris//eglplatform_wayland.so&quot;, mode=-2147483647,
    caller_dlopen=0x7fb6bbcb04 <ws_init+260>, nsid=-2, argc=1, 
    argv=0x7ffffff2a8, env=0x5555b50470) at dl-open.c:592
#4  0x0000007fb89c6274 in dlopen_doit (a=a@entry=0x7efacf5428) at dlopen.c:66
#5  0x0000007fb70aa2a4 in __GI__dl_catch_exception (
    exception=exception@entry=0x7efacf53b0, operate=0x7fb89c6210 <dlopen_doit>, 
    args=0x7efacf5428)
    at dl-error-skeleton.c:196
#6  0x0000007fb70aa350 in __GI__dl_catch_error (objname=0x7e98000b90, 
    errstring=0x7e98000b98, mallocedp=0x7e98000b88, operate=<optimized out>,
    args=<optimized out>) at dl-error-skeleton.c:215
#7  0x0000007fb89c6b20 in _dlerror_run (operate=operate@entry=0x7fb89c6210 
    <dlopen_doit>, args=args@entry=0x7efacf5428) at dlerror.c:170
#8  0x0000007fb89c6314 in __dlopen (file=<optimized out>, mode=<optimized out>) 
    at dlopen.c:87
#9  0x0000007fb6bbcb04 in ws_init () from /usr/lib64/libEGL.so.1
#10 0x0000007fb6bbb478 in ?? () from /usr/lib64/libEGL.so.1
#11 0x0000007fba06b6c4 in mozilla::gl::GLLibraryEGL::fGetDisplay (
    display_id=0x0, this=0x7e981119f0)
    at gfx/gl/GLLibraryEGL.h:193
#12 mozilla::gl::GetAndInitDisplay (egl=..., displayType=displayType@entry=0x0, 
    display=display@entry=0x0)
    at gfx/gl/GLLibraryEGL.cpp:151
#13 0x0000007fba06bc74 in mozilla::gl::GLLibraryEGL::CreateDisplay (
    this=this@entry=0x7e981119f0, forceAccel=forceAccel@entry=false,
    out_failureId=out_failureId@entry=0x7efacf5fe0, aDisplay=aDisplay@entry=0x0)
    at gfx/gl/GLLibraryEGL.cpp:813
#14 0x0000007fba06cd5c in mozilla::gl::GLLibraryEGL::DefaultDisplay (
    this=0x7e981119f0, out_failureId=out_failureId@entry=0x7efacf5fe0)
    at gfx/gl/GLLibraryEGL.cpp:745
#15 0x0000007fba06ce7c in mozilla::gl::GLContextProviderEGL::
    CreateWrappingExisting (aContext=0x7e98004230, aSurface=0x5555c6df20,
    aDisplay=<optimized out>)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/StaticPtr.h:150
#16 0x0000007fbca77924 in mozilla::embedlite::nsWindow::GetGLContext (
    this=this@entry=0x7f8c61a450)
    at mobile/sailfishos/embedshared/nsWindow.cpp:405
#17 0x0000007fbca77adc in mozilla::embedlite::nsWindow::GetNativeData (
    this=0x7f8c61a450, aDataType=12)
    at mobile/sailfishos/embedshared/nsWindow.cpp:173
#18 0x0000007fba0e8928 in mozilla::layers::CompositorOGL::CreateContext (
    this=this@entry=0x7e98111220)
    at gfx/layers/opengl/CompositorOGL.cpp:232
#19 0x0000007fba0fdb50 in mozilla::layers::CompositorOGL::Initialize (
    this=0x7e98111220, out_failureReason=0x7efacf65a0)
    at gfx/layers/opengl/CompositorOGL.cpp:387
#20 0x0000007fba21d584 in mozilla::layers::CompositorBridgeParent::
    NewCompositor (this=this@entry=0x7f8cb1f6e0, aBackendHints=...)
    at gfx/layers/ipc/CompositorBridgeParent.cpp:1493
#21 0x0000007fba2343e8 in mozilla::layers::CompositorBridgeParent::
    InitializeLayerManager (this=this@entry=0x7f8cb1f6e0, aBackendHints=...)
    at gfx/layers/ipc/CompositorBridgeParent.cpp:1436
#22 0x0000007fba234574 in mozilla::layers::CompositorBridgeParent::
    AllocPLayerTransactionParent (this=this@entry=0x7f8cb1f6e0, 
    aBackendHints=..., aId=...)
    at gfx/layers/ipc/CompositorBridgeParent.cpp:1546
#23 0x0000007fbca5eda4 in mozilla::embedlite::EmbedLiteCompositorBridgeParent::
    AllocPLayerTransactionParent (this=0x7f8cb1f6e0, aBackendHints=...,
    aId=...) at mobile/sailfishos/embedthread/
    EmbedLiteCompositorBridgeParent.cpp:80
#24 0x0000007fb9af84f4 in mozilla::layers::PCompositorBridgeParent::
    OnMessageReceived (this=0x7f8cb1f6e0, msg__=...) at 
    PCompositorBridgeParent.cpp:1285
#25 0x0000007fb9b49158 in mozilla::layers::PCompositorManagerParent::
    OnMessageReceived (this=<optimized out>, msg__=...)
    at PCompositorManagerParent.cpp:200
#26 0x0000007fb9a47e24 in mozilla::ipc::MessageChannel::DispatchAsyncMessage (
    this=this@entry=0x7f8c61ad38, aProxy=aProxy@entry=0x7e98107140, aMsg=...)
    at ipc/glue/MessageChannel.cpp:2076
#27 0x0000007fb9a56f48 in mozilla::ipc::MessageChannel::DispatchMessage (
    this=this@entry=0x7f8c61ad38, aMsg=...)
    at ipc/glue/MessageChannel.cpp:2001
#28 0x0000007fb9a58a3c in mozilla::ipc::MessageChannel::RunMessage (
    this=0x7f8c61ad38, aTask=...)
    at ipc/glue/MessageChannel.cpp:1860
#29 0x0000007fb9a58bc4 in mozilla::ipc::MessageChannel::MessageTask::Run (
    this=0x7f8ccd8b90)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/ipc/MessageChannel.h:
    588
#30 0x0000007fb962ec98 in nsThread::ProcessNextEvent (this=0x7f8ccac4d0, 
    aMayWait=<optimized out>, aResult=0x7efacf6d07)
    at xpcom/threads/nsThread.cpp:1146
#31 0x0000007fb961ce84 in NS_ProcessNextEvent (aThread=<optimized out>, 
    aThread@entry=0x7f8ccac4d0, aMayWait=aMayWait@entry=true)
    at xpcom/threads/nsThreadUtils.cpp:466
#32 0x0000007fb9a3c57c in mozilla::ipc::MessagePumpForNonMainThreads::Run (
    this=0x7e98001840, aDelegate=0x7efacf6e00)
    at ipc/glue/MessagePump.cpp:330
#33 0x0000007fb99f9884 in MessageLoop::RunInternal (
    this=this@entry=0x7efacf6e00)
    at ipc/chromium/src/base/message_loop.cc:359
#34 0x0000007fb99f9ac4 in MessageLoop::RunHandler (this=0x7efacf6e00)
    at ipc/chromium/src/base/message_loop.cc:352
#35 MessageLoop::Run (this=this@entry=0x7efacf6e00) at ipc/chromium/src/base/
    message_loop.cc:334
#36 0x0000007fb9630730 in nsThread::ThreadFunc (aArg=0x7f8cc32c10) at xpcom/
    threads/nsThread.cpp:392
#37 0x0000007fb8a10bf4 in _pt_root (arg=0x7f8ccac630) at ../../.././nspr/pr/src/
    pthreads/ptthread.c:201
#38 0x0000007fb73dab98 in start_thread (arg=0x7efacf7130) at pthread_create.c:
    479
#39 0x0000007fb706b7cc in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/
    clone.S:78
(gdb)
Unfortunately after stepping through the code very carefully, increasing the debug output and picking out relevant backtraces from the many threads running when the crash occurs, doesn't seem to have brought me closer to solving the problem. Maybe it's helped get me more familiar with these pieces of code, but not much else. It looks like I'm going to have to compare against ESR 78 execution again, which is a bit awkward because I've just installed ESR 91 over the phone that was running ESR 78. So I'll likely have to reinstall ESR 78 on at least one of my phones.

With all this in mind, it seems I'm going to have to return to this in the morning. I've spent a lot of the day investigating, without spending any time actually coding and without any hint of a fix yet. So there's going to have to be a lot more work on this before the browser is successfully running on Sailfish OS 4.6.

If you'd like to read any of my other gecko diary entries, they're all available on my Gecko-dev Diary page.

Comments

Uncover Disqus comments