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

            Bug ID: 478831
           Summary: Plasmashell runs out of filedescriptors when emacs
                    visits lotts of files
    Classification: Plasma
           Product: plasmashell
           Version: 5.27.8
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Session Management
          Assignee: plasma-b...@kde.org
          Reporter: goe...@uddeborg.se
  Target Milestone: 1.0

Created attachment 164340
  --> https://bugs.kde.org/attachment.cgi?id=164340&action=edit
Strace from plasmashell started shortly before the problem

SUMMARY
When I run an elisp program in my emacs, it very often results in the desktop
panel disappearing and the background goes black. It lasts for a couple of
seconds and then the panel and background reappears. The emacs program finishes
successfully and does not seem to be affected. In the journal there are those
messages from plasmashell.

dec 21 09:25:42 mimmi plasmashell[425833]: error marshalling arguments for
get_icon: dup failed: För många öppna filer
dec 21 09:25:42 mimmi plasmashell[425833]: Error marshalling request: För många
öppna filer
dec 21 09:25:42 mimmi plasmashell[425833]: The Wayland connection experienced a
fatal error: För många öppna filer
dec 21 09:25:42 mimmi systemd[416625]: plasma-plasmashell.service: Main process
exited, code=exited, status=1/FAILURE

"För många öppna filer" is Swedish for "Too many open files"

STEPS TO REPRODUCE
Running my emacs program as described above, but it somehow is dependent on my
environment. I've not been able to create an independent reproducer.

OBSERVED RESULT
Plasmashell exits with a failure. Systemd then starts a new instance, so the
desktop recovers.

EXPECTED RESULT
I don't understand why this affects plasmashell at all.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.11
Fedora 39

ADDITIONAL INFORMATION
This has happened for a while, it did not appear in any specific version.

The emacs program does a "grep" over files in my home directory and then emacs
visits the file positions listed by the "grep" command. The command typically
finds entries in up to 50 files, and the total number of hits could be in the
range of hundreds. The risk of triggering the problem seems to increase with
more matches, but it is hard to say exactly. As mentioned, I have tried to
reproduce with a set of test files in a simple environment, but been unable to
trigger it.

I started debugging by attatching an "strace" to plasmashell before running my
emacs function, and have a trace from where the problem is triggered. I note
that plasmashell is opening /sys/devices/system/cpu/online and creates pipes
over and over again, until it runs out of file descriptors. I attach the trace
hoping it might be of some help.

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

Reply via email to