Bug 229321 - REGRESSION(r274166): [GTK] It broke run-javascriptcore-tests causing all tests to use lot of memory
Summary: REGRESSION(r274166): [GTK] It broke run-javascriptcore-tests causing all test...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Carlos Alberto Lopez Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-19 22:19 PDT by Carlos Alberto Lopez Perez
Modified: 2021-08-20 13:06 PDT (History)
15 users (show)

See Also:


Attachments
Patch (6.28 KB, patch)
2021-08-20 09:47 PDT, Carlos Alberto Lopez Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Alberto Lopez Perez 2021-08-19 22:19:54 PDT
The GTK JSC bot <https://build.webkit.org/#/builders/GTK-Linux-64-bit-Release-JS-Tests> has been failing for a long time, with crashes on all tests caused by two much memory usage.

Example:

basic-tests.yaml/stress-test.js.no-ftl: Running mandatory iteration #1:
basic-tests.yaml/stress-test.js.no-ftl: Crashing because current footprint: 633380864 exceeds limit: 629145600
basic-tests.yaml/stress-test.js.no-ftl: 1   0x55762feeb519 WTFCrash
basic-tests.yaml/stress-test.js.no-ftl: 2   0x55762ff90513 ../../../.vm/JavaScriptCore.framework/Helpers/jsc(+0xcd513) [0x55762ff90513]
basic-tests.yaml/stress-test.js.no-ftl: 3   0x55762ff1164a ../../../.vm/JavaScriptCore.framework/Helpers/jsc(+0x4e64a) [0x55762ff1164a]
basic-tests.yaml/stress-test.js.no-ftl: 4   0x55762ff87a89 ../../../.vm/JavaScriptCore.framework/Helpers/jsc(+0xc4a89) [0x55762ff87a89]
basic-tests.yaml/stress-test.js.no-ftl: 5   0x7fb909d4b4d2 /usr/lib/x86_64-linux-gnu/libpthread.so.0(+0x84d2) [0x7fb909d4b4d2]
basic-tests.yaml/stress-test.js.no-ftl: 6   0x7fb908086323 clone
basic-tests.yaml/stress-test.js.no-ftl: test_script_693: line 2: 11836 Segmentation fault      (core dumped) ( "$@" ../../../.vm/JavaScriptCore.framework/Helpers/jsc --useFTLJIT\=false --useFunctionDotArguments\=true --validateExceptionChecks\=true --useDollarVM\=true --maxPerThreadStackUsage\=1572864 stress-test.js )
basic-tests.yaml/stress-test.js.no-ftl: ERROR: Unexpected exit code: 139


I have bisected this and the cause is r274166, also I have double-checked that by reverting locally this commit the issue is fixed.

The problem can be easily reproduced with this command:

Tools/Scripts/run-javascriptcore-tests --gtk --release --memory-limit --verbose --no-testb3 --no-testapi 

Then almost all the JSC tests starts crashing due to trying to use more than the memory limit (which is 600 MB when passing --memory-limit) with a log like the above one.
Notes:
 - If you don't pass --memory-limit then your machine may crash due to OOM
 - Passing --no-testb3 and --no-testapi is needed to avoid also an OOM crash because the testb3 and testapi tests don't seem to honour the --memory-limit switch


The issue is not happening on WPE, only on GTK
Comment 1 Carlos Alberto Lopez Perez 2021-08-19 22:26:55 PDT
Bug 222972 seems related
Comment 2 Carlos Garcia Campos 2021-08-20 01:45:10 PDT
Let's revert then.
Comment 3 Michael Catanzaro 2021-08-20 06:09:04 PDT
Alas. :(

Unfortunately there's no way I can debug something like this. It would need to be investigated by the JSC developers.
Comment 4 Carlos Alberto Lopez Perez 2021-08-20 09:47:14 PDT
Created attachment 435999 [details]
Patch
Comment 5 Carlos Alberto Lopez Perez 2021-08-20 13:06:08 PDT
Committed r281333 (240750@main): <https://commits.webkit.org/240750@main>