Application crash on Jolla Phone 2026 (caused by .tdata ELF section)

REPRODUCIBILITY: 100%
OS VERSION: 5.2.0.17
HARDWARE: Jolla Phone 2026
UI LANGUAGE: not related (reported by various users)
REGRESSION: no (but it is hardware specific)

DESCRIPTION:

OSM Scout version 3.0, build by Sailfish SDK 5.1, is crashing on Jolla Phone 2026. It was reported by various users on Github, OpenRepos and forum. Abort is triggered by the QSGRenderThread thread, somewhere in /vendor/lib64/egl/mt6858/libGLES_mali.so library. When the application is build by the SDK 5.0 it is running fine.

With the AI agent and remote access to the J2 phone I was able to identify the root cause:
Crashing binary contains pre-initialized thread-local data (ELF section .tdata) that glibc copy to the thread structure of the every started thread. But even to the Bionic libc threads belonging to the Mali OpenGL driver (libGLES_mali.so) and it overrides Mali driver’s GL context slot. This action leads to the crash later.

Detailed description by the LLM: jolla-phone-bug-notes.md · GitHub

From the apps installed on my phone I found just one another containing .tdata section - MeeCast by @Vasvlad (crashes are reported in Harbour). But it may affect also other applications that will be build by the SDK 5.1 later, or I just do not have them installed!

readelf -SW /usr/bin/harbour-meecast  | grep  -E .tdata
  [20] .tdata            PROGBITS        00000000003859e0 3759e0 000008 00 WAT  0   0  8

Developers may be able to workaround it, but it would be great to avoid this bug completely by patching glibc or libhybris…

PRECONDITIONS:

Have Jolla Phone 2026 with Sailfish OS 5.2.0.17

STEPS TO REPRODUCE:

  1. Install OSM Scout on Jolla Phone 2026
  2. run it

EXPECTED RESULT:

Application is starting

ACTUAL RESULT:

Application is crashing

MODIFICATIONS:

none

ADDITIONAL INFORMATION:

all details in description

3 Likes

yet another reason to build 3rd party apps against older sdk versions :slightly_smiling_face:

But SDK 5.1 brings new compiler (GCC 13) and new CMake. Without it, I would be unable to compile (latest) Onnx runtime… It would be possible to distribute pre-compiled libraries the same way as Speech Note, but I prefer to compile all the vendored dependencies from the source…

understood. then it’s yet another reason to not require the latest compilers and tools when writing libraries :neutral_face: to avoid this domino effect. that’s none of your fault of course - you’re just unlucky that somebody didn’t care

I’ve just updated SailfisOS to version 5.2.0.22 on my SonyXperia 10V. And I don’t observe this problem.

Sony devices are not affected by this issue. Not sure why, I was not investigating that. The bionic libc used on the Sony devices is probably using different memory layout for thread stack.