pkgsrc-Bugs archive

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

pkg/46632: i386 emacs can't be build in 32bit emulation on amd64



>Number:         46632
>Category:       pkg
>Synopsis:       i386 emacs can't be build in 32bit emulation on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 27 10:00:00 +0000 2012
>Originator:     Ignatios Souvatzis
>Release:        NetBSD 6.0_BETA2
>Organization:
computer science department, university of Bonn, Germany
>Environment:
        
        
System:
(Host) NetBSD random84.cs.uni-bonn.de 6.0_BETA NetBSD 6.0_BETA (GENERIC) #0: 
Fri Mar  9 13:21:26 CET 2012  
ignatios%random84.cs.uni-bonn.de@localhost:/var/itch/sources/6.0/oamd64/sys/arch/amd64/compile/GENERIC
 amd64
Architecture: amd64
Machine: amd64

(pkg building chroot) NetBSD random84.cs.uni-bonn.de 6.0_BETA NetBSD 6.0_BETA 
(GENERIC) #0: Fri Mar  9 13:21:26 CET 2012  
ignatios%random84.cs.uni-bonn.de@localhost:/var/itch/sources/6.0/oamd64/sys/arch/amd64/compile/GENERIC
 i386

Architecture: i386
Machine: i386

>Description:

        I'm building all packages needed for amd64 and i386 on a designated
amd64 machine, using various build directories set up with pkg_comp.

So far, this worked fine (with the exception of Ooo). However, with
netbsd-6.0beta2 environment and 2011Q1, the created emacs (which still
works fine inside that environment) doesn't work on either a physical
32bit machine running NetBSD/i386 or a XEN DOMU running a 32bit PAE
kernel.

I've checked nearly all available emacs and emacs-nox11 and xemacs
packages.

ktrace/kdump shows:

 28292      1 emacs    CALL  __sigprocmask14(1,0xbf7fe990,0xbf7fea10)
 28292      1 emacs    RET   __sigprocmask14 0
 28292      1 emacs    CALL  __sigprocmask14(3,0xbf7fea10,0)
 28292      1 emacs    RET   __sigprocmask14 0
 28292      1 emacs    PSIG  SIGSEGV SIG_DFL: code=SEGV_MAPERR, 
addr=0xffffeff4, trap=6)
 28292      1 emacs    NAMI  "emacs.core"

The address (ffffeff4) is always the same, for all emacs versions; I note
it is one page minus 3 longwords below 0x100000000.

Speculation:

I suspect that in this environment, either

- temacs'  memory allocator uses 0 as the upper base of heap allocation,
  and thusly allocated memory is later unexec()d to the final emacs binary

or maybe
- temacs' unexec() itself, for some reason, created those addresses (but
  it wouldn't arrange memory itself, would it?)

The memory allocator might be either in emacs, or (given that all emacsen
stopped working at the same time) one of ours, maybe indirectly called.

The problem might be that our 32bit emulation environment allows for more 
address space to be used than available on real NetBSD/i386; I think the 
latter reserves the upper 2^24 or 2^28 bytes for the kernel?

>How-To-Repeat:
        pkg_comp makeroot; pkg_comp chroot; cd /usr/pkgsrc/editors/emacs; 
        make package
        ...
        pkg_add emacs*tgz; emacs
>Fix:
        workaround: build on a real 32bit system, or a 32bit PAE XEN DomU

>Unformatted:
        
        
        2011Q1


Home | Main Index | Thread Index | Old Index