emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dumper problems and a possible solutions


From: Rich Felker
Subject: Re: Dumper problems and a possible solutions
Date: Thu, 26 Jun 2014 00:28:39 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jun 26, 2014 at 05:44:44AM +0300, Eli Zaretskii wrote:
> > Date: Wed, 25 Jun 2014 16:34:03 -0400
> > From: Rich Felker <address@hidden>
> > Cc: address@hidden, address@hidden
> > 
> > > And still, there are only a few (maybe 10) times we allocate these
> > > 700K tables, so 400MB sound very strange to me.
> > 
> > In my log, I see 768k allocations occuring roughly 94 times.
> 
> 768K times 94 doesn't get anywhere close to 400MB.

Yes, there were also a number of ~200k and ~400k allocations though,
which I did not get around to identifying the source of.

> > > > Those ctors are free to inspect global data. For example one might
> > > > contain (this sort of idiom is necessary if you can't control the
> > > > relative order of ctors): if (!init) { do_something(); init=1; }. In
> > > > that case, the dump would save the value of init, and do_something()
> > > > would fail to happen at runtime.
> > > 
> > > That's the same problem as with your clock_gettime, and it must be
> > > fixed anyway, because any ctor run at dump time is almost certainly
> > > picking up data that is irrelevant to the run time.
> > 
> > Libc could _possibly_ work around it by virtue of having full control
> > over the init code. For other libraries, the issue is not fixable (see
> > my above example with code that has to control dependency order of
> > ctors), and shouldn't have to be fixed.
> 
> But the problem likely doesn't exist, because otherwise we will have
> known about it by now.  Emacs cannot use such libraries.

I wouldn't be so sure. How much testing is even done with static
linking? With dynamic linking, the library's state will all be lost
across dump. Lots of the libraries emacs can optionally use have
sketchy global state, and I wouldn't be surprised at all if at least
one of them were failing to properly initialize in the post-dump
emacs. The symptoms might not even be immediately visible if the state
saved when dumping were "close enough" to correct to be used
post-dump.

Rich



reply via email to

[Prev in Thread] Current Thread [Next in Thread]