all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dmantipov@yandex.ru, emacs-devel@gnu.org
Subject: Re: Dumper problems and a possible solutions
Date: Thu, 26 Jun 2014 00:28:39 -0400	[thread overview]
Message-ID: <20140626042839.GI179@brightrain.aerifal.cx> (raw)
In-Reply-To: <83simspexv.fsf@gnu.org>

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 <dalias@libc.org>
> > Cc: dmantipov@yandex.ru, emacs-devel@gnu.org
> > 
> > > 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	other threads:[~2014-06-26  4:28 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 17:19 Dumper problems and a possible solutions Rich Felker
2014-06-24 19:27 ` Stefan Monnier
2014-06-24 19:40   ` Rich Felker
2014-06-24 20:24     ` Stefan Monnier
2014-06-24 21:15       ` Rich Felker
2014-06-24 21:37         ` Stefan Monnier
2014-06-25 18:03 ` Dmitry Antipov
2014-06-25 18:08   ` Rich Felker
2014-06-25 18:30     ` Dmitry Antipov
2014-06-25 18:36       ` Rich Felker
2014-06-25 18:36       ` Eli Zaretskii
2014-06-25 18:41     ` Eli Zaretskii
2014-06-26  0:16     ` Stephen J. Turnbull
2014-06-25 18:20   ` Eli Zaretskii
2014-06-25 18:32     ` Rich Felker
2014-06-25 18:49       ` Eli Zaretskii
2014-06-25 19:03         ` Rich Felker
2014-06-25 19:18           ` Eli Zaretskii
2014-06-25 19:57             ` Rich Felker
2014-06-25 20:15               ` Eli Zaretskii
2014-06-25 20:34                 ` Rich Felker
2014-06-26  2:44                   ` Eli Zaretskii
2014-06-26  4:28                     ` Rich Felker [this message]
2014-06-26 15:02                       ` Eli Zaretskii
2014-06-25 20:11             ` Stefan Monnier
2014-06-25 20:06           ` Stefan Monnier
2014-06-25 20:24             ` Rich Felker
2014-06-25 21:43               ` Stefan Monnier
2014-06-25 22:07                 ` Rich Felker
2014-06-25 23:04                   ` Paul Eggert
2014-06-25 23:21                     ` Rich Felker
2014-06-25 23:05                   ` Stefan Monnier
2014-06-25 23:19                     ` Rich Felker
2014-06-26  3:02                   ` Dmitry Antipov
2014-06-26  4:14                     ` Rich Felker
2014-06-26  4:32                       ` Dmitry Antipov
2014-06-26 11:49                         ` Rich Felker
2014-06-26 15:03                         ` Eli Zaretskii
2014-06-26 15:10                           ` Rich Felker
2014-06-25 22:33               ` Andreas Schwab
2014-06-25 20:53       ` Samuel Bronson
2014-06-25 21:24         ` Rich Felker
2014-06-25 18:38   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140626042839.GI179@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=dmantipov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.