https://bugs.kde.org/show_bug.cgi?id=528815

            Bug ID: 528815
           Summary: plasmashell re-saves
                    plasma-org.kde.plasma.desktop-appletsrc every 0.5s w/
                    fdatasync(); constant disk writes
    Classification: Plasma
           Product: plasmashell
      Version First 6.8.2
       Reported In:
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: generic-performance
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: 1.0

DESCRIPTION
After the session had been running for a while, plasmashell began rewriting
~/.config/plasma-org.kde.plasma.desktop-appletsrc 2x per second. Each save uses
the atomic temp file, fdatasync(), then rename pattern. The file's contents
were identical between saves, so only mtime changed.  Restarting plasmashell
stopped the behavior immediately.

STEPS TO REPRODUCE
I don't have a reliable reproducer. The loop started at some point in a
long-running session (the time and trigger are unknown), and it was not present
on a fresh plasmashell start. I did not capture what triggered it.

OBSERVED
- strace -f -y -tt -e trace=fdatasync,fsync -p $(pidof plasmashell) showed two
syncs every 500 ms, indefinitely:

fdatasync(30</home/USER/.config/plasma-org.kde.plasma.desktop-appletsrc.lock>)
= 0
fdatasync(34</home/USER/.config/#1202340>(deleted)) = 0

  The calls repeat roughly 0.5 s apart, and the temp file name changes on each
cycle.

- Two copies of plasma-org.kde.plasma.desktop-appletsrc taken 3 s apart were
byte-identical (diff empty), while the file's mtime kept advancing (~12 KB
file).

- The file has 93 [Containments] entries, with 4 copies each of org.kde.panel,
kickoff, digital clock and task manager. It looks like stale panels or
containments left over from earlier monitor or screen changes. I haven't
verified that they are stale, and I don't know whether they're related.

EXPECTED RESULT
Unchanged configuration should not be re-saved. 

SOFTWARE/OS VERSIONS
Fedora 44.
KDE Plasma Version: 6.8.2
KDE Frameworks Version: 6.31.0
Qt Version: 6.11.2

ADDITIONAL INFORMATION
kquitapp6 plasmashell && kstart plasmashell stopped the writes.

- 4 panels or containments with duplicate widgets are present in the config,
probably from multi-monitor changes.

- Not verified, but the symptom looks like a debounced config-save timer that
re-arms itself without a real change. Related but different reports: Bug 456388
(https://bugs.kde.org/show_bug.cgi?id=456388) (heavy plasmashell disk writes,
Plasma 5.24) and Bug 523805 (https://bugs.kde.org/show_bug.cgi?id=523805)
(pipeline cache written on every notification).

- If it recurs, I'll attach a stack trace of what triggers the save and an
inotifywait log of the file.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to