Bug 220335 - [WPE][GTK] File descriptor leak
Summary: [WPE][GTK] File descriptor leak
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-05 13:14 PST by Michael Catanzaro
Modified: 2021-02-23 13:13 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2021-01-05 13:14:57 PST
Open MiniBrowser (or Epiphany), launch five browser tabs, and use gnome-system-monitor to inspect the open files of the first and last WebKitWebProcess. Do not use flatpak, because when running Epiphany under flatpak, everything seems fine for some reason I don't understand. But when running outside flatpak, I see the number of local sockets usually -- but not always -- increases by 2 for each web process launched. We are leaking some file descriptors... somewhere.

Sadly, this is going to be hard to debug.
Comment 1 Michael Catanzaro 2021-01-18 09:07:28 PST
From bug #220090, we can probably avoid this by removing G_SUBPROCESS_FLAGS_INHERIT_FDS, but to do that we need a way to exempt the WPE render host socket by passing it to ProcessLauncher and from there to g_subprocess_launcher_take_fd(). r241816 -- which seemed like a nice cleanup at the time -- made this harder.
Comment 2 Michael Catanzaro 2021-02-23 13:13:55 PST
I tracked this down to wpebackend-fdo, https://github.com/Igalia/WPEBackend-fdo/pull/136.