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

Critical memory leak in fix for QTBUG-89176

    XMLWordPrintable

Details

    • Linux/X11
    • d2e2d0d3a6249ccbc17ec92acb32fec9a0d71807, baa035684998616ec47bd4812fa24d25d1f5da2b

    Description

      There is a critical regression in the fix for QTBUG-89176

      I'm testing Qt 6.0.0 with the patch from https://code.qt.io/cgit/qt/qtbase.git/patch/?id=b97001aa1cbd21008ebc48fe61b15fbcacb14875

      While testing for a few weeks with the patched Qt 6.0.0,  the program uses over 1 GB of memory. Normally it stays steady around 200 MB.

      When testing with no internet connection, the memory usage grows over 1 GB in a few minutes. See screenshot. This does not occur when not using the patch.

      LeakSanitizer is showing no leaks (just a few alsa and fontfconfig ones that have always been there, but nothing related to my code or Qt).
      I can reproduce the same on both openSUSE LP 15.2 and tumbleweed.
      I suspect that Qt 6 is allocating some memory that isn't freed but is still ref'ed and free'ed on exit.

      Looks like the problem occurs when using more than one host address.

      Easy way to reproduce with strawberry:

      1. Clone: https://github.com/strawberrymusicplayer/strawberry
      2. Disconnect from the internet
      3. Edit src/core/networkaccessmanager.cpp and remove setCache(new ThreadSafeNetworkDiskCache(this));
      4. Configure with: cmake .. -DBUILD_WITH_QT6=ON
      5. In Tools / Settings / Lyrics: check all providers.
      6. Add some songs to the playlist, switch between the songs.
      7. Watch the memory usage grow.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            manordheim Mårten Nordheim
            jonaski Jonas Kvinge
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes