[erlang-questions] Erlang in Debian on m68k architecture

Sergei Golovan sgolovan@REDACTED
Thu Jan 25 13:19:51 CET 2007


On 1/25/07, Mikael Pettersson <mikpe@REDACTED> wrote:
> Definitely smells like a toolchain bug to me. In this case, since you've
> enabled threads, erts_mtx_t is a properly declared struct type containing
> among other things a pthread_mutex_t, an int, and a couple of pointers.
> I don't remember how strict M68K is about alignment, but presumably it wants
> non-arbitrary alignment for word-sized fields, especially perhaps if they're
> used for atomic accesses.
>
> The error could be in gcc, gas, ld, or even libc.
>
> As GDB session on the core dump should tell us more about the location
> of the crash, the failing instruction, and what data it tried to access.

Here are two backtraces, without and with DEBUG defined. If you need
some additional info, I'll try to give it also

Without debug:
-----------------------------------------------------
Program terminated with signal 11, Segmentation fault.
#0  0x8007783a in erts_garbage_collect (p=0xc03000e4, need=5,
objv=0x800f8764, nobj=1) at beam/ggc.c:1814
1814                        MOVE_BOXED(ptr,val,n_htop,g_ptr++);
(gdb) bt
#0  0x8007783a in erts_garbage_collect (p=0xc03000e4, need=5,
objv=0x800f8764, nobj=1) at beam/ggc.c:1814
#1  0x80089348 in process_main () at
m68k-unknown-linux-gnu/opt/plain/beam_hot.h:1368
#2  0x8002a236 in erl_start (argc=37, argv=0xeffff594) at beam/erl_init.c:928
#3  0x80017daa in main (argc=37, argv=0xeffff594) at sys/unix/erl_main.c:28
(gdb) p erts_garbage_collect::p
$1 = (Process *) 0xc03000e4
(gdb) p erts_garbage_collect::ptr
No symbol "ptr" in specified context.
(gdb) p erts_garbage_collect::val
No symbol "val" in specified context.
-----------------------------------------------------

With debug.
-----------------------------------------------------
(gdb) bt
#0  0xc0103522 in kill () from /lib/libc.so.6
#1  0xc004a87e in pthread_kill () from /lib/libpthread.so.0
#2  0xc004a8b6 in raise () from /lib/libpthread.so.0
#3  0xc0103380 in raise () from /lib/libc.so.6
#4  0xc0104266 in abort () from /lib/libc.so.6
#5  0x8009b534 in et_abort (expr=0x800fb643 "_is_aligned(x)",
file=0x800fa37f "beam/erl_lock_check.c", line=1018) at
beam/erl_term.c:45
#6  0x8009c1b4 in checked_make_boxed (x=0x0, file=0x800fa37f
"beam/erl_lock_check.c", line=1018) at beam/erl_term.c:123
#7  0x80092bca in erts_lc_init_lock (lck=0x8015abe2, name=0x800f0178
"binary_alloc", flags=0) at beam/erl_lock_check.c:1018
#8  0x800504c0 in erts_mtx_init (mtx=0x8015abba, name=0x800f0178
"binary_alloc") at beam/erl_threads.h:249
#9  0x800731e6 in erts_init_binary () at beam/binary.c:40
#10 0x8002d85c in erl_init () at beam/erl_init.c:211
#11 0x8002e568 in erl_start (argc=37, argv=0xeffff58c) at beam/erl_init.c:907
#12 0x8001a6fe in main (argc=37, argv=0xeffff584) at sys/unix/erl_main.c:28
-----------------------------------------------------

-- 
Sergei Golovan



More information about the erlang-questions mailing list