>>>>> "SG" == Sergei Golovan <sgolo...@gmail.com> writes:

 SG> Hi!  I've tried to reproduce this bug, but I erlang works fine on
 SG> i386 architecture, so the problem may be architecture-specific.

        Did you try it under UML, or on a plain i386-based GNU/Linux
        system?

        I could probably arrange for an SSH-accessible UML/amd64
        instance, if necessary.  Presumably IPv6-only, so one'd be
        expected to either have native IPv6 connectivity, or wishing to
        invest a few minutes of his (her) own time to, e. g., install
        the miredo package.

 SG> Yesterday, I've uploaded new version which can be built with debug
 SG> information included.

        I've tried to build it under UML, but to no avail.  Apparently,
        the Erlang implementation used as part of the build process also
        fails to run under UML on amd64.  See below for details.

 SG> Could you grab 1:13.b.1-dfsg-4 sources,

$ apt-get source erlang 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
...
gpgv: keyblock resource `/[...]/.gnupg/trustedkeys.gpg': general error
gpgv: Signature made Thu Aug  6 02:37:01 2009 NOVST using DSA key ID 6A461052
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./erlang_13.b.1-dfsg-5.dsc
dpkg-source: info: extracting erlang in erlang-13.b.1-dfsg
dpkg-source: info: unpacking erlang_13.b.1-dfsg.orig.tar.gz
dpkg-source: info: applying erlang_13.b.1-dfsg-5.diff.gz
$ 

 SG> install libwxgtk2.8-dbg package along with erlang build
 SG> dependencies,

# apt-get install -V libwxgtk2.8-dbg gsfonts{,-x11} fakeroot 
...
# apt-get build-dep erlang 
...
# 

 SG> and rebuild the package with DEB_BUILD_OPTIONS set to
 SG> 'debug nostrip':

 SG> DEB_BUILD_OPTIONS='debug nostrip' dpkg-buildpackage -rfakeroot -b

 SG> (after unpacking: dpkg-source -x erlang_13.b.1-dfsg-4.dsc)?

$ cd erlang-13.b.1-dfsg 
$ DEB_BUILD_OPTIONS='debug nostrip' LC_ALL=C nice -n+19 nohup /usr/bin/time \
      dpkg-buildpackage -rfakeroot -b \
      > ../erlang_13.b.1-dfsg-5.nohup.out-1 2>&1 & 

        Then, it's failed as before in the middle of the build:

*** glibc detected *** 
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug: free(): invalid 
next size (fast): 0x00000000008f73c0 ***
======= Backtrace: =========
/lib/libc.so.6[0x40f816c8]
/lib/libc.so.6(cfree+0x76)[0x40f831d6]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erts_sys_free+0x1c)[0x57884f]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x439b72]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x43f841]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x43ae05]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x442174]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erts_alcu_free+0x23)[0x442199]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x4360b6]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erts_free+0x52)[0x42e09b]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x4a9d6b]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erts_early_init_scheduling+0x9)[0x4a5c50]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x44bb8a]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erl_start+0x53)[0x44bc05]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(main+0x1b)[0x42ba97]
/lib/libc.so.6(__libc_start_main+0xe6)[0x40f2e5c6]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x42b9b9]
======= Memory map: ========
00100000-00102000 r-xp 00100000 00:00 0 
00400000-00649000 r-xp 00000000 62:00 247625                             
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug
00848000-00883000 rw-p 00248000 62:00 247625                             
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug
00883000-008f8000 rwxp 00883000 00:00 0                                  [heap]
40000000-4001d000 r-xp 00000000 62:00 73758                              
/lib/ld-2.9.so
4001d000-40020000 rw-p 4001d000 00:00 0 
40027000-40150000 rw-p 40027000 00:00 0 
4021c000-4021d000 r--p 0001c000 62:00 73758                              
/lib/ld-2.9.so
4021d000-4021e000 rw-p 0001d000 62:00 73758                              
/lib/ld-2.9.so
4021e000-40220000 r-xp 00000000 62:00 73743                              
/lib/libutil-2.9.so
40220000-4041f000 ---p 00002000 62:00 73743                              
/lib/libutil-2.9.so
4041f000-40420000 r--p 00001000 62:00 73743                              
/lib/libutil-2.9.so
40420000-40421000 rw-p 00002000 62:00 73743                              
/lib/libutil-2.9.so
40421000-40423000 r-xp 00000000 62:00 73766                              
/lib/libdl-2.9.so
40423000-40623000 ---p 00002000 62:00 73766                              
/lib/libdl-2.9.so
40623000-40624000 r--p 00002000 62:00 73766                              
/lib/libdl-2.9.so
40624000-40625000 rw-p 00003000 62:00 73766                              
/lib/libdl-2.9.so
40625000-406a7000 r-xp 00000000 62:00 73768                              
/lib/libm-2.9.so
406a7000-408a6000 ---p 00082000 62:00 73768                              
/lib/libm-2.9.so
408a6000-408a7000 r--p 00081000 62:00 73768                              
/lib/libm-2.9.so
408a7000-408a8000 rw-p 00082000 62:00 73768                              
/lib/libm-2.9.so
408a8000-408e8000 r-xp 00000000 62:00 73794                              
/lib/libncurses.so.5.7
408e8000-40ae8000 ---p 00040000 62:00 73794                              
/lib/libncurses.so.5.7
40ae8000-40aed000 rw-p 00040000 62:00 73794                              
/lib/libncurses.so.5.7
40aed000-40b03000 r-xp 00000000 62:00 73756                              
/lib/libpthread-2.9.so
40b03000-40d02000 ---p 00016000 62:00 73756                              
/lib/libpthread-2.9.so
40d02000-40d03000 r--p 00015000 62:00 73756                              
/lib/libpthread-2.9.so
40d03000-40d04000 rw-p 00016000 62:00 73756                              
/lib/libpthread-2.9.so
40d04000-40d08000 rw-p 40d04000 00:00 0 
40d08000-40d0f000 r-xp 00000000 62:00 73762                              
/lib/librt-2.9.so
40d0f000-40f0e000 ---p 00007000 62:00 73762                              
/lib/librt-2.9.so
40f0e000-40f0f000 r--p 00006000 62:00 73762                              
/lib/librt-2.9.so
40f0f000-40f10000 rw-p 00007000 62:00 73762                              
/lib/librt-2.9.so
40f10000-41057000 r-xp 00000000 62:00 73744                              
/lib/libc-2.9.so
41057000-41257000 ---p 00147000 62:00 73744                              
/lib/libc-2.9.so
41257000-4125b000 r--p 00147000 62:00 73744                              
/lib/libc-2.9.so
4125b000-4125c000 rw-p 0014b000 62:00 73744                              
/lib/libc-2.9.so
4125c000-41462000 rw-p 4125c000 00:00 0 
41462000-4147c000 r-xp 00000000 62:00 73793                              
/lib/libgcc_s.so.1
4147c000-4167b000 ---p 0001a000 62:00 73793                              
/lib/libgcc_s.so.1
4167b000-4167c000 rw-p 00019000 62:00 73793                              
/lib/libgcc_s.so.1
44000000-44008000 rw-p 44000000 00:00 0 
44008000-48000000 ---p 44008000 00:00 0 
7fbfa14000-7fbfa29000 rw-p 7fbffe9000 00:00 0                            [stack]

        The last lines in erlang_13.b.1-dfsg-5.nohup.out-1 read:

make[2]: Leaving directory `/[...]/erlang-13.b.1-dfsg/erts'
cd lib && \
          ERL_TOP=/[...]/erlang-13.b.1-dfsg 
