Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-82186

Wrong load order of libraries breaks WebEngine sandbox

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.2
    • 5.14.1, 5.15.0 Alpha
    • WebEngine
    • None
    • openSUSE Tumbleweed
    • Linux/Wayland, Linux/X11

    Description

      Currently time elated functions are broken, which leads to issues like videos not playing.
      The error message

      [1:1:0215/132308.677912:ERROR:libc_interceptor.cc(208)] Your system is broken: dlsym doesn't work! This has been reported to be caused by Nvidia's libGL. You should expect time related functions to misbehave. https://bugs.chromium.org/p/chromium/issues/detail?id=16800
      

      appears on startup.

      No nvidia driver is installed. Instead, this is caused by the following issue:

      QtWebEngineProcess calls dlsym(RTLD_NEXT, "localtime") from libQt5WebEngineCore.so.5, which only looks into libc.so.6 if it's after libQt5WebEngineCore.so.5 in the library search order.

      https://code.qt.io/cgit/qt/qtwebengine-chromium.git/tree/chromium/sandbox/linux/services/libc_interceptor.cc?h=77-based&id=432e1a9b1a0fc3be1035adde2d36aff573679c86#n194

      This is not always the case though. For recent systems, the order of DT_NEEDED entries in QtWebEngineProcess changed.

      Broken:

      # readelf -d /usr/lib64/qt5/libexec/QtWebEngineProcess 
      
      Dynamic section at offset 0x2db0 contains 30 entries:
        Tag        Type                         Name/Value
       0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
       0x0000000000000001 (NEEDED)             Shared library: [libQt5Core.so.5]
       0x0000000000000001 (NEEDED)             Shared library: [libQt5WebEngineCore.so.5]
       0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
      

      Working:

      # readelf -d /usr/lib64/qt5/libexec/QtWebEngineProcess 
      
      Dynamic section at offset 0x1db0 contains 30 entries:
        Tag        Type                         Name/Value
       0x0000000000000001 (NEEDED)             Shared library: [libQt5Core.so.5]
       0x0000000000000001 (NEEDED)             Shared library: [libQt5WebEngineCore.so.5]
       0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
       0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
      

      Originally reported as https://bugzilla.opensuse.org/show_bug.cgi?id=1163744.

      Attachments

        For Gerrit Dashboard: QTBUG-82186
        # Subject Branch Project Status CR V

        Activity

          People

            juri.valdmann Jüri Valdmann (Inactive)
            vogtinator Fabian Vogt
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes