DYLD problem related to FP?[Up to topic list]  [Home]

Who What
Jon
08 Nov 2010, 12:21
DYLD problem related to FP?
After installing FP 2.3.0 I have started to see the following messages in my log :

08/11/2010 10:45:25 kernel Finder (map: 0x69585c4) triggered DYLD shared region unnest for map: 0x69585c4, region 0x7fff82800000->0x7fff82a00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
08/11/2010 10:54:48 kernel Finder (map: 0x5e84ae4) triggered DYLD shared region unnest for map: 0x5e84ae4, region 0x7fff88c00000->0x7fff88e00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
08/11/2010 10:54:51 kernel Mail (map: 0xc7cc290) triggered DYLD shared region unnest for map: 0xc7cc290, region 0x7fff88c00000->0x7fff88e00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
08/11/2010 10:54:53 kernel Console (map: 0x5969cd0) triggered DYLD shared region unnest for map: 0x5969cd0, region 0x7fff88c00000->0x7fff88e00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
08/11/2010 10:56:39 kernel Safari (map: 0x5e84000) triggered DYLD shared region unnest for map: 0x5e84000, region 0x7fff88c00000->0x7fff88e00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
08/11/2010 11:06:22 kernel TextEdit (map: 0xc7cc47c) triggered DYLD shared region unnest for map: 0xc7cc47c, region 0x7fff88c00000->0x7fff88e00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.

These messages occur for each Application I launch. The above is a sample.

If I turn FP off then the messages do not appear, so it looks like FP is causing them.

1. Should I be concerned?

2. Is this a known side-effect of the current FP version?

Intel iMac (2.66 GHz Core 2 Duo) running OSX 10.6.4

The problem does not occur on my MacBook Pro running the same OSX release.

Many thanks for a great product which I have used for years.
turly
08 Nov 2010, 20:24
Re: DYLD problem related to FP?
It's nothing much to worry about... I hope my attempt at explaining doesn't confuse the matter.

Each app in OS X has its own address space, but there are also shared regions where Apple locates their OS X Carbon and Cocoa libraries.
Every app maps its own address space and also this shared address space where the shared library code lives. IIRC this was done (hey, I might even have helped do it when I was at Apple!) to speed up app launches (prebinding).

FinderPop works by overwriting the code for certain routines in OS X libraries with a JUMP instruction to its own implementation of these routines (so it can add extra stuff to contextual menus for example.)

This instruction overwriting occurs at certain locations in the app's shared library code. This shared code is shared "copy-on-write" which means that the page containing the instructions I overwrite now becomes part of the app's private working set and the app no longer uses the shared version of that page. The kernel prints a message to the console to this effect "Mail.app triggered DYLD shared unnest for XXX because FinderPop overwrote some instructions at YYY".

In short, the app's working set size has gone up by a few pages, but in the big scheme of things, this is a drop in the ocean.

Debuggers also work like this, if you set a breakpoint on a location, the debugger overwrites the instruction at that location with a different instruction which transfers control to the debugger, so that if that location is executed, the debugger is invoked and can process the breakpoint. That's what the "While not abnormal for debuggers" reference is about.

FinderPop on OS X has always worked like this. 10.6.x prints messages whereas previous versions did not (or they weren't sharing as aggressively.)

I'm a bit puzzled why it only appears on your 10.6.4 iMac and not on your 10.6.4 MacBook Pro - maybe it's because one is 32-bit and the other 64-bit?

--turly
RonaldPR
08 Nov 2010, 20:53
Re: DYLD problem related to FP?
@ Jon
In which log do you see this? I do not see it on my 2.4GHz Core 2 Duo iMac running OSX 10.6.4.
With FP 2.3.0.1 beta, I only see lines like this one:

08-11-10 20:35:28 [0x0-0x20020].com.finderpop.fp-injector[176] FinderPop-beta-x86_64-23001: Patching 'TextEdit' 0:15f15f (CF-c)

(Which btw also shows that TextEdit is launched in 64-bit mode.)
Jon
09 Nov 2010, 15:01
Re: DYLD problem related to FP?
Thanks, Turly, for the explanation. I suspected that it wasn't really a problem (otherwise you'd have fixed it by now!) Anyway, I am reassured:-)

Spot on, by the way. The iMac is 64-bit and the MBP is 32.

To RonaldPR: the messages are (I think) in the asl.log ... but I see them because I have the Console App set to show "all messages". Interestingly, I used to see the type of message you describe, but now I don't get them I just get these new ones about dyld - which Turly has now explained and I can sleep easy.
turly
09 Nov 2010, 21:26
Re: DYLD problem related to FP?
Yeah, I turned off those "patching" messages unless the FP version you're running is a beta.
Ronald is probably running 2.3.0.1 so he gets the messages.
RonaldPR
09 Nov 2010, 21:45
Re: DYLD problem related to FP?
Yes, I am running the 2.3.0.1 beta. That explains why I get the "patching" messages and why Jon, running 2.3.0, does not see them. But does that also explain why Jon gets messages that I have never seen? No such messages here on similar hardware running the same OSX version, also not when I set Console to show all messages.
turly
09 Nov 2010, 23:17
Re: DYLD problem related to FP?
@Ronald:

Odd, I get those 'unnesting shared region' messages all the time. I see you're on X86_64... I suspect your kernel is in 64-bit mode whereas mine is in 32-bit mode (or vice-versa, I can't remember).
RonaldPR
10 Nov 2010, 23:11
Re: DYLD problem related to FP?
My kernel will be in 32-bit mode, with the OS and many application running in 64-bit mode. Snow Leopard will boot the 32-bit kernel by default, unless one forces to run the 64-bit kernel by holding "6" and "4" keys at start-up. Snow Leopard Server, however, will boot with the 64-bit kernel by default. http://hothardware.com/News/Apples-64Bi ... y-Default/