[erlang-questions] R14B Illegal instruction?

Mark Scandariato <>
Fri Sep 17 23:04:45 CEST 2010


(gdb) disassemble
Dump of assembler code for function ethr_event_reset__:
0x0823d501 <ethr_event_reset__+0>:    push   %ebp
0x0823d502 <ethr_event_reset__+1>:    mov    %esp,%ebp
0x0823d504 <ethr_event_reset__+3>:    sub    $0x8,%esp
0x0823d507 <ethr_event_reset__+6>:    mov    0x8(%ebp),%eax
0x0823d50a <ethr_event_reset__+9>:    movl   $0x77777777,0x4(%esp)
0x0823d512 <ethr_event_reset__+17>:    mov    %eax,(%esp)
0x0823d515 <ethr_event_reset__+20>:    call   0x8238488 <ethr_atomic_set>
0x0823d51a <ethr_event_reset__+25>:    mfence
0x0823d51d <ethr_event_reset__+28>:    leave
0x0823d51e <ethr_event_reset__+29>:    ret
End of assembler dump.
(gdb) info all-registers
eax            0x77777777    2004318071
ecx            0xb78084b4    -1216314188
edx            0xb75ce030    -1218650064
ebx            0xb776fff4    -1216937996
esp            0xbfcb3010    0xbfcb3010
ebp            0xbfcb3018    0xbfcb3018
esi            0x82427e0    136587232
edi            0x807f050    134738000
eip            0x823d51a    0x823d51a <ethr_event_reset__+25>
eflags         0x10282    [ SF IF RF ]
cs             0x73    115
ss             0x7b    123
ds             0x7b    123
es             0x7b    123
fs             0x0    0
gs             0x33    51
st0            0    (raw 0x00000000000000000000)
st1            0    (raw 0x00000000000000000000)
st2            0    (raw 0x00000000000000000000)
st3            0    (raw 0x00000000000000000000)
st4            0    (raw 0x00000000000000000000)
st5            0    (raw 0x00000000000000000000)
st6            0    (raw 0x00000000000000000000)
st7            0    (raw 0x00000000000000000000)
fctrl          0x37f    895
fstat          0x0    0
ftag           0xffff    65535
fiseg          0x0    0
fioff          0x0    0
foseg          0x0    0
fooff          0x0    0
fop            0x0    0
xmm0           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm1           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm2           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm3           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm4           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm5           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm6           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
xmm7           {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},
v16_int8 = {0x0 <repeats 16 times>}, v8_int16 = {0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0}, v4_int32 = {0x0, 0x0, 0x0, 0x0}, v2_int64 = {0x0, 0x0},
uint128 = 0x00000000000000000000000000000000}
mxcsr          0x1f80    [ IM DM ZM OM UM PM ]
mm0            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm1            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm2            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm3            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm4            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm5            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm6            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}
mm7            {uint64 = 0x0, v2_int32 = {0x0, 0x0}, v4_int16 = {0x0, 0x0,
0x0, 0x0}, v8_int8 = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}}





On Fri, Sep 17, 2010 at 4:08 PM, Mikael Pettersson <> wrote:

> Mark Scandariato writes:
>  > I just built R14B for Ubuntu 9.04 (gcc version 4.3.3 (Ubuntu
>  > 4.3.3-5ubuntu4)) and when I try to enable some async threads, I get an
>  > "Illegal instruction" fault.
>  >
>  > Here's a stack trace:
>  >
>  > :~/otp_src_R14B$ bin/cerl -debug +A 4
>  > Illegal instruction (core dumped)
>  > :~/otp_src_R14B$ gdb --core=core
>  > GNU gdb 6.8-debian
>  > Copyright (C) 2008 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 "i486-linux-gnu".
>  > (no debugging symbols found)
>  > Core was generated by
>  > `/home/erlang/otp_src_R14B/bin/i686-pc-linux-gnu/beam.debug -A 4 --
> -root
>  > /h'.
>  > Program terminated with signal 4, Illegal instruction.
>  > [New process 28563]
>  > [New process 28587]
>  > #0  0x0823d51a in ?? ()
>  > (gdb) file /home/erlang/otp_src_R14B/bin/i686-pc-linux-gnu/beam.debug
>  > Reading symbols from
>  > /home/erlang/otp_src_R14B/bin/i686-pc-linux-gnu/beam.debug...done.
>  > (gdb) where
>  > #0  ethr_event_reset__ (e=0xb769c030) at
>  > ../include/internal/pthread/ethr_event.h:94
>  > #1  0x0823d723 in ethr_event_reset (e=0xb769c030) at
>  > pthread/ethr_event.c:200
>  > #2  0x0823cf1c in ethr_thr_create (tid=0xb7580ca4, func=0x81515c6
>  > <async_main>, arg=0xb7580c48, opts=0xbfb85348) at pthread/ethread.c:256
>  > #3  0x080cb160 in erts_thr_create (tid=0xb7580ca4, func=0x81515c6
>  > <async_main>, arg=0xb7580c48, opts=0xbfb85348) at beam/erl_threads.h:348
>  > #4  0x081511bb in init_async (hndl=6) at beam/erl_async.c:143
>  > #5  0x081c62ab in async_drv_start (port_num=1, name=0x825f3fa "async",
>  > opts=0xbfb85400) at sys/unix/sys.c:2375
>  > #6  0x080e48d5 in erts_open_driver (driver=0xb769dbb8, pid=4294967291,
>  > name=0x825f3fa "async", opts=0xbfb85400, error_number_ptr=0x0)
>  >     at beam/io.c:641
>  > #7  0x081c66a5 in sys_init_io () at sys/unix/sys.c:2528
>  > #8  0x080e60d3 in init_io () at beam/io.c:1304
>  > #9  0x0809b41b in erl_init () at beam/erl_init.c:281
>  > #10 0x0809dd25 in erl_start (argc=15, argv=0xbfb85704) at
>  > beam/erl_init.c:1389
>  > #11 0x0807f126 in main (argc=4001536, argv=0x0) at
> sys/unix/erl_main.c:29
>  >
>  >
>  > I can send a core file if anyone wants it.
>
> Show us (a) the contents of the registers, and (b) a disassembly
> of the code surrounding the PC that faulted.
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
>
>


More information about the erlang-questions mailing list