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

[Bisected] [Regression 5.9 --> 5.11] Unusual disk access: GUI slows down

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P1: Critical
    • None
    • 5.11, 5.12
    • QPA: X11/XCB
    • None
    • Slackware 32bit-current, with X run as root
    • Linux/X11

    Description

      I suspect I have a pretty peculiar environment, since this regression is quite noticeable for me but nobody else seems to be affected.

      Anyway, commit 24adaa9a742e6f95ff897d0eb9a2bce0527dd042 (xcb: Fix access to shm for X server running from another user) made qt5 unusable on my system (Slackware 32bit-current, with X run as root). After this commit, pretty much any qt5 application seems to access the disk at any user interaction, slowing everything down massively (rusty old HD here). However, 'top' does not show anything unusual: 'iostat' does.

      Here's an example running qgit (https://github.com/tibirna/qgit). I'm just opening and then immediately closing the application. With qt 5.9, it starts in less than a second and closes immediately; with qt 5.12 it starts in about 15 seconds and closes in about 5 seconds (more if something else is using the disk).

      With qt 5.9:

      $ iostat -y 1 -z -s -h
       avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.0%    0.0%    0.0%    0.0%    0.0%    0.0%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 2.6%    0.0%    0.8%    1.5%    0.0%   95.2%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
          14.00         0.0k       320.0k       0.0k     320.0k sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 1.1%    0.0%    0.3%    0.9%    0.0%   97.7%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
           7.00         0.0k       208.0k       0.0k     208.0k sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 2.8%    0.0%    0.7%    0.0%    0.0%   96.6%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 2.7%    0.0%    1.0%    1.8%    0.0%   94.6%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
          26.00         0.0k       272.0k       0.0k     272.0k sda
      
      

       With qt 5.12:

      $ iostat -y 1 -z -s -h
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle         
                 0.0%    0.0%    0.0%    0.0%    0.0%    0.0%      
                                                                                      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device                
                                                                                      
                                                                                      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle                         
                 1.0%    0.0%    0.2%    0.0%    0.0%   98.8%         
                                                                                      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device                
                                                                                      
                                                                                      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle                         
                 2.7%    0.0%    0.9%    6.0%    0.0%   90.4%                         
                                                                                      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         310.00         0.0k         2.5M       0.0k       2.5M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.2%    8.3%    0.0%   90.7%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         524.00         0.0k         8.8M       0.0k       8.8M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.4%    7.9%    0.0%   90.9%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         583.00         0.0k        12.9M       0.0k      12.9M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.1%    8.2%    0.0%   90.9%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         518.00         0.0k         4.3M       0.0k       4.3M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.3%    8.2%    0.0%   90.8%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         524.00         0.0k         3.7M       0.0k       3.7M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 1.1%    0.0%    0.2%    8.5%    0.0%   90.2%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         436.00         0.0k         2.7M       0.0k       2.7M sda
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.3%    8.3%    0.0%   90.7%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         498.00         0.0k         2.4M       0.0k       2.4M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.7%    0.0%    0.2%    8.2%    0.0%   91.0%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         592.00         0.0k         9.2M       0.0k       9.2M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.2%    8.3%    0.0%   90.7%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         507.00         0.0k         2.4M       0.0k       2.4M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.3%    8.2%    0.0%   90.8%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         536.00         0.0k         4.0M       0.0k       4.0M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.1%    8.6%    0.0%   90.5%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         487.00         0.0k         2.6M       0.0k       2.6M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.2%    9.2%    0.0%   89.9%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         575.00         0.0k         3.9M       0.0k       3.9M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.6%    0.0%    0.2%    8.2%    0.0%   91.1%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         565.00         0.0k         8.6M       0.0k       8.6M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.7%    0.0%    0.2%    8.2%    0.0%   91.0%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         505.00         0.0k         2.5M       0.0k       2.5M sda
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.3%    8.1%    0.0%   90.9%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         544.00         0.0k         5.1M       0.0k       5.1M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.6%    0.0%    0.1%    8.6%    0.0%   90.7%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         501.00         0.0k         3.0M       0.0k       3.0M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.6%    0.0%    0.2%    8.2%    0.0%   91.1%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         540.00         0.0k         4.5M       0.0k       4.5M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.7%    0.0%    0.2%    8.1%    0.0%   91.1%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         546.00         0.0k         9.7M       0.0k       9.7M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.5%    0.0%    0.1%    8.2%    0.0%   91.2%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         496.00         0.0k         2.0M       0.0k       2.0M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.3%    8.0%    0.0%   91.0%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         584.00         0.0k         8.4M       0.0k       8.4M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.6%    0.0%    0.2%    8.1%    0.0%   91.1%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         552.00         0.0k         6.2M       0.0k       6.2M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.8%    0.0%    0.1%    8.2%    0.0%   91.0%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         582.00         0.0k         8.7M       0.0k       8.7M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.6%    0.0%    0.2%    8.6%    0.0%   90.6%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         556.00         0.0k         6.6M       0.0k       6.6M sda
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.6%    0.0%    0.1%    8.1%    0.0%   91.2%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         598.00         0.0k         8.2M       0.0k       8.2M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 2.1%    0.0%    0.3%    8.0%    0.0%   89.6%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         508.00         0.0k         3.8M       0.0k       3.8M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 0.7%    0.0%    0.3%    8.2%    0.0%   90.9%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
         737.00         0.0k        18.1M       0.0k      18.1M sda
      
      
      avg-cpu:  %user   %nice %system %iowait  %steal   %idle
                 1.8%    0.0%    0.4%    3.6%    0.0%   94.1%
      
            tps    kB_read/s     kB_w+d/s    kB_read     kB_w+d Device
          87.00         0.0k         2.0M       0.0k       2.0M sda
      
      

      I.e. tens of accesses to disk vs tens of tousands.

      I've verified that simply commenting the line

      #define XCB_USE_SHM_FD

      in src/plugins/platforms/xcb/qxcbbackingstore.cpp on top of v5.12.4 fixes the issue on my system.

      Now I'm not sure if my environment is somewhat messed up (any hint?), but it doesn't seem to have any problem with other libraries or applications.

       

      Attachments

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

        Activity

          People

            paeglis Gatis Paeglis
            chunga Michele Ballabio
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes