Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 45650 Update CFAllocator out-of-memory patch
Starred by 34 users Project Member Reported by a...@chromium.org, Jun 2, 2010 Back to list
Status: Available
Owner: a...@chromium.org
Cc: a...@chromium.org
Components:
OS: Mac
Pri: 2
Type: Bug

Restricted
  • Only users with EditIssue permission may comment.


Sign in to add a comment
To make CFAllocator out-of-memory-safe, we currently need to muck around in
the internals of it. This task is on-going, and for each new significant
revision of Mac OS X we need to either:

- Update our definitions of the internals (and leave this bug open for the
next time)
- See if there's a way to fix it via public API (and then close this bug)
 
Comment 1 by a...@chromium.org, Mar 1, 2013
Owner: a...@chromium.org
Yeah, I'm going to own this forever.
Project Member Comment 2 by bugdroid1@chromium.org, Mar 10, 2013
Labels: -Area-Internals Cr-Internals
Comment 3 by oliverj...@gmail.com, Sep 28, 2013
I believe this may need updating for OS X 10.9.
Comment 4 by a...@chromium.org, Sep 28, 2013
A simple diagnostic app.
45650.m
2.7 KB View Download
Comment 5 by rsesek@chromium.org, Sep 30, 2013
$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.9
BuildVersion:	13A584

$ ./45650-32 
This is Mac OS X 10.9 (13A584), running in 32-bit mode.
CFAllocatorContext offset is 68, expected for Mac OS X 10.7-10.8

$ ./45650-64 
This is Mac OS X 10.9 (13A584), running in 64-bit mode.
CFAllocatorContext offset is 136, expected for Mac OS X 10.7-10.8
Comment 6 by a...@chromium.org, Sep 30, 2013
rsesek, thank you.
Comment 7 by Deleted ...@, Oct 11, 2013
This not fixed?

$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.9
BuildVersion:	13A598

11.10.13 0:34:40,296 Google Chrome Helper[4960]: Internals of CFAllocator not known; out-of-memory failures via CFAllocator will not result in termination. http://crbug.com/45650

11.10.13 4:24:31,030 Google Chrome Helper[6860]: Process unable to create connection because the sandbox denied the right to lookup com.apple.coreservices.launchservicesd and so this process cannot talk to launchservicesd. : LSXPCClient.cp #426 ___ZN26LSClientToServerConnection21setupServerConnectionEiPK14__CFDictionary_block_invoke() q=com.apple.main-thread

11.10.13 4:24:31,036 Google Chrome Helper[6860]: CGSLookupServerRootPort: Failed to look up the port for "com.apple.windowserver.active" (1100)

=========================

App Nap is a new feature in OS X 10.9 which focuses system resources like CPU, I/O, and battery energy on the most important work done for the user. The system uses heuristics to determine when an application is doing important work, and when the work it is doing is not critical. These heuristics include (but are not limited to): visibility on screen, drawing activity, event processing, audio playback, foreground vs background, and application type.

https://developer.apple.com/library/prerelease/mac/releasenotes/Foundation/RN-Foundation/index.html#/apple_ref/doc/uid/TP30000742-CH2-SW9
Comment 8 by Deleted ...@, Oct 11, 2013
$ ./45650-32
This is Mac OS X 10.9 (13A598), running in 32-bit mode.
CFAllocatorContext offset is 68, expected for Mac OS X 10.7-10.8

$ ./45650-64
This is Mac OS X 10.9 (13A598), running in 64-bit mode.
CFAllocatorContext offset is 136, expected for Mac OS X 10.7-10.8
Comment 9 by a...@chromium.org, Oct 11, 2013
Labels: Restrict-AddIssueComment-EditIssue
This is fixed for 10.9. It was committed recently in r226670.

denieldfu, I appreciate your comments but it repeats info that was already posted. And I have no idea why you are quoting docs.
Project Member Comment 10 by bugdroid1@chromium.org, Jun 12, 2014
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a939586048b9a634d05feadb88d68efd98ecdca4

commit a939586048b9a634d05feadb88d68efd98ecdca4
Author: avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Thu Jun 12 19:42:03 2014

Update OOM killer to patch out CFAllocator on 10.10.

BUG=45650
TEST=none
NOTRY=true

Review URL: https://codereview.chromium.org/336613002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276778 0039d316-1c4b-4281-b951-d872f2087c98


