firefox/thunderbird triggered DYLD shared region unnest for map

ASSIGNED
Assigned to

Status

()

defect
ASSIGNED
7 years ago
5 years ago

People

(Reporter: Nomis101, Assigned: espindola)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Reporter

Description

7 years ago
I'm not sure if this is the correct Component, but since a few weeks (months?) Firefox and Thunderbird are producing the following message in the OS X console everytime I quit the application:


21.10.12 21:57:34,000 kernel[0]: firefox (map: 0xffffff8021d56220) triggered DYLD shared region unnest for map: 0xffffff8021d56220, region 0x7fff88200000->0x7fff88400000. While not abnormal for debuggers, this increases system memory footprint until the target exits.


21.10.12 21:58:53,000 kernel[0]: thunderbird (map: 0xffffff8021d565c0) triggered DYLD shared region unnest for map: 0xffffff8021d565c0, region 0x7fff88200000->0x7fff88400000. While not abnormal for debuggers, this increases system memory footprint until the target exits.



This is on OS X 10.8.2, I see this on beta, aurora and trunk.
Testing with today's mozilla-central nightly, I see this also on OS X 10.7.5 and 10.6.8.

Here's the regression range:

firefox-2012-08-08-03-05-29-mozilla-central
firefox-2012-08-09-03-05-41-mozilla-central

http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e55638d4037a&tochange=3199bc043da4
Don't know which patch in this range might be the cause/trigger.  I'll need to hg bisect.
Reporter

Comment 4

7 years ago
(In reply to Steven Michaud from comment #3)
> This bug was triggered by the patch for bug 777122:
> 
> http://hg.mozilla.org/mozilla-central/rev/119935b8a413
Yes, you are right. If I build a build with this patch backed out, than I don't see the console message anymore. So, what can we do about that, how can we fix it?
I was hoping Rafael might have some ideas.

By the way, this bug doesn't appear to be urgent.  But it does look scary (for being so low-level).  So it'd be nice to get to the bottom of it before too long.
Sorry for taking so long. I want to check it out better, but from the log I am almost sure this is just the system complaining when we patch write. If that is the case, the warning would stay with nightly, but will go away for releases when we start calling _exit(0).

Comment 7

7 years ago
Confirming this on Fx Beta 6 on Mac OS X 10.8.2 on every shutdown (AFAICS): 

26.11.12 14:47:25,000 kernel[0]: firefox (map: 0xffffff803ad0f0e8) triggered DYLD shared region unnest for map: 0xffffff803ad0f0e8, region 0x7fff8b800000->0x7fff8ba00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.

Comment 8

7 years ago
… and Fx 18 b1 (the aforementioned version was Fx *17* b6): 

26.11.12 23:35:53,000 kernel[0]: firefox (map: 0xffffff803d844c18) triggered DYLD shared region unnest for map: 0xffffff803d844c18, region 0x7fff8da00000->0x7fff8dc00000. While not abnormal for debuggers, this increases system memory footprint until the target exits.
An interesting idea that was discussed on a thread about asan is to have the main binary rexect itself setting DYLD_INSERT_LIBRARIES instead of using mach_override. I might take a look at this once I fix some higher priority bugs.
It looks like interpose will work for us! The attached file is a minimal interpose library that captures writes. I will try to plug it in the firefox build tomorrow.
Assignee: nobody → respindola
Status: NEW → ASSIGNED
Comment hidden (obsolete)
Comment hidden (obsolete)
> > It looks like interpose will work for us! The attached file is a minimal
> > interpose library that captures writes. I will try to plug it in the firefox
> > build tomorrow.
> Have you tried, was it successfully?

Sorry, the code review on reporting late writes cleared up and I went back to that as it seemed higher priority. I have been able to plug the example into the firefox build and it correctly replaces writes, but I have not finished the integration.
Comment hidden (me-too)
This hang and error message was also just reported in bug 1032809.
There is no hang associated with this bug (and its error message).

Whatever that hang is, it's unrelated.
Comment hidden (me-too)
Comment hidden (me-too)
Comment hidden (off-topic)
This messages appear every time you quit Firefox.  As best we can tell it's entirely benign -- it has no side effects; it causes no other bugs.

We'll get to it eventually.  But (needless to say) it's not urgent.

Please, no more "me too" comments.
Comment hidden (off-topic)
> The bug seems to lead to HFS+ file system trouble:
>
> Sep  1 17:30:30 kernel[0]: IOSurface: buffer allocation size is zero
> Sep  1 17:38:55 kernel[0]: HFS: Very Low Disk: freeblks: 0, dangerlimit: 709

This is almost certainly unrelated.

Try Firefox on another machine.  On quitting you'll see the DYLD shared region error, but not this one.
Also, the DYLD shared region error concerns RAM, not hard disk space.
> The errors occur every time Firefox 31 is *started.*

This I haven't seen before.

It's still almost certainly unrelated to your "low disk" errors -- RAM is not hard disk space.

Comment 26

5 years ago
Yes, the DYLD errors Firefox is causing with the kernel are eating a ridiculous 2GB of RAM on my machine in addition to the RAM Firefox is using 'normally'. This is causing incessant beachballs, icons to not load, memory warnings, hangs, the necessity for Force Quits, etc. 


My Console is absolutely littered with the following anytime FireFox is running:

KERNEL: firefox (map: 0xffffff804b3af878) triggered DYLD shared region unnest for map: 0xffffff804b3af878, region 0x7fff91000000->0x7fff91200000. While not abnormal for debuggers, this increases system memory footprint until the target exits.

KERNEL: (default pager): [KERNEL]: default_pager_backing_store_monitor - send LO_WAT_ALERT

KERNEL: HFS: Low Disk: Vol: XXX freeblks: 261964, warninglimit: 262144


This is abnormal and should be of much higher priority than it clearly is (not):

process: kernel_task, user: root, cpu %: 0.7, threads: 99, Real Mem: 2.00GB
process: firefox, user: xxxx, cpu %: 13.9, threads: 52, Real Mem: 654.4MB


As mentioned by Mike, the errors begin immediately upon startup of Firefox, not closure.
Like I said, I haven't seen these errors on Firefox startup.  Nor have they ever been reported before (though it's possible they've been reported without sufficient information).

What's you're seeing does seem more serious.  So let's try to get to the bottom of it.

What version of OS X are you using?

You say you see these errors (on startup) with Firefox 31.  Do you see them with earlier versions of Firefox?

Do you see these errors with a clean profile?

If you have more than one computer to test on, do you also see these errors (on startup) on other machines?
One more thing:

Whoever sees these errors on startup, please report the amount of available disk space on your bootable partition -- as a number of megabytes and as a percentage of the total.  It's possible that shortage of hard disk space is playing a role here, or is even the cause of the problems.
Comment hidden (off-topic)
Comment hidden (off-topic)

Comment 31

5 years ago
My Firefox Nightly is not starting correctly, and I do see "kernel[0]: firefox (map: 0xffffff8040f2cc30) triggered DYLD shared region unnest for map: 0xffffff8040f2cc30, region 0x7fff96c00000->0x7fff96e00000. While not abnormal for debuggers, this increases system memory footprint until the target exits."

However, I see that message /before/ selecting a profile from the profile manager, so that message is probably unrelated to Firefox being unable to start with a profile.

I believe this started earlier today, but I'll try to find a regression range.

Comment 32

5 years ago
People might be running into bug 1062042 and the only guess from looking at Console for errors is this bug.
Comment hidden (off-topic)
Comment hidden (off-topic)
You need to log in before you can comment on or make changes to this bug.