Bug 207807 - REGRESSION(r256633): 4% memory regression in new Membuster, possibly some leaking in WebKit Malloc? (Requested by yusukesuzuki on #webkit).
Summary: REGRESSION(r256633): 4% memory regression in new Membuster, possibly some lea...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: WebKit Commit Bot
URL:
Keywords: InRadar
Depends on:
Blocks: 197684
  Show dependency treegraph
 
Reported: 2020-02-14 22:46 PST by WebKit Commit Bot
Modified: 2020-02-16 01:14 PST (History)
4 users (show)

See Also:


Attachments
ROLLOUT of r256633 (34.04 KB, patch)
2020-02-14 22:46 PST, WebKit Commit Bot
no flags Details | Formatted Diff | Diff
Potential fix (18.00 KB, patch)
2020-02-15 03:50 PST, Christopher Reid
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description WebKit Commit Bot 2020-02-14 22:46:45 PST
https://trac.webkit.org/changeset/256633 broke the build:
4% memory regression in new Membuster, possibly some leaking in WebKit Malloc? (Requested by yusukesuzuki on #webkit).

This is an automatic bug report generated by webkitbot. If this bug
report was created because of a flaky test, please file a bug for the flaky
test (if we don't already have one on file) and dup this bug against that bug
so that we can track how often these flaky tests fail.
Comment 1 WebKit Commit Bot 2020-02-14 22:46:53 PST
Created attachment 390856 [details]
ROLLOUT of r256633

Any committer can land this patch automatically by marking it commit-queue+.  The commit-queue will build and test the patch before landing to ensure that the rollout will be successful.  This process takes approximately 15 minutes.

If you would like to land the rollout faster, you can use the following command:

  webkit-patch land-attachment ATTACHMENT_ID

where ATTACHMENT_ID is the ID of this attachment.
Comment 2 WebKit Commit Bot 2020-02-14 22:54:42 PST
Comment on attachment 390856 [details]
ROLLOUT of r256633

Clearing flags on attachment: 390856

Committed r256700: <https://trac.webkit.org/changeset/256700>
Comment 3 WebKit Commit Bot 2020-02-14 22:54:43 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2020-02-14 22:55:13 PST
<rdar://problem/59483218>
Comment 5 Christopher Reid 2020-02-15 03:50:43 PST
Created attachment 390861 [details]
Potential fix

These are the changes isolated for mac and a potential fix.

I believe the cause of the memory regression was because the file descriptor for the mapping was only opened with O_WRONLY and not O_RDWR which caused the mmap calls to fail on mac with EPERM.
The memory regression was likely resources stored in memory that were previously in a mapped file.

I added FileOpenMode::ReadWrite to match the flags from before that patch `O_RDWR | O_CREAT | O_EXCL`.
Comment 6 Yusuke Suzuki 2020-02-16 01:14:03 PST
(In reply to Christopher Reid from comment #5)
> Created attachment 390861 [details]
> Potential fix
> 
> These are the changes isolated for mac and a potential fix.
> 
> I believe the cause of the memory regression was because the file descriptor
> for the mapping was only opened with O_WRONLY and not O_RDWR which caused
> the mmap calls to fail on mac with EPERM.
> The memory regression was likely resources stored in memory that were
> previously in a mapped file.
> 
> I added FileOpenMode::ReadWrite to match the flags from before that patch
> `O_RDWR | O_CREAT | O_EXCL`.

I'm building Safari and running new Membuster to ensure this patch fixes the issue.