Comment 2 for bug 1495871

Revision history for this message
Alexandros Frantzis (afrantzis) wrote : Re: unity8 leaks file descriptors

As mentioned in the description, one way to leak fds is just opening and closing an app. It leaks an fd of type 'anon_inode:[eventfd]' per app connection. I am attaching a simple script I used to reproduce this and track it over multiple app invocations.

Sample output from a run (omitting the lsof and /proc/*/fd information) is:

#### Starting at 2015-09-15T08:10:55+0000 ####
# Before fds: 119
# During fds: 131
# After fds: 120
#### Starting at 2015-09-15T08:11:02+0000 ####
# Before fds: 120
# During fds: 133
# After fds: 121
#### Starting at 2015-09-15T08:11:09+0000 ####
# Before fds: 121
# During fds: 134
# After fds: 122
#### Starting at 2015-09-15T08:11:16+0000 ####
# Before fds: 122
# During fds: 135
# After fds: 123
...

You can clearly see unity8 leaking one fd every time the app connects and disconnects.