From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Christian Faulhammer Newsgroups: gmane.emacs.devel Subject: Re: Intermittent unexec failures on Linux >= 2.6.25 Date: Mon, 20 Oct 2008 19:20:33 +0200 Message-ID: <20081020192033.3252b4bf@terra.solaris> References: <18623.4028.181298.302150@a1ihome1.kph.uni-mainz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/GG7lEHuGF8oti4TNv5ocxvI"; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Trace: ger.gmane.org 1224538649 23568 80.91.229.12 (20 Oct 2008 21:37:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Oct 2008 21:37:29 +0000 (UTC) Cc: emacs-devel@gnu.org To: emacs@gentoo.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 20 23:38:26 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KryUS-0003wA-F4 for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2008 19:24:24 +0200 Original-Received: from localhost ([127.0.0.1]:58413 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KryTN-0006WO-3u for ged-emacs-devel@m.gmane.org; Mon, 20 Oct 2008 13:23:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KryRx-0005vk-22 for emacs-devel@gnu.org; Mon, 20 Oct 2008 13:21:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KryRw-0005uX-7o for emacs-devel@gnu.org; Mon, 20 Oct 2008 13:21:48 -0400 Original-Received: from [199.232.76.173] (port=42163 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KryRv-0005uB-7r for emacs-devel@gnu.org; Mon, 20 Oct 2008 13:21:47 -0400 Original-Received: from mo-p05-ob.rzone.de ([81.169.146.181]:43814) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KryRs-00070f-KY for emacs-devel@gnu.org; Mon, 20 Oct 2008 13:21:45 -0400 X-RZG-CLASS-ID: mo05 X-RZG-AUTH: :K2kKYU+nW/MMMlTokcN5Yot1/Bj/FTl+WviP6RIJci0HRMpbh/x+X6ShOQjVOj0+68PQLwoCM28= Original-Received: from terra.solaris (p54AE4D8C.dip.t-dialin.net [84.174.77.140]) by post.webmailer.de (mrclete mo41) (RZmta 17.14) with ESMTP id i00de5k9KGI4fN ; Mon, 20 Oct 2008 19:21:34 +0200 (MEST) (envelope-from: ) In-Reply-To: <18623.4028.181298.302150@a1ihome1.kph.uni-mainz.de> X-Mailer: Claws Mail 3.6.1 (GTK+ 2.12.11; i686-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:104693 Archived-At: --Sig_/GG7lEHuGF8oti4TNv5ocxvI Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, I want to remind you of this bug report, could you please react on this as we are able to reproduce. Ulrich Mueller : > 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. >=20 > This was reported by Jan Hrabe as Gentoo bug 236579, > . >=20 > 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. >=20 > The problem seems to be that heap_bss_diff is too large for unexec > to succeed (due to kernel heap randomisation, see > ). >=20 > 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. >=20 > 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. >=20 > The 3 failures had heap_bss_diff =3D 575327, 911199, and 268127, which > are all smaller than MAX_HEAP_BSS_DIFF (1024*1024), so execvp was > _not_ called. >=20 > Where does that value of MAX_HEAP_BSS_DIFF =3D 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. >=20 > (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.) >=20 > Ulrich --=20 Christian Faulhammer, Gentoo Lisp project , #gentoo-lisp on FreeNode --Sig_/GG7lEHuGF8oti4TNv5ocxvI Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkj8veEACgkQNQqtfCuFneNCPgCglsTnjxMxU+1cSUdwpM/Ui0r1 wEoAoI2HGHr+T8++nJbyiT5rhuw8Dlsn =LIjj -----END PGP SIGNATURE----- --Sig_/GG7lEHuGF8oti4TNv5ocxvI--