R14B Illegal instruction?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

R14B Illegal instruction?

Mark Scandariato-2
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:

erlang@ubuntu:~/otp_src_R14B$ bin/cerl -debug +A 4
Illegal instruction (core dumped)
erlang@ubuntu:~/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.
Reply | Threaded
Open this post in threaded view
|

Re: R14B Illegal instruction?

Rickard Green-2

Mark Scandariato wrote:

> 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:
>
> erlang@ubuntu:~/otp_src_R14B$ bin/cerl -debug +A 4
> Illegal instruction (core dumped)
> erlang@ubuntu:~/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.

I suspect that you have an old x86 processor, and probably need to pass
the --enable-ethread-pre-pentium4-compatibility command line argument to
  configure. See
<http://www.erlang.org/doc/installation_guide/INSTALL.html#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring>.

However, I just noted that this flag is buggy and have no effect :( I'll
fix that in the next release. As a workaround you can pass the following
as arguments to configure:
   --enable-ethread-pre-pentium4-compatibility
enable_ethread_pre_pentium4_compatibilit=yes

It is important that you pass both of them otherwise it wont work. You
can verify that it worked by verifying that the following line exists in
both
$ERL_TOP/erts/include/internal/i686-pc-linux-gnu/ethread_header_config.h
and $ERL_TOP/erts/i686-pc-linux-gnu/config.h:

#define ETHR_PRE_PENTIUM4_COMPAT 1

In order to avoid trouble, don't reuse the source tree you have already
built in. Build from scratch in a new one.

Regards,
Rickard
--
Rickard Green, Erlang/OTP, Ericsson AB.

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: R14B Illegal instruction?

Mikael Pettersson-3
In reply to this post by Mark Scandariato-2
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:
 >
 > erlang@ubuntu:~/otp_src_R14B$ bin/cerl -debug +A 4
 > Illegal instruction (core dumped)
 > erlang@ubuntu:~/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:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: R14B Illegal instruction?

Mark Scandariato-2
(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 <[hidden email]> 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:
>  >
>  > erlang@ubuntu:~/otp_src_R14B$ bin/cerl -debug +A 4
>  > Illegal instruction (core dumped)
>  > erlang@ubuntu:~/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:[hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: R14B Illegal instruction?

Mark Scandariato-2
In reply to this post by Rickard Green-2
It is a 2005-vintage AMD Athlon XP (in a VMWare virtual machine).

Configuring with "--enable-ethread-pre-pentium4-compatibility
enable_ethread_pre_pentium4_compatibilit=yes" did the trick - Thanks!

On Fri, Sep 17, 2010 at 3:52 PM, Rickard Green <[hidden email]> wrote:

>
> Mark Scandariato wrote:
>
>> 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:
>>
>> erlang@ubuntu:~/otp_src_R14B$ bin/cerl -debug +A 4
>> Illegal instruction (core dumped)
>> erlang@ubuntu:~/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.
>>
>
> I suspect that you have an old x86 processor, and probably need to pass the
> --enable-ethread-pre-pentium4-compatibility command line argument to
>  configure. See <
> http://www.erlang.org/doc/installation_guide/INSTALL.html#How-to-Build-and-Install-ErlangOTP_A-Closer-Look-at-the-individual-Steps_Configuring
> >.
>
> However, I just noted that this flag is buggy and have no effect :( I'll
> fix that in the next release. As a workaround you can pass the following as
> arguments to configure:
>  --enable-ethread-pre-pentium4-compatibility
> enable_ethread_pre_pentium4_compatibilit=yes
>
> It is important that you pass both of them otherwise it wont work. You can
> verify that it worked by verifying that the following line exists in both
> $ERL_TOP/erts/include/internal/i686-pc-linux-gnu/ethread_header_config.h and
> $ERL_TOP/erts/i686-pc-linux-gnu/config.h:
>
> #define ETHR_PRE_PENTIUM4_COMPAT 1
>
> In order to avoid trouble, don't reuse the source tree you have already
> built in. Build from scratch in a new one.
>
> Regards,
> Rickard
> --
> Rickard Green, Erlang/OTP, Ericsson AB.
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:[hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: R14B Illegal instruction?

Mikael Pettersson-3
In reply to this post by Mark Scandariato-2
Mark Scandariato writes:
 > (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
...
 > eip            0x823d51a    0x823d51a <ethr_event_reset__+25>

Sigh.  See Rickard Green's reply.  Builds on 32-bit x86 now
use Pentium 4 instructions without prior runtime checks or
explicit configure-time options.  You now have to explicitly
configure pre-Pentium 4 compatibility before the build.

Needless to say I think they got the logic wrong.  Defaults
should be safe, with options for higher-performance (but potentially
incompatible) code if needed.

________________________________________________________________
erlang-questions (at) erlang.org mailing list.
See http://www.erlang.org/faq.html
To unsubscribe; mailto:[hidden email]