Project Member Comment 11 by bugdroid1@chromium.org, Jun 12, 2014
------------------------------------------------------------------
r276778 | avi@chromium.org | 2014-06-12T19:42:03.281460Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/base/process/memory_mac.mm?r1=276778&r2=276777&pathrev=276778

Update OOM killer to patch out CFAllocator on 10.10.

BUG=45650
TEST=none
NOTRY=true

Review URL: https://codereview.chromium.org/336613002
-----------------------------------------------------------------
Labels: Hotlist-Recharge
This issue likely requires triage.  The current issue owner may be inactive (i.e. hasn't fixed an issue in the last 30 days or commented in this particular issue in the last 90 days).  Thanks for helping out!

-Anthony
Project Member Comment 14 by sheriffbot@chromium.org, Jun 28, 2016
Labels: Hotlist-OpenBugWithCL
A change has landed for this issue, but it's been open for over 6 months. Please review and close it if applicable. If this issue should remain open, remove the "Hotlist-OpenBugWithCL" label. If no action is taken, it will be archived in 30 days.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Comment 15 by a...@chromium.org, Jun 29, 2016
Labels: -Hotlist-Recharge -Hotlist-OpenBugWithCL
Comment 16 by mark@chromium.org, Jul 8, 2016
Bug 626536 for 10.12.
Project Member Comment 17 by bugdroid1@chromium.org, Jul 8, 2016
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fd1cb64d5070bd041e86434e91a8cca796414367

commit fd1cb64d5070bd041e86434e91a8cca796414367
Author: mark <mark@chromium.org>
Date: Fri Jul 08 19:58:59 2016

mac: Update knowledge of CFAllocator internals for 10.12

For each new major OS version, we need to poke at the internals of
CFAllocator to enable the out-of-memory killer for the default
CFAllocator implementations.

This update is for macOS 10.12 ("Sierra"), whose CFAllocator internals
are unchanged from 10.11 (and from 10.9, and in fact from 10.7). It also
updates the base::mac::IsOS*() family of functions for this new OS
version.

BUG= 626536 ,45650
TEST=base_unittests OutOfMemoryDeathTest.CFAllocator*,MacUtilTest.IsOSEllipsis

Review-Url: https://codereview.chromium.org/2129273002
Cr-Commit-Position: refs/heads/master@{#404471}

[modify] https://crrev.com/fd1cb64d5070bd041e86434e91a8cca796414367/base/mac/mac_util.h
[modify] https://crrev.com/fd1cb64d5070bd041e86434e91a8cca796414367/base/mac/mac_util.mm
[modify] https://crrev.com/fd1cb64d5070bd041e86434e91a8cca796414367/base/mac/mac_util_unittest.mm
[modify] https://crrev.com/fd1cb64d5070bd041e86434e91a8cca796414367/base/process/memory_mac.mm

Project Member Comment 18 by bugdroid1@chromium.org, Jul 10, 2016
Labels: merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bddd17b05548466f7995d583686f479bc107f140

commit bddd17b05548466f7995d583686f479bc107f140
Author: Mark Mentovai <mark@chromium.org>
Date: Sun Jul 10 03:04:43 2016

mac: Update knowledge of CFAllocator internals for 10.12

For each new major OS version, we need to poke at the internals of
CFAllocator to enable the out-of-memory killer for the default
CFAllocator implementations.

This update is for macOS 10.12 ("Sierra"), whose CFAllocator internals
are unchanged from 10.11 (and from 10.9, and in fact from 10.7). It also
updates the base::mac::IsOS*() family of functions for this new OS
version.

BUG= 626536 ,45650
TEST=base_unittests OutOfMemoryDeathTest.CFAllocator*,MacUtilTest.IsOSEllipsis

Review-Url: https://codereview.chromium.org/2129273002
Cr-Commit-Position: refs/heads/master@{#404471}
(cherry picked from commit fd1cb64d5070bd041e86434e91a8cca796414367)

Review URL: https://codereview.chromium.org/2136813002 .

Cr-Commit-Position: refs/branch-heads/2785@{#68}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/bddd17b05548466f7995d583686f479bc107f140/base/mac/mac_util.h
[modify] https://crrev.com/bddd17b05548466f7995d583686f479bc107f140/base/mac/mac_util.mm
[modify] https://crrev.com/bddd17b05548466f7995d583686f479bc107f140/base/mac/mac_util_unittest.mm
[modify] https://crrev.com/bddd17b05548466f7995d583686f479bc107f140/base/process/memory_mac.mm

Sign in to add a comment