NetBSD Problem Report #45405

From www@NetBSD.org  Mon Sep 26 18:47:48 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 5059763D405
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 26 Sep 2011 18:47:48 +0000 (UTC)
Message-Id: <20110926184747.913D163C7BD@www.NetBSD.org>
Date: Mon, 26 Sep 2011 18:47:47 +0000 (UTC)
From: hommetrebar@free.fr
Reply-To: hommetrebar@free.fr
To: gnats-bugs@NetBSD.org
Subject: Emacs-snapshot does not compile (temacs segfaults)
X-Send-Pr-Version: www-1.0

>Number:         45405
>Category:       pkg
>Synopsis:       Emacs-snapshot does not compile (temacs segfaults)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 26 18:50:00 +0000 2011
>Closed-Date:    Sat Jun 30 21:32:38 +0000 2012
>Last-Modified:  Sat Jun 30 21:32:38 +0000 2012
>Originator:     Delrue Rémi
>Release:        5.1
>Organization:
>Environment:
NetBSD sigmund 5.1 NetBSD 5.1 (GENERIC) #0: Sat Nov  6 13:19:33 UTC 2010  builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-RELEASE/amd64/201011061943Z-obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
When compiling editors/emacs-snapshot, the execution of temacs fails with a segmentation fault. It may be related to PR 45395.

