Bug 201771 - [WPE][GTK] BubblewrapLauncher leaks D-Bus proxy sockets
Summary: [WPE][GTK] BubblewrapLauncher leaks D-Bus proxy sockets
Status: RESOLVED FIXED
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: Bubblewrap
  Show dependency treegraph
 
Reported: 2019-09-13 14:06 PDT by Michael Catanzaro
Modified: 2022-02-11 00:32 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.01 KB, patch)
2022-02-10 04:32 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Patch (3.01 KB, patch)
2022-02-10 05:56 PST, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2019-09-13 14:06:44 PDT
I have a bunch of D-Bus proxy sockets leaked on the filesystem, created by the XDGDBusProxyLauncher class in BubblewrapLauncher.cpp. We shouldn't leak temporary files to disk; they should be removed when the web process quits.

It's kinda hard to do if the xdg-dbus-proxy process itself isn't responsible for removing its socket. Why does WebKit have to create the socket file itself?
Comment 1 Carlos Garcia Campos 2022-02-10 04:28:55 PST
xdg-dbus-proxy removes the socket when the sync fd is closed by the application. In most of the cases the xdg-dbus-proxy process is killed before the sync fd is closed and the socket file is leaked. We should explicitly close the sync fd.
Comment 2 Carlos Garcia Campos 2022-02-10 04:32:36 PST
Created attachment 451518 [details]
Patch

This patch applyes on top of patch attached to bug #236437
Comment 3 Carlos Garcia Campos 2022-02-10 05:56:17 PST
Created attachment 451522 [details]
Patch
Comment 4 Carlos Garcia Campos 2022-02-11 00:32:48 PST
Committed r289608 (247121@trunk): <https://commits.webkit.org/247121@trunk>