PATH=/[...]/erlang-13.b.1-dfsg/bootstrap/bin:${PATH} \
                make opt SECONDARY_BOOTSTRAP=true
make[2]: Entering directory `/[...]/erlang-13.b.1-dfsg/lib'
make[3]: Entering directory `/[...]/erlang-13.b.1-dfsg/lib/parsetools'
=== Entering application parsetools
make[4]: Entering directory `/[...]/erlang-13.b.1-dfsg/lib/parsetools/src'
erlc -W  +compressed +debug_info +warn_obsolete_guard 
-I/[...]/erlang-13.b.1-dfsg/lib/stdlib/include -o../ebin leex.erl
make[4]: *** [../ebin/leex.beam] Aborted
make[4]: Leaving directory `/[...]/erlang-13.b.1-dfsg/lib/parsetools/src'
make[3]: *** [opt] Error 2
make[3]: Leaving directory `/[...]/erlang-13.b.1-dfsg/lib/parsetools'
make[2]: *** [opt] Error 2
make[2]: Leaving directory `/[...]/erlang-13.b.1-dfsg/lib'
make[1]: *** [secondary_bootstrap_build] Error 2
make[1]: Leaving directory `/[...]/erlang-13.b.1-dfsg'
make: *** [build-stnd-stamp] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
Command exited with non-zero status 2
83.90user 25.52system 9:11.90elapsed 19%CPU (0avgtext+0avgdata 0maxresident)k
59688inputs+108136outputs (257major+6136449minor)pagefaults 0swaps

 SG> When you install the newly built erlang-base package, running erl
 SG> should give more informative backtrace. Installing libc6-dbg
 SG> package may add even more info.

        Well, with libc6-dbg and gdb installed, I was able to:

$ cd erlang-13.b.1-dfsg 
$ EMU=beam.debug ROOTDIR="$PWD"/bootstrap \
      BINDIR="$PWD"/bin/x86_64-pc-linux-gnu PROGNAME=erl \
      gdb bin/x86_64-pc-linux-gnu/erlexec 
GNU gdb (GDB) 6.8.50.20090628-cvs-debian
Copyright (C) 2009 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-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
(gdb) r
Starting program: /[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/erlexec 
Executing new program: 
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug
[Thread debugging using libthread_db enabled]
*** glibc detected *** 
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug: free(): invalid 
next size (fast): 0x00000000008f73c0 ***
======= Backtrace: =========
/lib/libc.so.6[0x40f816c8]
/lib/libc.so.6(cfree+0x76)[0x40f831d6]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erts_sys_free+0x1c)[0x57884f]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x439b72]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x43f841]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x43ae05]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x442174]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erts_alcu_free+0x23)[0x442199]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x4360b6]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erts_free+0x52)[0x42e09b]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x4a9d6b]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erts_early_init_scheduling+0x9)[0x4a5c50]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x44bb8a]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(erl_start+0x53)[0x44bc05]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug(main+0x1b)[0x42ba97]
/lib/libc.so.6(__libc_start_main+0xe6)[0x40f2e5c6]
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug[0x42b9b9]
======= Memory map: ========
00100000-00102000 r-xp 00100000 00:00 0 
00400000-00649000 r-xp 00000000 62:00 247625                             
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug
00848000-00883000 rw-p 00248000 62:00 247625                             
/[...]/erlang-13.b.1-dfsg/bin/x86_64-pc-linux-gnu/beam.debug
00883000-008f8000 rwxp 00883000 00:00 0                                  [heap]
40000000-4001d000 r-xp 00000000 62:00 73758                              
/lib/ld-2.9.so
4001d000-40020000 rw-p 4001d000 00:00 0 
40027000-40150000 rw-p 40027000 00:00 0 
4021c000-4021d000 r--p 0001c000 62:00 73758                              
/lib/ld-2.9.so
4021d000-4021e000 rw-p 0001d000 62:00 73758                              
/lib/ld-2.9.so
4021e000-40220000 r-xp 00000000 62:00 73743                              
/lib/libutil-2.9.so
40220000-4041f000 ---p 00002000 62:00 73743                              
/lib/libutil-2.9.so
4041f000-40420000 r--p 00001000 62:00 73743                              
/lib/libutil-2.9.so
40420000-40421000 rw-p 00002000 62:00 73743                              
/lib/libutil-2.9.so
40421000-40423000 r-xp 00000000 62:00 73766                              
/lib/libdl-2.9.so
40423000-40623000 ---p 00002000 62:00 73766                              
/lib/libdl-2.9.so
40623000-40624000 r--p 00002000 62:00 73766                              
/lib/libdl-2.9.so
40624000-40625000 rw-p 00003000 62:00 73766                              
/lib/libdl-2.9.so
40625000-406a7000 r-xp 00000000 62:00 73768                              
/lib/libm-2.9.so
406a7000-408a6000 ---p 00082000 62:00 73768                              
/lib/libm-2.9.so
408a6000-408a7000 r--p 00081000 62:00 73768                              
/lib/libm-2.9.so
408a7000-408a8000 rw-p 00082000 62:00 73768                              
/lib/libm-2.9.so
408a8000-408e8000 r-xp 00000000 62:00 73794                              
/lib/libncurses.so.5.7
408e8000-40ae8000 ---p 00040000 62:00 73794                              
/lib/libncurses.so.5.7
40ae8000-40aed000 rw-p 00040000 62:00 73794                              
/lib/libncurses.so.5.7
40aed000-40b03000 r-xp 00000000 62:00 73756                              
/lib/libpthread-2.9.so
40b03000-40d02000 ---p 00016000 62:00 73756                              
/lib/libpthread-2.9.so
40d02000-40d03000 r--p 00015000 62:00 73756                              
/lib/libpthread-2.9.so
40d03000-40d04000 rw-p 00016000 62:00 73756                              
/lib/libpthread-2.9.so
40d04000-40d08000 rw-p 40d04000 00:00 0 
40d08000-40d0f000 r-xp 00000000 62:00 73762                              
/lib/librt-2.9.so
40d0f000-40f0e000 ---p 00007000 62:00 73762                              
/lib/librt-2.9.so
40f0e000-40f0f000 r--p 00006000 62:00 73762                              
/lib/librt-2.9.so
40f0f000-40f10000 rw-p 00007000 62:00 73762                              
/lib/librt-2.9.so
40f10000-41057000 r-xp 00000000 62:00 73744                              
/lib/libc-2.9.so
41057000-41257000 ---p 00147000 62:00 73744                              
/lib/libc-2.9.so
41257000-4125b000 r--p 00147000 62:00 73744                              
/lib/libc-2.9.so
4125b000-4125c000 rw-p 0014b000 62:00 73744                              
/lib/libc-2.9.so
4125c000-41462000 rw-p 4125c000 00:00 0 
41462000-4147c000 r-xp 00000000 62:00 73793                              
/lib/libgcc_s.so.1
4147c000-4167b000 ---p 0001a000 62:00 73793                              
/lib/libgcc_s.so.1
4167b000-4167c000 rw-p 00019000 62:00 73793                              
/lib/libgcc_s.so.1
44000000-44008000 rw-p 44000000 00:00 0 
44008000-48000000 ---p 44008000 00:00 0 
7fbffe9000-7fbfffe000 rw-p 7fbffe9000 00:00 0                            [stack]

Program received signal SIGABRT, Aborted.
0x0000000040f41d25 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
#0  0x0000000040f41d25 in *__GI_raise (sig=<value optimized out>)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x0000000040f44de1 in *__GI_abort () at abort.c:88
#2  0x0000000040f77cf8 in __libc_message (do_abort=2, 
    fmt=0x4102ab28 "*** glibc detected *** %s: %s: 0x%s ***\n")
    at ../sysdeps/unix/sysv/linux/libc_fatal.c:173
#3  0x0000000040f816c8 in malloc_printerr (action=2, 
    str=0x4102ab78 "free(): invalid next size (fast)", 
    ptr=<value optimized out>) at malloc.c:5994
#4  0x0000000040f831d6 in *__GI___libc_free (mem=0x410213a0) at malloc.c:3625
#5  0x000000000057884f in erts_sys_free (t=0, x=0x0, p=0x8f73c0)
    at sys/unix/sys.c:2594
#6  0x0000000000439b72 in alcu_sys_free (allctr=0x883be0, ptr=0x8f73c0)
    at beam/erl_alloc_util.c:517
#7  0x000000000043f841 in destroy_carrier (allctr=0x883be0, blk=0x8f73e0)
    at beam/erl_alloc_util.c:1620
#8  0x000000000043ae05 in mbc_free (allctr=0x883be0, p=0x8f73e8)
    at beam/erl_alloc_util.c:848
#9  0x0000000000442174 in do_erts_alcu_free (type=97, extra=0x883be0, 
    p=0x8f73e8) at beam/erl_alloc_util.c:2636
#10 0x0000000000442199 in erts_alcu_free (type=97, extra=0x883be0, p=0x8f73e8)
    at beam/erl_alloc_util.c:2642
#11 0x00000000004360b6 in debug_free (n=97, extra=0x8881a0, ptr=0x8f73f8)
    at beam/erl_alloc.c:3114
#12 0x000000000042e09b in erts_free (type=12501, ptr=0x8f73f8)
---Type <return> to continue, or q <return> to quit---
    at beam/erl_alloc.h:205
#13 0x00000000004a9d6b in early_cpu_bind_init () at beam/erl_process.c:4480
#14 0x00000000004a5c50 in erts_early_init_scheduling ()
    at beam/erl_process.c:2031
#15 0x000000000044bb8a in early_init (argc=0x7fbfffd81c, argv=0x7fbfffda98)
    at beam/erl_init.c:734
#16 0x000000000044bc05 in erl_start (argc=9, argv=0x7fbfffda98)
    at beam/erl_init.c:763
#17 0x000000000042ba97 in main (argc=9, argv=0x7fbfffda98)
    at sys/unix/erl_main.c:29
(gdb) 
$ 

        Hopefully the above helps.

-- 
FSF associate member #7257



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to