Bug 186663

Summary: [GTK][WKE] Disable memory pressure handling when running layout tests (WTR)
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WebKitGTKAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bugs-noreply, calvaris, cgarcia, mcatanzaro, pnormand
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=172693
https://bugs.webkit.org/show_bug.cgi?id=154254
Attachments:
Description Flags
Patch mcatanzaro: review+

Description Carlos Alberto Lopez Perez 2018-06-15 09:16:59 PDT
It seems a good amount of flakiness in the GTK and WPE layout tests is caused by the in-webprocess memory pressure monitor.

You can see that in the following logs:

https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r232868%20(7018)/results.html <-- the crash is our memory pressure killer
https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r232867%20(7017)/results.html <-- second crash is our memory pressure killer
https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r232866%20(7016)/results.html <-- the crash is our memory pressure killer
https://build.webkit.org/results/GTK%20Linux%2064-bit%20Release%20(Tests)/r232864%20(7015)/results.html <-- first crash


If it helped us find tests using too much memory, it might be useful, but it does not because the test that dies is probably just running in a process that previously leaked a bunch of memory... i.e. the test that is killed is probably not the test that has a real problem.

The ideal solution would be to fix the cause of those leaks that accumulate over the course of those runs.

But meanwhile we don't have that right fix a workaround that we can do now to avoid flakiness in our tests is to disable this memory pressure monitor when running with WTR.
Comment 1 Carlos Alberto Lopez Perez 2018-06-15 10:01:33 PDT
Created attachment 342820 [details]
Patch
Comment 2 Michael Catanzaro 2018-06-15 10:05:08 PDT
Comment on attachment 342820 [details]
Patch

Thanks. I had been complaining about this all year. This is really only harmful when running layout tests.
Comment 3 Carlos Alberto Lopez Perez 2018-06-15 10:35:39 PDT
Committed r232881: <https://trac.webkit.org/changeset/232881>