[erlang-questions] Segmentation fault with lcnt compiled beam and +A

Björn-Egil Dahlberg <>
Thu Aug 30 16:42:37 CEST 2012


Hi!

Thanks for reporting this! I'll try to look into it.

// Björn-Egil

On 2012-08-30 11:41, Gleb Peregud wrote:
> Hello folks
>
> I have encountered the following segmentation fault. It happens when I
> combine lock-counter-compiled binary and "+A N" where N >= 64. But it
> works with up to 63 async threads. Erlang compiled without lcnt works
> on the same machine without a problem. The stacktrace is the
> following:
>
> $ gdb /opt/erlang/r15b01_lcnt/erts-5.9.1/bin/beam.smp core
> Copyright stuff ... snip...
> This GDB was configured as "x86_64-linux-gnu".
> For bug reporting instructions, please see:
> <http://bugs.launchpad.net/gdb-linaro/>...
> Reading symbols from /opt/erlang/r15b01_lcnt/erts-5.9.1/bin/beam.smp...done.
> [New LWP 25517]
> [New LWP 25483]
> ...snip...
> [New LWP 25463]
> [New LWP 25466]
>
> warning: Can't read pathname for load map: Input/output error.
> [Thread debugging using libthread_db enabled]
> Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
> Core was generated by `/opt/erlang/r15b01_lcnt/erts-5.9.1/bin/beam.smp
> -A 64 -- -root /opt/erlang/r15b'.
> Program terminated with signal 11, Segmentation fault.
> #0  erts_lcnt_lock (lock=<optimized out>) at beam/erl_lock_count.c:445
> 445		eltd->lock_in_conflict = 0;
> (gdb) bt
> #0  erts_lcnt_lock (lock=<optimized out>) at beam/erl_lock_count.c:445
> #1  0x0000000000454096 in erts_mtx_lock_x (line=3480, mtx=0x87b9d8,
> file=<optimized out>)
>      at beam/erl_threads.h:1342
> #2  erts_alcu_alloc_thr_pref (type=92, extra=<optimized out>,
> size=1664) at beam/erl_alloc_util.c:3480
> #3  0x00000000005c81f4 in ts_event_pool (size=25,
> endpp=0x7f00217f9e88) at common/ethr_aux.c:351
> #4  0x00000000005c8306 in ts_event_alloc () at common/ethr_aux.c:394
> #5  0x00000000005c86a5 in ethr_make_ts_event__ (tsepp=0x7f00217f9ec0)
> at common/ethr_aux.c:421
> #6  0x00000000005cd9ce in thr_wrapper (vtwd=<optimized out>) at
> pthread/ethread.c:91
> #7  0x00007f01f69c7e9a in start_thread () from
> /lib/x86_64-linux-gnu/libpthread.so.0
> #8  0x00007f01f64ed4bd in clone () from /lib/x86_64-linux-gnu/libc.so.6
> #9  0x0000000000000000 in ?? ()
> (gdb)
>
> $ uname -a
> Linux lb4 3.2.0-24-generic #37-Ubuntu SMP Wed Apr 25 08:43:22 UTC 2012
> x86_64 x86_64 x86_64 GNU/Linux
> $ lsb_release -a
> No LSB modules are available.
> Distributor ID:	Ubuntu
> Description:	Ubuntu 12.04 LTS
> Release:	12.04
> Codename:	precise
>
> Erlang was configured via Kerl using the following configure options:
> "--enable-hipe --enable-smp-support --enable-threads
> --enable-kernel-poll --enable-lock-counter".
>
> I can reproduce this bug on 2-core a 32 bit machine with the same
> Ubuntu, but on it it fails if there are more than 93 async threads:
>
> :~$ erl -lcnt +A 94
> Segmentation fault
> :~$ erl -lcnt +A 93
> Erlang R15B01 (erts-5.9.1) [source] [smp:2:2] [async-threads:93]
> [hipe] [kernel-poll:false] [lock-counting]
>
> Eshell V5.9.1  (abort with ^G)
> 1>
>
> Have anyone encountered similar problem? Can I provide any more
> information helpful for pinpointing the issue?
>
> Best regards,
> Gleb Peregud
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>




More information about the erlang-questions mailing list