all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christian Faulhammer <opfer@gentoo.org>
To: emacs@gentoo.org
Cc: emacs-devel@gnu.org
Subject: Re: Intermittent unexec failures on Linux >= 2.6.25
Date: Mon, 20 Oct 2008 19:20:33 +0200	[thread overview]
Message-ID: <20081020192033.3252b4bf@terra.solaris> (raw)
In-Reply-To: <18623.4028.181298.302150@a1ihome1.kph.uni-mainz.de>

[-- Attachment #1: Type: text/plain, Size: 1950 bytes --]

Hi,

I want to remind you of this bug report, could you please react on this
as we are able to reproduce.

<URL:http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=900>

Ulrich Mueller <ulm@gentoo.org>:
> Building of Emacs 22.2.92 (also 22.2) on Linux 2.6.25 (or later)
> sometimes fails with a segmentation fault in dump-emacs / unexec.
> 
> This was reported by Jan Hrabe as Gentoo bug 236579,
> <http://bugs.gentoo.org/236579>.
> 
> I've investigated and found that indeed temacs fails in dump-emacs
> intermittently. For my test, I have run "make; rm src/emacs" 250 times
> in a loop, and in 3 cases a segmentation fault of temacs occured.
> 
> The problem seems to be that heap_bss_diff is too large for unexec
> to succeed (due to kernel heap randomisation, see
> <http://lkml.org/lkml/2007/10/23/435>).
> 
> On the other hand, it is (in case of the 3 failures) not large enough
> to fulfill the condition (heap_bss_diff > MAX_HEAP_BSS_DIFF) which
> would trigger the correct behaviour, namely setting the personality
> and calling execve of itself.
> 
> In the 247 successful cases, heap_bss_diff first had a large value
> (up to about 32 MiB), and in the exec'd temacs its value was constant,
> namely 1887 bytes.
> 
> The 3 failures had heap_bss_diff = 575327, 911199, and 268127, which
> are all smaller than MAX_HEAP_BSS_DIFF (1024*1024), so execvp was
> _not_ called.
> 
> Where does that value of MAX_HEAP_BSS_DIFF = 1 MiB come from? Could it
> be decreased, or could temacs execve itself unconditionally on Linux?
> In my opinion, a failure rate of about 1 % is too high.
> 
> (The problem doesn't exist for Linux 2.6.24, or if heap randomisation
> is turned off, i.e. with /proc/sys/kernel/randomize_va_space < 2.)
> 
> Ulrich


-- 
Christian Faulhammer, Gentoo Lisp project
<URL:http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode

<URL:http://www.faulhammer.org/>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-10-20 17:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03 22:29 Intermittent unexec failures on Linux >= 2.6.25 Ulrich Mueller
2008-10-20 17:20 ` Christian Faulhammer [this message]
2008-10-20 17:56   ` Chong Yidong
2008-10-21  6:32     ` Jan Djärv
2008-10-21  8:32       ` Ulrich Mueller
2008-10-21 10:18         ` Jan Djärv

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=20081020192033.3252b4bf@terra.solaris \
    --to=opfer@gentoo.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs@gentoo.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.