RESOLVED DUPLICATE of bug 279914 280180
[GTK] WebKitWebProcess left running when WebView is freed
https://bugs.webkit.org/show_bug.cgi?id=280180
Summary [GTK] WebKitWebProcess left running when WebView is freed
Milan Crha
Reported 2024-09-23 05:22:24 PDT
Created attachment 472638 [details] reproducer (wk2.c) Moving this from a downstream bug report: https://gitlab.gnome.org/GNOME/evolution/-/issues/2855 In short, when a user moves between mails in Evolution, each newly showed mail adds a new WebKitWebProcess and leaves behind running "the previous" WebKitWebProcess. This is new in the WebKitGTK 2.46.0 release. While it's much easier to reproduce under Evolution, I managed to reproduce something similar in an outside application (attached here). The first line contains how to compile and run it. Steps: 1. run `./wk2` - one WebKitWebProcess (with *two* of its bwrap-s) are running 2. click on the "Add Web View" button - two WebKitWebProcess-es (with *two* of its bwrap-s for each) are running 3. click on the "Reload" button near the bottom of the window - three WebKitWebProcess-es (with *two* of its bwrap-s for each) are running 4. click the "X" button beside the "Reload" button - two WebKitWebProcess-es (with *two* of its bwrap-s for each) are running The test app shows which WebKitWebView-s had been created and when they are freed, confirming they do not leak. I ran `ps ax | grep WebKitWebP` after each step and it shows this: $ ps ax | grep WebKitWebP (after step 1.) 7192 pts/0 S+ 0:00 /usr/bin/bwrap --args 129 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 16 121 120 7193 pts/0 S+ 0:00 /usr/bin/bwrap --args 129 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 16 121 120 7194 pts/0 SLl+ 0:00 /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 16 121 120 7228 pts/1 S+ 0:00 grep --color=auto WebKitWebP $ ps ax | grep WebKitWebP (after step 2.) 7192 pts/0 S+ 0:00 /usr/bin/bwrap --args 129 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 16 121 120 7193 pts/0 S+ 0:00 /usr/bin/bwrap --args 129 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 16 121 120 7194 pts/0 SLl+ 0:00 /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 16 121 120 7231 pts/0 S+ 0:00 /usr/bin/bwrap --args 139 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 26 131 133 7232 pts/0 S+ 0:00 /usr/bin/bwrap --args 139 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 26 131 133 7233 pts/0 SLl+ 0:00 /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 26 131 133 7250 pts/1 S+ 0:00 grep --color=auto WebKitWebP $ ps ax | grep WebKitWebP (after step 3.) 7231 pts/0 S+ 0:00 /usr/bin/bwrap --args 139 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 26 131 133 7232 pts/0 S+ 0:00 /usr/bin/bwrap --args 139 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 26 131 133 7233 pts/0 SLl+ 0:00 /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 26 131 133 7253 pts/0 S+ 0:00 /usr/bin/bwrap --args 142 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 33 133 136 7254 pts/0 S+ 0:00 /usr/bin/bwrap --args 142 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 33 133 136 7255 pts/0 SLl+ 0:00 /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 33 133 136 7273 pts/0 S+ 0:00 /usr/bin/bwrap --args 146 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 38 137 139 7274 pts/0 S+ 0:00 /usr/bin/bwrap --args 146 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 38 137 139 7277 pts/0 SLl+ 0:00 /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 38 137 139 7289 pts/1 S+ 0:00 grep --color=auto WebKitWebP $ ps ax | grep WebKitWebP (after step 4.) 7253 pts/0 S+ 0:00 /usr/bin/bwrap --args 142 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 33 133 136 7254 pts/0 S+ 0:00 /usr/bin/bwrap --args 142 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 33 133 136 7255 pts/0 SLl+ 0:00 /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 33 133 136 7273 pts/0 S+ 0:00 /usr/bin/bwrap --args 146 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 38 137 139 7274 pts/0 S+ 0:00 /usr/bin/bwrap --args 146 -- /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 38 137 139 7277 pts/0 SLl+ 0:00 /usr/libexec/webkit2gtk-4.1/WebKitWebProcess 38 137 139 7294 pts/1 S+ 0:00 grep --color=auto WebKitWebP
Attachments
reproducer (wk2.c) (12.45 KB, text/plain)
2024-09-23 05:22 PDT, Milan Crha
no flags
Michael Catanzaro
Comment 1 2024-09-23 05:56:49 PDT
Unfortunately I'm totally unable to reproduce this in Evolution, which makes it hard to help. I'll try running your test application, though, and let you know what I see in the other bug report. *** This bug has been marked as a duplicate of bug 279914 ***
Note You need to log in before you can comment on or make changes to this bug.