[erlang-questions] Re: Erlang/OTP R14B01 has been released

Raimo Niskanen <>
Mon Dec 13 17:40:26 CET 2010


On Mon, Dec 13, 2010 at 05:12:37PM +0100, Boris Mühmer wrote:
> Am Sonntag, den 12.12.2010, 09:32 -0800 schrieb Zvi:
> > running new inet:getifaddrs/0 on my Ubuntu machine results in
> > segfault:
> > 
> > [~]$ erl
> > Erlang R14B01 (erts-5.8.2) [source] [smp:2:2] [rq:2] [async-threads:0]
> > [hipe] [kernel-poll:false]
> > 
> > Eshell V5.8.2  (abort with ^G)
> > 1>
> > 1> inet:getifaddrs().
> > Segmentation fault
> > [~]$
> 
> I am getting this as well.
> 
> $ uname -a
> Linux yang 2.6.35-23-generic #41-Ubuntu SMP Wed Nov 24 11:55:36 UTC 2010
> x86_64 GNU/Linux
> 
> $ lsb_release -a
> LSB Version:
> core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
> Distributor ID:	Ubuntu
> Description:	Ubuntu 10.10
> Release:	10.10
> Codename:	maverick
> 
> The output of ifconfig is at the end. It is sort of long.
> The bridge is used because of KVM. Also I have OpenVPN
> running (currently only connected to one system, but
> sometimes I have up to three connections).
> 
> I don't have any other releases installed. Is this of interest
> to check this with an older Erlang release or other Ubuntu
> version as well?

The main suspect right now is that the code in inet_drv.c parsing
the return data from getifaddrs() gets lost in some peculiar data.

Can you get us a stack backtrace something like this
(ulimit -c before, gdb Pgm core after, use gdb command "bt"):
[~]$ ulimit -c unlimited
[~]$ erl
Erlang R14B01 (erts-5.8.2) [source] [smp:2:2] [rq:2] [async-threads:0]
[hipe] [kernel-poll:false]

Eshell V5.8.2  (abort with ^G)
1>
1> inet:getifaddrs().
Segmentation fault
[~]$ gdb lib/erlang/erts-5.8.2/bin/beam.smp core
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 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/>...
Reading symbols from /ldisk/daily_build/r14b02_opu_o.2010-12-12_20/otp/lib/erlang/erts-5.8.3/bin/beam.smp...done.
:
:
:
Core was generated by `/ldisk/daily_build/r14b02_opu_o.2010-12-12_20/otp/lib/erlang/erts-5.8.3/bin/bea'.
Program terminated with signal 11, Segmentation fault.
#0  heap_dump (to=3, to_arg=0x0, x=2956610204) at beam/erl_process_dump.c:393
(gdb) bt
#0  heap_dump (to=3, to_arg=0x0, x=2956610204) at beam/erl_process_dump.c:393
#1  0x00000000004f859a in dump_process_info (to=3, to_arg=0x0) at beam/erl_process_dump.c:125
#2  erts_deep_process_dump (to=3, to_arg=0x0) at beam/erl_process_dump.c:73
#3  0x00000000004e2adf in erl_crash_dump_v (file=0x40000 <Address 0x40000 out of bounds>, line=0, fmt=0x400 <Address 0x400 out of bounds>,
    args=0x7f49b03a5be0) at beam/break.c:712
#4  0x0000000000444fa2 in erl_exit (n=127, fmt=0x584434 "%s\n") at beam/erl_init.c:1594
#5  0x0000000000472ce9 in halt_1 (A__p=0x1837cc0, A_1=21029029) at beam/bif.c:3423
#6  0x000000000051dedc in process_main () at beam/beam_emu.c:3351
#7  0x0000000000491fac in sched_thread_func (vesdp=<value optimized out>) at beam/erl_process.c:3566
#8  0x000000000057d83a in thr_wrapper (vtwd=<value optimized out>) at pthread/ethread.c:106
#9  0x00007f49b19399ca in start_thread () from /lib/libpthread.so.0
#10 0x00007f49b148f69d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

And then, for the most suspicious stack frame:
(gdb) fr 1
#1  0x00000000004f859a in dump_process_info (to=3, to_arg=0x0) at beam/erl_process_dump.c:125
125                     heap_dump(to, to_arg, term);
(gdb) l
120             erts_print(to, to_arg, "=proc_heap:%T\n", p->id);
121             for (sp = p->stop; sp < STACK_START(p); sp++) {
122                 Eterm term = *sp;
123
124                 if (!is_catch(term) && !is_CP(term)) {
125                     heap_dump(to, to_arg, term);
126                 }
127             }
128             for (mp = p->msg.first; mp != NULL; mp = mp->next) {
129                 Eterm mesg = ERL_MESSAGE_TERM(mp);
(gdb) p to
$1 = <value optimized out>
(gdb) p to_arg
$2 = <value optimized out>
(gdb) p term
$3 = 0

Variable "term" is NULL, that is suspicious.





> 
> 
>   - boris
> 
> 
> === ifconfig output: start ===
> br0       Link encap:Ethernet  Hardware Adresse XX:XX:XX:XX:XX:XX
>           inet Adresse:192.168.XXX.XXX  Bcast:192.168.XXX.XXX  Maske:255.255.255.0
>           inet6-Adresse: 2001:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX/64 Gültigkeitsbereich:Global
>           inet6-Adresse: fe80:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX/64 Gültigkeitsbereich:Verbindung
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
>           RX packets:2050378 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:4301295 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 Sendewarteschlangenlänge:0
>           RX bytes:1514643982 (1.5 GB)  TX bytes:5292048144 (5.2 GB)
> 
> eth0      Link encap:Ethernet  Hardware Adresse XX:XX:XX:XX:XX:XX
>           inet6-Adresse: fe80:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX/64 Gültigkeitsbereich:Verbindung
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
>           RX packets:2060182 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:4301322 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 Sendewarteschlangenlänge:1000
>           RX bytes:1544309845 (1.5 GB)  TX bytes:5292052727 (5.2 GB)
>           Interrupt:21 Basisadresse:0x2000
> 
> lo        Link encap:Lokale Schleife
>           inet Adresse:127.0.0.1  Maske:255.0.0.0
>           inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
>           UP LOOPBACK RUNNING  MTU:16436  Metrik:1
>           RX packets:73 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:73 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 Sendewarteschlangenlänge:0
>           RX bytes:6256 (6.2 KB)  TX bytes:6256 (6.2 KB)
> 
> tun0      Link encap:UNSPEC  Hardware Adresse 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
>           inet Adresse:192.168.XXX.XXX  P-z-P:192.168.XXX.XXX  Maske:255.255.255.255
>           UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1500  Metrik:1
>           RX packets:2809 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:2291 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 Sendewarteschlangenlänge:100
>           RX bytes:1565968 (1.5 MB)  TX bytes:198414 (198.4 KB)
> 
> virbr0    Link encap:Ethernet  Hardware Adresse XX:XX:XX:XX:XX:XX
>           inet Adresse:192.168.XXX.XXX  Bcast:192.168.XXX.XXX  Maske:255.255.255.0
>           inet6-Adresse: fe80:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX/64 Gültigkeitsbereich:Verbindung
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:302 errors:0 dropped:0 overruns:0 carrier:0
>           Kollisionen:0 Sendewarteschlangenlänge:0
>           RX bytes:0 (0.0 B)  TX bytes:19529 (19.5 KB)
> === ifconfig output: end ===
> 
> 
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


More information about the erlang-questions mailing list