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

WebEngine freezes UI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P1: Critical P1: Critical
    • None
    • 6.9.3, 6.10.0
    • WebEngine
    • None
    • Ubuntu 24.04
    • Linux/X11

      Using Qt WebEngine can completely freeze the UI.
      It seems to be caused by a deadlock; after attaching gdb the main thread is blocked inside QBasicMutex::lockInternal()

      I was able to reproduce with

      • 6.9.3 and 6.10.0 official releases
      • a custom release build of 6.9.3
      • a custom release build of Qt WebEngine 6.9.3 build against Qt 6.9.2

      I was not able to reproduce with 6.9.2

      It is possible to reproduce the issue with the simplebrowser demo.
      However it takes a bit of playing with the app before it freezes and it occurs a bit randomly.


       

      I was able to reproduce the issue with a developer build.
      I found 3 threads blocked on something related to Skia (see attached images), other threads did not seem to be blocked on something interesting.

      The only change I found between 6.9.2 and 6.9.3 related to Skia is the fix for QTBUG-138641 : https://codereview.qt-project.org/c/qt/qtwebengine/+/667817

      After reverting it locally, I could not reproduce the issue.
      However given that the fix is a bit random, I will run more tests later to be sure it is related to this change or if I was just lucky it did not freeze.


      I was able to reproduce the freeze with https://codereview.qt-project.org/c/qt/qtwebengine/+/667817 reverted so it is not the root cause of the freeze.
      However it is much easier to reproduce with this commit than without it.
      With simplebrowser:

      • with 6.9.3 I could easily freeze the app under 1min of playing with it
      • with 6.93 + the commit reverted it took me more than 5 minutes of clicking on every links to get it

      With my own app:

      • with 6.9.3, the app freezes in 1 or 2 interactions
      • with 6.9.3 + the commit reverted I was not able to reproduce it (yet?)

      For now I had the issue on 2 laptops:

      1. Kubuntu 24.04
        X11
        Linux 6.14.0-1013-oem
        Intel Core Ultra 7 165H
        nVidia RTX 500
      2. Ubuntu 24.04
        Wayland
        Linux 6.14.0-33-generic
        Intel Core Ultra 7 165U

        1. stacktrace_6.9.3_2.png
          110 kB
          Benjamin Terrier
        2. stacktrace_6.9.3_3.png
          92 kB
          Benjamin Terrier
        3. stacktrace_6.9.3.png
          127 kB
          Benjamin Terrier
        4. stacktraces.txt
          53 kB
          Benjamin Terrier
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qt_webengine_team Qt WebEngine Team
            bterrier Benjamin Terrier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes