New issue
Advanced search Search tips

Issue 428858 link

Starred by 38 users

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2014
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Restricted
  • Only users with EditIssue permission may comment.



Sign in to add a comment

Lots of "triggered DYLD shared region unnest for map" log messages

Project Member Reported by thakis@chromium.org, Oct 30 2014

Issue description

I'm seeing a bunch of DYLD log messages from chrome on Yosemite. Example:

10/30/14 9:48:52.000 AM kernel[0]: Google Chrome He (map: 0xffffff80753c93c0) triggered DYLD shared region unnest for map: 0xffffff80753c93c0, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:53:14.000 AM kernel[0]: Google Chrome He (map: 0xffffff8064328d20) triggered DYLD shared region unnest for map: 0xffffff8064328d20, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:53:20.000 AM kernel[0]: Google Chrome He (map: 0xffffff8064328a50) triggered DYLD shared region unnest for map: 0xffffff8064328a50, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:53:31.000 AM kernel[0]: Google Chrome He (map: 0xffffff80587fd780) triggered DYLD shared region unnest for map: 0xffffff80587fd780, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:53:50.000 AM kernel[0]: Google Chrome He (map: 0xffffff8064328d20) triggered DYLD shared region unnest for map: 0xffffff8064328d20, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:55:09.000 AM kernel[0]: Google Chrome He (map: 0xffffff806c1e8780) triggered DYLD shared region unnest for map: 0xffffff806c1e8780, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:57:55.000 AM kernel[0]: Google Chrome He (map: 0xffffff806c1e8780) triggered DYLD shared region unnest for map: 0xffffff806c1e8780, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:57:56.000 AM kernel[0]: Google Chrome He (map: 0xffffff8064328a50) triggered DYLD shared region unnest for map: 0xffffff8064328a50, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:58:44.000 AM kernel[0]: Google Chrome He (map: 0xffffff80587fd780) triggered DYLD shared region unnest for map: 0xffffff80587fd780, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:58:54.000 AM kernel[0]: Google Chrome He (map: 0xffffff80639c5960) triggered DYLD shared region unnest for map: 0xffffff80639c5960, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:58:56.000 AM kernel[0]: Google Chrome He (map: 0xffffff806d049960) triggered DYLD shared region unnest for map: 0xffffff806d049960, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:59:02.000 AM kernel[0]: Google Chrome He (map: 0xffffff80587fd780) triggered DYLD shared region unnest for map: 0xffffff80587fd780, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
10/30/14 9:59:17.000 AM kernel[0]: Google Chrome He (map: 0xffffff8064328d20) triggered DYLD shared region unnest for map: 0xffffff8064328d20, region 0x7fff97a00000->0x7fff97c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.

(They're not always that frequent as in that example.)

Firefox apparently saw this before Yosemite too, but with an uptick in 2014: https://bugzilla.mozilla.org/show_bug.cgi?id=804010

Seems harmless, other than it produces logspam.
 

Comment 1 by rsesek@chromium.org, Oct 30 2014

Cc: rsesek@chromium.org
Labels: -hotlist-yosemite Cr-Internals
I see this all the time on Mavericks. Thanks for filing -- I never got around to it.

Comment 2 by rsesek@chromium.org, Oct 30 2014

Summary: Lots of "triggered DYLD shared region unnest for map" log messages (was: "triggered DYLD shared region unnest for map" log messages on Yosemite)

Comment 3 by dxie@chromium.org, Oct 30 2014

Labels: M-41
Owner: rsesek@chromium.org
Status: Assigned

Comment 4 by rsesek@chromium.org, Oct 30 2014

Owner: ----
Status: Untriaged
I don't have bandwidth to look at this.

Comment 5 Deleted

Comment 6 by thakis@chromium.org, Oct 30 2014

Don't leave "I'm seeing this too" comments, they don't help. I'll delete yours.
Cc: mark@chromium.org
I found the source, which is in mach_override:

% cat ./dyld-unnest.d 
fbt::log_unnest_badness:entry {
  printf("PID: %d", pid);
  stack();
  ustack();
}
% sudo dtrace -s ./dyld-unnest.d

  2 260738         log_unnest_badness:entry PID: 93057
              mach_kernel`0xffffff801fe806c0+0x46
              mach_kernel`vm_map_clip_start+0x40
              mach_kernel`vm_map_protect+0x12c
              mach_kernel`_kernelrpc_mach_vm_protect_trap+0x4e
              mach_kernel`0xffffff801fec9ab0+0xed
              mach_kernel`hndl_mach_scall64+0x16

              libsystem_kernel.dylib`_kernelrpc_mach_vm_protect_trap+0xa
              Google Chrome Framework`0x000000010a0af840+0x177
              Google Chrome Framework`0x00000001099b9010+0x7d
              Google Chrome Framework`0x000000010a00d430+0x123
              Google Chrome Framework`0x000000010a00d110+0x1e
              Google Chrome Framework`ChromeMain+0x42
              Google Chrome Helper`main+0x9
              Google Chrome Helper`0x00000001099b1ef0+0x34
              Google Chrome Helper`0xd

0x10a0af840 [Google Chrome Framework -	 mach_override.c:178] mach_override_ptr
0x1099b9010 [Google Chrome Framework -	 chrome_main_delegate.cc:387] ChromeMainDelegate::BasicStartupComplete(int*)
0x10a00d430 [Google Chrome Framework -	 content_main_runner.cc:482] content::ContentMainRunnerImpl::Initialize(content::ContentMainParams const&)
0x10a00d110 [Google Chrome Framework -	 content_main.cc:12] content::ContentMain(content::ContentMainParams const&)

Status: WontFix
This is caused by Chrome using mach_override() for the CFBundleBlocker (chrome::common::mac::EnableCFBundleBlocker). Because we need to make a text page writable to overwrite the prologue with a trampoline, DYLD needs to update its page mappings as a result of this protection change. This is what the kernel is logging about, and it seems harmless given that this is an intentional protection change being issued.

In osx/10.9.5/xnu-2422.115.4/bsd/vm/vm_unix.c log_unntest_badness(), there's a system-wide sysctl that can e set ("vm.shared_region_unnest_logging") to disable this logging, but that's outside of Chrome's control.

Comment 9 by Deleted ...@, Jan 14 2015

In case anyone reaches this page, the way to disable the reports is via: 

sudo sysctl -w vm.shared_region_unnest_logging=0

Comment 10 by jdaw...@gmail.com, Jan 25 2015

Does the sysctl command set it once for all time, or do I have to do this every time Yosemite comes up?

Comment 11 by asel...@gmail.com, Feb 27 2015

In order to make this vm.shared_region_unnest_logging=0 permanent, you need to add to /etc/sysctl.conf

Comment 12 by wooda...@gmail.com, Mar 10 2015

Harmless maybe, but I consistently see Chrome's memory footprint expand (as the warning indicates), and Chrome consistently ranks among the top "Significant Energy Use" apps, and I can't imagine this is helping.

There's not some other way to accomplish what you're doing?
Cc: -rsesek@chromium.org
Owner: rsesek@chromium.org
Re: #12: The conclusions you are drawing from this warning message are completely inaccurate. Chrome does have a memory problem and an energy problem (both of which are actively being worked on), but it cannot be attributed to this. The total cost of function patching here is under 2MB per Chrome process, which reflects the amount of memory needed to modify CoreFoundation for this purpose. I ran the numbers today, and it's 4K for the region containing the function we need to make writable and 1336K for the region that comes after that in the image (since we're splitting the CoreFoundation image to make a page writable). There will also be some additional memory usage in the kernel (I estimate only a couple K per process) that won't be charged back to Chrome. There are ways we can not take this hit on every process (and also reduce how frequently this message gets printed), but the engineering work for that hasn't been spec'd or started.

Comment 14 by Deleted ...@, Mar 24 2015

This affected me, making it appear that Chrome triggered DYLD shared region unnest for map caused Mavericks 10.9.5 to freeze at random.  However as I had an identical rysnc'd mirror on a system that did not have this issue I began to investigate.  

The line "While not abnormal for debuggers, this increases system memory footprint until the target exits." made me consider my memory and a memtest confirmed that I had a bad DIMM.  Once the memory was replaced the issue did not return.

Comment 15 by rau.a...@gmail.com, Jun 15 2015

I observed machine freezes as well (hard reset required) and am wondering if this issue could be the cause as the DYLD warning is the last log message before reboot (and about 10 repetitions of the DYLD message...) :

Jun 15 15:30:39 XXXXXXXX kernel[0]: Google Chrome He (map: 0xffffff8025f9e3c0) triggered DYLD shared region unnest for map: 0xffffff8025f9e3c0, region 0x7fff93200000->0x7fff93400000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
Jun 15 15:32:43 localhost bootlog[0]: BOOT_TIME 1434375163 0
same problem here. 

Google Chrome He (map: 0xffffff8047413870) triggered DYLD shared region unnest for map: 0xffffff8047413870, region 0x7fff89a00000->0x7fff89c00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.

Comment 17 by Deleted ...@, Jun 18 2015

So, at some point the last few months, this error basically stopped my ability to user Chrome as a browser. It just happened one day. All of the sudden, when I tried to enter text in any text field, from the address bar to Google Docs, Chrome would lock up, I'd get the beachball and a "Chrome not responding" message. Sometimes the error would clear after a minute or so, sometimes Chrome would just crash.

After a trip to the Mac Genius Bar (a very helpful experience), they recommended that I escalate to the Apple Support team. I set an appointment and after a very useful 20 minutes, the engineer showed me, very convincingly, that Chrome was the problem, not my computer.

In the meantime, I did a clean install of Yosemite, installed only Chrome and had the same issue!

I then rolled back to my last Time Machine back up and resigned myself to using Firefox and Safari. sigh

Then, last week I came across a post about Google rolling back their "update" of Chrome's Bookmark Manager and my hear skipped!

It turns out that as a result of a weird syncing issue when I imported my Xmarks system into Google Sync, I ended with a whole bunch of "Unsorted Bookmarks" folders. I had never bothered to clean the up because they never caused a problem, but apparently the new Bookmarks Manager was choking badly on them! On a hunch, I checked my Bookmarks file and discovered I had over 60MB of date in my folder!

I crashed two apps trying to open the file but finally got it open in TextWranger and discovered nearly 80K lines of XML!

After another day of much fiddling with files and syncing, I imported my Chrome bookmarks file into Safari, which has a wonder bookmark management system, and in about 20 minutes of rapid Delete key punching, got rid of ALL the offending Unsorted Bookmark folders, some nested with up to 80+ folders!

I then killed my Chrome Bookmarks file and the .bak file, shut off Google sync, shut down Chrome, then open it again and imported Safari's bookmarks at the "import" prompt and. . . it all worked! Whew. 

I now have all my Chrome functionality back and with the installation of the "Great Defender" tab manager, I have tripled my battery life! 
Labels: Restrict-AddIssueComment-EditIssue
As I wrote at #8 and #12, this message is completely harmless. I'm restricting comments on this bug.
 Issue 630188  has been merged into this issue.
Project Member

Comment 20 by bugdroid1@chromium.org, Aug 2 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/65e732d3b4dc595512b731143fd49d372acc1a87

commit 65e732d3b4dc595512b731143fd49d372acc1a87
Author: rsesek <rsesek@chromium.org>
Date: Tue Aug 02 18:13:23 2016

[Mac] Only enable the CFBundleBlocker in the browser process.

In child processes, which are sandboxed in most cases, the sandbox will prevent
access to the filesystem locations where the potentially blocked bundles are
stored. Furthermore, on macOS 10.11 and higher, the Google Chrome build is
codesigned in such a way where bundle loading is blocked by SIP.

This reduces some of the "triggered DYLD shared region unnest for map" messages.

BUG= 428858 
R=mark@chromium.org

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

[modify] https://crrev.com/65e732d3b4dc595512b731143fd49d372acc1a87/chrome/app/chrome_main_delegate.cc

Project Member

Comment 21 by bugdroid1@chromium.org, Aug 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3026ec1f3bd67bb2cac5e42fe6d1a1298efcd049

commit 3026ec1f3bd67bb2cac5e42fe6d1a1298efcd049
Author: rsesek <rsesek@chromium.org>
Date: Fri Aug 05 18:21:19 2016

Revert of [Mac] Only enable the CFBundleBlocker in the browser process. (patchset #1 id:1 of https://codereview.chromium.org/2199313002/ )

Reason for revert:
Speculative revert for perf regression.

BUG= https://crbug.com/634917 

Original issue's description:
> [Mac] Only enable the CFBundleBlocker in the browser process.
>
> In child processes, which are sandboxed in most cases, the sandbox will prevent
> access to the filesystem locations where the potentially blocked bundles are
> stored. Furthermore, on macOS 10.11 and higher, the Google Chrome build is
> codesigned in such a way where bundle loading is blocked by SIP.
>
> This reduces some of the "triggered DYLD shared region unnest for map" messages.
>
> BUG= 428858 
> R=mark@chromium.org
>
> Committed: https://crrev.com/65e732d3b4dc595512b731143fd49d372acc1a87
> Cr-Commit-Position: refs/heads/master@{#409244}

TBR=mark@chromium.org,thakis@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 428858 

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

[modify] https://crrev.com/3026ec1f3bd67bb2cac5e42fe6d1a1298efcd049/chrome/app/chrome_main_delegate.cc

Sign in to add a comment