Bug 358751 - konsole loses file descriptors and eventually runs out of them and crashes
Summary: konsole loses file descriptors and eventually runs out of them and crashes
Status: RESOLVED WORKSFORME
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 15.12.3
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-29 22:03 UTC by Karsten Künne
Modified: 2018-11-01 18:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Künne 2016-01-29 22:03:32 UTC
If I start a fresh konsole process it has 3 socket connections open. If I work for a while and then check again the number of sockets belonging to konsole increases. This is going on until konsole reaches the file descriptor limit and either won't let me open more sessions or crashes. Most of the socket connections are between itself. Following is the current situation on my desktop for instance (netstat_unix is a simple script which adds the other end of a socket to the output):

./netstat_unix | grep konsole
Warning: couldn't map 4 sockets.
unix  3      [ ]         STREAM     CONNECTED     58236419 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58236420 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58244071 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58232305 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58209503 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58196821 1997/dbus-daemon   25237/konsole               @/tmp/dbus-ZwOV6P0BFv
unix  3      [ ]         STREAM     CONNECTED     58197623 25237/konsole      2054/ksmserver              
unix  3      [ ]         STREAM     CONNECTED     58244072 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58209504 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58212918 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58236369 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58304458 665/dbus-daemon    25237/konsole               /var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     58196824 1885/Xorg          25237/konsole               @/tmp/.X11-unix/X0
unix  3      [ ]         STREAM     CONNECTED     58236370 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58214076 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58197618 25237/konsole      1997/dbus-daemon            
unix  3      [ ]         STREAM     CONNECTED     58215713 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58215714 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58214075 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58209509 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58212919 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58232306 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58208783 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58208784 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58209508 25237/konsole      25237/konsole               
unix  3      [ ]         STREAM     CONNECTED     58305787 25237/konsole      665/dbus-daemon             
unix  3      [ ]         STREAM     CONNECTED     58199112 2054/ksmserver [kd 25237/konsole             e @/tmp/.ICE-unix/2054
unix  3      [ ]         STREAM     CONNECTED     58197622 25237/konsole      1885/Xorg                   


Over time the number of sockets from konsole process 25237 to itself will continue to rise.
This is with Version 15.12.0, Using: 
KDE Frameworks 5.16.0
Qt 5.5.1 (built against 5.5.0)
The xcb windowing system

on OpenSUSE Leap 42.1


Reproducible: Always
Comment 1 Karsten Künne 2016-04-22 19:33:23 UTC
Any news on this issue? It happens every other day and is quite annoying. For instance, today:

lsof -p 26307 | grep socket | wc
    963    8667   75114

(26307 is the pid of konsole)

It basically looks like that (lsof -p 26307):
...
konsole 26307 user   93u  unix 0xffff88012e1ec400      0t0 100037400 socket
konsole 26307 user   94u  unix 0xffff8800471bdc00      0t0 100058007 socket
konsole 26307 user   95u  unix 0xffff8800471bd480      0t0 100058008 socket
konsole 26307 user   96u  unix 0xffff88016a945480      0t0 100061420 socket
konsole 26307 user   97u  unix 0xffff88000f839080      0t0 100061421 socket
konsole 26307 user   98u  unix 0xffff880178d6d480      0t0 100062430 socket
konsole 26307 user   99u  unix 0xffff880178d6dc00      0t0 100062431 socket
konsole 26307 user  100u  unix 0xffff8801201f0800      0t0 100063827 socket
konsole 26307 user  101u  unix 0xffff8801318010c0      0t0 100063828 socket
konsole 26307 user  102u  unix 0xffff8801f9a0ec00      0t0 100067538 socket
.... 
....    (that goes on for many many more lines)
....
konsole 26307 user 1018u  unix 0xffff880121886c00      0t0 142460886 socket
konsole 26307 user 1019u  unix 0xffff88026debb080      0t0 142460887 socket
konsole 26307 user 1020u  unix 0xffff88004869e440      0t0 142461875 socket
konsole 26307 user 1021u  unix 0xffff880120a4cb80      0t0 142461876 socket
konsole 26307 user 1022u  unix 0xffff88021f862b80      0t0 142542903 socket
konsole 26307 user 1023u  unix 0xffff88021f8627c0      0t0 142542904 socket

And it has eaten up all the file descriptors.
Comment 2 Andrew Crouthamel 2018-11-01 13:43:05 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Karsten Künne 2018-11-01 15:34:58 UTC
I haven't seen it with konsole 18.07.80 in OpenSUSE Leap 15.0. So, you can probably close this bug.
Comment 4 Karsten Künne 2018-11-01 15:36:23 UTC
Forgot to change the status.
Comment 5 Andrew Crouthamel 2018-11-01 18:44:03 UTC
Thanks for the update!