Bug 245222 - REGRESSION(250548@main): Early WebProcess exit on 32-bit platforms since memory limit is zero
Summary: REGRESSION(250548@main): Early WebProcess exit on 32-bit platforms since memo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 241012 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-15 07:30 PDT by Olivier Blin
Modified: 2022-09-16 00:32 PDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Blin 2022-09-15 07:30:58 PDT
In 250548@main, the memory limit in MemoryPressureHandler is set to a least 7 GB for active process.
This value is stored in a size_t variable, but this is limited to 4 GB on 32-bit platforms.

The memory limit is truncated down to 0, which triggers a WebProcess exit after the first MemoryPressure check.
Comment 1 Olivier Blin 2022-09-15 07:32:34 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4381
Comment 2 Miguel Gomez 2022-09-15 08:56:21 PDT
Folks, this is already being handled in https://bugs.webkit.org/show_bug.cgi?id=241012.

The PR for this addresses the value overflow, but what should be done is that WebKitGTK and WPE shouldn't use those values at all.
Comment 3 Chris Dumez 2022-09-15 08:58:40 PDT
(In reply to Miguel Gomez from comment #2)
> Folks, this is already being handled in
> https://bugs.webkit.org/show_bug.cgi?id=241012.
> 
> The PR for this addresses the value overflow, but what should be done is
> that WebKitGTK and WPE shouldn't use those values at all.

I think https://github.com/WebKit/WebKit/pull/4381 is valuable no matter what. 

If you want to disable this handling for WebKitGTK and WPE and fine but that's a separate issue from the overflow handling on 32bit.
Comment 4 EWS 2022-09-15 15:13:50 PDT
Committed 254533@main (b0895ea02d48): <https://commits.webkit.org/254533@main>

Reviewed commits have been landed. Closing PR #4381 and removing active labels.
Comment 5 Radar WebKit Bug Importer 2022-09-15 15:14:22 PDT
<rdar://problem/99989909>
Comment 6 Miguel Gomez 2022-09-16 00:32:51 PDT
*** Bug 241012 has been marked as a duplicate of this bug. ***