Closed Bug 26659 Opened 20 years ago Closed 18 years ago

Mac: Too many files open triggers startup crash


(NSPR :: NSPR, defect, P3)

Mac System 8.6


(Not tracked)



(Reporter: lists, Assigned: sdagley)



(Keywords: crash, helpwanted, Whiteboard: [need info])

When I'm running an application that opens a large number of files, such as Bare

Bones Mailsmith, I can reproducibly induce a crash at startup in Mozilla.  I am

assuming that this is a result of Mozilla attempting to open more files than OS

8.6 can handle.

The following information was hand written, since MacsBug couldn't save a StdLog!

"PowerPC unmapped memory exception at 19E79E60 PR_UnloadLibrary+00214

File Manager Error #-42 = tmfoErr"

"Address 19E79E60 is in VM file-mapped logical memory space

It is in the CFM fragment "NSPR20" at 19E60000"

"Cannot determine total number of FCBs when file system is busy

#348 in use including #114 fonts not listed"

System details:

Machine ID:	510

Processor info:	PowerPC G3

Machine speed:	266 MHz

OS: 8.6

Disk cache:	6 MB

Virtual memory:	193 MB

Built-in memory:	192 MB

Video memory:	6 MB	

Backside L2 cache:	512K

If any more information is required, please email me, as MacsBug is unable to

save a StdLog while in this crash.

I note that the FCB technote

corrects the limit on FCBs suggested in

and that 348 FCBs is in fact the maximum.
*** Bug 22640 has been marked as a duplicate of this bug. ***
Quoting from bug 22640, "apprunner launch fails in low file descriptor 
  >----- Additional Comments From  2000-01-27 22:10 -----
  >M13 is actually worse, in that I cannot have any other programs open when 
  >running the application or I receive MacOS error -42: too many open files.
  >Same configuration as before.
  >I've increased the severity to major, since M13 is unusable on my (fairly 
  >standard) powerbook.
Keywords: crash
Summary: [CRASH] Too many files open triggers startup crash → Mac: Too many files open triggers startup crash
updating product to NSPR
Component: Browser-General → NSPR
Product: Browser → NSPR
changing owner info to NSPR.
Assignee: leger → srinivas
QA Contact: cbegle → srinivas
Assigning the bug to Steve Dagley.
Assignee: srinivas → sdagley
Not really an NSPR issue.  We just happen to have a HUGE number of files open 

right now since we're so componentized.  sfraser is going to log a bug against 

scc to glom all the shared libraries in Essential Files into one library, 

hopefully for M14, which will help some.  We'd like to see something similiar for 

the Components folder but that requires much more work on the Component Loader.  

Note that the problem is worse with VM on as all shared libraries are kept open 

for VM file mapping.  Turning off VM will reduce the # of files we have open 

while running (they're opened, read into RAM and closed).  Upgrading to Mac OS 9 

where the number of FCBs is >5000 is another workaround.

The aforementioned bug to consolidate files is bug 27750,
"Number of open files used by mozilla approaches OS limit"
Should this bug depend on it?
Steve, should this be reassigned?
No, I'll hang on to it as I'll be doing 4.x and Mozilla work next month.  
Regarding's comment about bug #27750 - the bugs are definitely 
related but if we crash in NSPR when hitting the limit (I think I was under the 
impression we were getting an error alert from the OS but re-reading the bug it 
looks liek a crash) we need a more graceful way to exit.
Please note that this bug is stopping me from using Mozilla as my default
browser, as my email client is the other major consumer of FCBs..

Please fix this soon so I can use Mozilla full time!
Target Milestone: --- → Future
Why was this crasher futured? Is jar support for Mac coming soon?
Keywords: helpwanted
Whiteboard: [need info]
I futured the bug because we didn't fix it
in the upcoming NSPR 4.1 release.

Looking at the description of the bug again, I
think the root cause of the crash is not NSPR.
The only thing we can do in NSPR is to make it
exit more gracefully but Mozilla will still exit.
It is the fact that Mozilla opens too many files
that causes it to crash.
22750 is now nsbeta3 and nsmac2. Fixing it should fix this, so marking this   

dependent on it. smfr is working on getting in JAR file support on Mac OS this 

week, so hopefully this will be "fixed" early next week

Depends on: 27750
I'm not sure that jar file support will have any impact on this bug. We don't 
hold chrome files open, so it's only shared libs that add to the open file count.
Hmmm. So what we really need is the shared library merging idea.

Wasn't someone (hyatt?) saying this is a couple of days work to get XPCOM to 

support multiple code fragments in one file? Is there a bug for this (i.e. is it 

actually happening) or should I open one?

BeZilla people are also working on merging some libraries.  I don't know where 
to track their ideas. :( maybe talk to cls
for more info, see bug 46775
I'm now running Mozilla (build ID 2000090811) on Mac OS 8.6 alongside Bare Bones
Mailsmith (another FCB hog) without any troubles.  Sweet!

Thanks heaps to everyone.  Mozilla is now my default web application!
Hmm, a little bit more use shows that the use of Mozilla and Mailsmith at the
same time is very close to the limit of FCBs.  I get occasional hard crashes
with various extensions (PGPNetService was one), and no other applications can
be started (Frontier for example).

My system is so stable at the moment that I'm loathe to change it by installing
Mac OS 9.
Here are some related comments from Derek Miller on 11/15/2000 at

One thing I've noticed with the [final] release of Netscape 6 is that it keeps a
lot of files -- shared libraries, appearance theme elements, etc. -- open.

That shouldn't generally be a problem under Mac OS 9 and above (or in Mac OS X,
if it runs there), but under Mac OS 8.6, where I also have quite a few -- but
not an excessive number -- of fonts, extensions, drivers, and so on loaded,
Netscape 6 will often fail to launch if I have more than one other application
running, because the OS runs into the old Mac OS maximum-open-files limit of 346
(or 348, depending on where you look).

So that problem should go away. But since I'm still running 8.6, it hasn't gone
away for me...
Keywords: nsmac2
Severity: critical → normal
Since this is addressed by Mac OS 9 and that's about to become our minimum
supported version of Mac OS closing as WONTFIX 
Closed: 18 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.