End of the compilation log:
----------------
gmake[3]: Leaving directory `/usr/pkgsrc/editors/emacs-snapshot/work/emacs-snapshot-20110821/lisp'
if test "no" = "yes"; then \
  ln -f temacs bootstrap-emacs; \
else \
  `/bin/pwd`/temacs --batch --load loadup bootstrap || exit 1; \
  mv -f emacs bootstrap-emacs; \
fi
Loading loadup.el (source)...
Using load-path (/usr/pkgsrc/editors/emacs-snapshot/work/emacs-snapshot-20110821/lisp /usr/pkgsrc/editors/emacs-snapshot/work/emacs-snapshot-20110821/lisp/emacs-lisp /usr/pkgsrc/editors/emacs-snapshot/work/emacs-snapshot-20110821/lisp/language /usr/pkgsrc/editors/emacs-snapshot/work/emacs-snapshot-20110821/lisp/international /usr/pkgsrc/editors/emacs-snapshot/work/emacs-snapshot-20110821/lisp/textmodes)
Loading emacs-lisp/byte-run (source)...
Loading emacs-lisp/backquote (source)...
Loading subr (source)...
Loading version.el (source)...
Loading widget (source)...
Loading custom (source)...
Loading emacs-lisp/map-ynp (source)...
Loading cus-start (source)...
Loading international/mule (source)...
Loading international/mule-conf (source)...
Loading env (source)...
Loading format (source)...
Loading bindings (source)...
Loading window (source)...
Loading /usr/pkgsrc/editors/emacs-snapshot/work/emacs-snapshot-20110821/lisp/files.el (source)...
[1]   Segmentation fault (core dumped) $(...)/temacs --...
gmake[2]: *** [bootstrap-emacs] Error 1
gmake[2]: Leaving directory `/usr/pkgsrc/editors/emacs-snapshot/work/emacs-snapshot-20110821/src'
gmake[1]: *** [src] Error 2
gmake[1]: Leaving directory `/usr/pkgsrc/editors/emacs-snapshot/work/emacs-snapshot-20110821'
gmake: *** [bootstrap] Error 2
*** Error code 2

Stop.
make: stopped in /usr/pkgsrc/editors/emacs-snapshot
*** Error code 1

>How-To-Repeat:
1. Install netbsd 5.1 (amd64)
2. Install pkgsrc tree.
3. # cd /usr/pkgsrc/editors/emacs-snapshot/
4. # make install
>Fix:

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45405: Emacs-snapshot does not compile (temacs segfaults)
Date: Thu, 29 Sep 2011 19:43:47 +0000

 On Mon, Sep 26, 2011 at 06:50:01PM +0000, hommetrebar@free.fr wrote:
  > When compiling editors/emacs-snapshot, the execution of temacs
  > fails with a segmentation fault. It may be related to PR 45395.

 editors/emacs (emacs23) is also crashing, as are some of the other
 emacs versions. See
 http://ftp.netbsd.org/pub/pkgsrc/misc/joerg/20110921.2152/meta/report.html,
 scroll down.

 Might or might not be a single shared issue.

 -- 
 David A. Holland
 dholland@netbsd.org

From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/45405: Emacs-snapshot does not compile (temacs segfaults)
Date: Fri, 30 Sep 2011 00:11:36 +0200

 On Thu, Sep 29, 2011 at 07:45:03PM +0000, David Holland wrote:
 >  editors/emacs (emacs23) is also crashing, as are some of the other
 >  emacs versions. See
 >  http://ftp.netbsd.org/pub/pkgsrc/misc/joerg/20110921.2152/meta/report.html,
 >  scroll down.
 >  
 >  Might or might not be a single shared issue.

 Just for the record -- I haven't had emacs crashing yet on my
 5.99.55/amd64, gcc-4.5. Neither during build nor later.
  Thomas

From: Dmitry Matveev <me@dmitrymatveev.co.uk>
To: <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/45405: Emacs-snapshot does not compile (temacs segfaults)
Date: Thu, 13 Oct 2011 10:11:03 +0400

 Hello,

 I confirm that emacs22, emacs23 and emacs24 (emacs-snapshot) are 
 crashing while building (at the bootstrap phase) on this night's 
 pkgsrc-current on NetBSD-current/amd64.

 Dmitry

From: Yuji Yamano <yyamano@kt.rim.or.jp>
To: gnats-bugs@NetBSD.org, me@dmitrymatveev.co.uk
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
 hommetrebar@free.fr
Subject: Re: pkg/45405: Emacs-snapshot does not compile (temacs segfaults)
Date: Sat, 15 Oct 2011 03:01:10 -0700 (PDT)

 On Thu, 13 Oct 2011 06:15:06 +0000 (UTC), Dmitry Matveev <me@dmitrymatveev.co.uk> wrote:

 >  I confirm that emacs22, emacs23 and emacs24 (emacs-snapshot) are 
 >  crashing while building (at the bootstrap phase) on this night's 
 >  pkgsrc-current on NetBSD-current/amd64.

 I have same problem. Here is backtrace.

 zillatron% uname -a
 NetBSD zillatron.p.wefunk.org 5.99.56 NetBSD 5.99.56 (GENERIC) #0: Fri Oct 14 17:12:37 UTC 2011  builds@b6.netbsd.org:/home/builds/ab/HEAD/amd64/201110141500Z-obj/home/builds/ab/HEAD/src/sys/arch/amd64/compile/GENERIC amd64
 zillatron% setenv LC_ALL C
 zillatron% gdb ./temacs
 GNU gdb (GDB) 7.3.1
 Copyright (C) 2011 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
 and "show warranty" for details.
 This GDB was configured as "x86_64--netbsd".
 For bug reporting instructions, please see:
 <http://www.gnu.org/software/gdb/bugs/>...
 Reading symbols from /usr/pkgsrc/editors/emacs22-nox11/work/emacs-22.3/src/temacs...(no debugging symbols found)...done.
 SIGINT is used by the debugger.
 Are you sure you want to change it? (y or n) [answered Y; input not from terminal]
 Environment variable "DISPLAY" not defined.
 TERM = xterm-256color
 Temporary breakpoint 1 at 0x46f436
 (gdb) run -batch -l loadup dump
 Starting program: /usr/pkgsrc/editors/emacs22-nox11/work/emacs-22.3/src/temacs -batch -l loadup dump
 Program received signal SIGSEGV, Segmentation fault.
 0x00000000004a6ec9 in emacs_blocked_malloc ()
 (gdb) bt
 #0  0x00000000004a6ec9 in emacs_blocked_malloc ()
 #1  0x00000000004a6ece in emacs_blocked_malloc ()
 #2  0x00000000004a6ece in emacs_blocked_malloc ()
 #3  0x00000000004a6ece in emacs_blocked_malloc ()
 #4  0x00000000004a6ece in emacs_blocked_malloc ()
 #5  0x00000000004a6ece in emacs_blocked_malloc ()
 #6  0x00000000004a6ece in emacs_blocked_malloc ()
 #7  0x00000000004a6ece in emacs_blocked_malloc ()
 #8  0x00000000004a6ece in emacs_blocked_malloc ()
 #9  0x00000000004a6ece in emacs_blocked_malloc ()
 #10 0x00000000004a6ece in emacs_blocked_malloc ()
 #11 0x00000000004a6ece in emacs_blocked_malloc ()
 #12 0x00000000004a6ece in emacs_blocked_malloc ()
 #13 0x00000000004a6ece in emacs_blocked_malloc ()
 #14 0x00000000004a6ece in emacs_blocked_malloc ()
 #15 0x00000000004a6ece in emacs_blocked_malloc ()
 #16 0x00000000004a6ece in emacs_blocked_malloc ()
 #17 0x00000000004a6ece in emacs_blocked_malloc ()
 #18 0x00000000004a6ece in emacs_blocked_malloc ()
 #19 0x00000000004a6ece in emacs_blocked_malloc ()
 #20 0x00000000004a6ece in emacs_blocked_malloc ()
 #21 0x00000000004a6ece in emacs_blocked_malloc ()
 #22 0x00000000004a6ece in emacs_blocked_malloc ()

 -- Yuji Yamano


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45405: Emacs-snapshot does not compile (temacs segfaults)
Date: Sat, 15 Oct 2011 18:31:01 +0000

 On Thu, Oct 13, 2011 at 06:15:06AM +0000, Dmitry Matveev wrote:
  >  I confirm that emacs22, emacs23 and emacs24 (emacs-snapshot) are 
  >  crashing while building (at the bootstrap phase) on this night's 
  >  pkgsrc-current on NetBSD-current/amd64.

 They all work for me. However, it's clear at this point that this
 problem exists and affects some people but not others. Not so clear
 why.

 -- 
 David A. Holland
 dholland@netbsd.org

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 20 Dec 2011 18:13:08 +0000
State-Changed-Why:
Are you still seeing this problem with the latest emacs-snapshot?
(Or with any other emacs version; if so please be specific)


From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/45405: Emacs-snapshot does not compile (temacs segfaults)
Date: Tue, 20 Dec 2011 18:12:28 +0000

 On Sat, Oct 15, 2011 at 10:05:04AM +0000, Yuji Yamano wrote:
  >  Reading symbols from /usr/pkgsrc/editors/emacs22-nox11/work/emacs-22.3/src/temacs...(no debugging symbols found)...done.
  >  [...]
  >  Program received signal SIGSEGV, Segmentation fault.
  >  0x00000000004a6ec9 in emacs_blocked_malloc ()
  >  (gdb) bt
  >  #0  0x00000000004a6ec9 in emacs_blocked_malloc ()
  >  #1  0x00000000004a6ece in emacs_blocked_malloc ()
  >  #2  0x00000000004a6ece in emacs_blocked_malloc ()

 This is the same problem with gcc 4.5 that I patched in emacs20 a few
 days ago. So I guess this is a confirmation that emacs22 (and
 therefore, emacs21) needs that fix.

 However, this cannot be the submitter's problem as the submitter was
 using 5.1. Neither can the submitter be having the unwind problem
 tracked in PR 45716, as that also affected only -current.

 I believe at least one other temacs crash in (only) emacs-snapshot got
 fixed upstream.

 Is there a fourth version of this problem?

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45405 CVS commit: pkgsrc/editors/emacs22
Date: Mon, 9 Jan 2012 06:30:20 +0000

 Module Name:	pkgsrc
 Committed By:	skrll
 Date:		Mon Jan  9 06:30:20 UTC 2012

 Modified Files:
 	pkgsrc/editors/emacs22: distinfo
 Added Files:
 	pkgsrc/editors/emacs22/patches: patch-src_alloc_c

 Log Message:
 Merge patch from other emacs packages - prevent from optimizing out
 __malloc_hook) to fix one source of SIGSEGVs during build.

 PR/45405 PR/35235


 To generate a diff of this commit:
 cvs rdiff -u -r1.11 -r1.12 pkgsrc/editors/emacs22/distinfo
 cvs rdiff -u -r0 -r1.1 pkgsrc/editors/emacs22/patches/patch-src_alloc_c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 30 Jun 2012 21:32:38 +0000
State-Changed-Why:
At this point the only emacs versions still dumping core are xemacs-current
(which has been broken for a long, long time) and mule. At least in any
of the bulk build results I've seen lately. So let's call this fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.