Skip to content

Instantly share code, notes, and snippets.

@5HT
Created November 12, 2014 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 5HT/224c569df807f1e337aa to your computer and use it in GitHub Desktop.
Save 5HT/224c569df807f1e337aa to your computer and use it in GitHub Desktop.
$ car .applist
[crypto,syntax_tools,compiler,mnesia,kernel,stdlib,kvs,mqs,ranch,cowlib,goldrush,protobuffs,cowboy,riak_pb,rest,jsone,umca,amqp_client,lager,meck,poolboy,rabbit_common,riakc,riakc_wrapper]
$ cat ~/.kerlrc
KERL_CONFIGURE_OPTIONS="--enable-threads --enable-smp-support --enable-m64-build --without-javac --enable-kernel-poll"
$ cat vm.args
-name umca@127.0.0.1
+K true
+A 5
-env ERL_MAX_PORTS 4096
-env ERL_FULLSWEEP_AFTER 10
$ erl
Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false]
Eshell V6.2 (abort with ^G)
1>
$ gdb beam.smp ./core
Program terminated with signal 11, Segmentation fault.
#0 erts_cleanup_offheap (offheap=<optimized out>) at beam/erl_message.c:173
173 beam/erl_message.c: No such file or directory.
(gdb) info threads
Id Target Id Frame
14 Thread 0x2aaaad6c4700 (LWP 5619) 0x00002aaaab40640d in fsync ()
from /lib/x86_64-linux-gnu/libpthread.so.0
13 Thread 0x2aaaad6e6700 (LWP 5620) 0x00002aaaab90c619 in syscall ()
from /lib/x86_64-linux-gnu/libc.so.6
12 Thread 0x2aaaad6a2700 (LWP 5618) 0x00002aaaab90c619 in syscall ()
from /lib/x86_64-linux-gnu/libc.so.6
11 Thread 0x2aaaae542700 (LWP 5624) 0x00000000004778c9 in eq (a=2671, b=4639)
at beam/utils.c:2350
10 Thread 0x2aaaacca2700 (LWP 5617) 0x00002aaaab90c619 in syscall ()
from /lib/x86_64-linux-gnu/libc.so.6
9 Thread 0x2aaaaaad4700 (LWP 5621) 0x00002aaaab40688d in waitpid ()
from /lib/x86_64-linux-gnu/libpthread.so.0
8 Thread 0x2aaaad680700 (LWP 5615) 0x00002aaaab402d84 in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/x86_64-linux-gnu/libpthread.so.0
7 Thread 0x2aaaae140700 (LWP 5622) 0x0000000000477ee8 in erts_cmp (a=<optimized out>,
b=<optimized out>, exact=0) at beam/utils.c:3015
6 Thread 0x2aaaae341700 (LWP 5623) 0x0000000000539864 in rbt_search (size=216,
root=<optimized out>) at beam/erl_ao_firstfit_alloc.c:807
5 Thread 0x2aaaae944700 (LWP 5626) 0x00002aaaab90c619 in syscall ()
from /lib/x86_64-linux-gnu/libc.so.6
4 Thread 0x2aaaacc80700 (LWP 5614) 0x00002aaaab405d2d in read ()
from /lib/x86_64-linux-gnu/libpthread.so.0
3 Thread 0x2aaaaaada980 (LWP 5606) 0x00002aaaab909763 in select ()
---Type <return> to continue, or q <return> to quit---
from /lib/x86_64-linux-gnu/libc.so.6
2 Thread 0x2aaaaca35700 (LWP 5616) 0x00002aaaab908d87 in writev ()
from /lib/x86_64-linux-gnu/libc.so.6
* 1 Thread 0x2aaaae743700 (LWP 5625) erts_cleanup_offheap (offheap=<optimized out>)
at beam/erl_message.c:173
(gdb) thread 1
[Switching to thread 1 (Thread 0x2aaaae743700 (LWP 5625))]
#0 erts_cleanup_offheap (offheap=<optimized out>) at beam/erl_message.c:173
173 in beam/erl_message.c
(gdb) where
#0 erts_cleanup_offheap (offheap=<optimized out>) at beam/erl_message.c:173
#1 0x00000000004dafa0 in db_store_term (tb=0x2aaaaf2affa0, old=0x2aace1226890, offset=16,
obj=46912522763114) at beam/erl_db_util.c:2861
#2 0x00000000004e94d5 in replace_dbterm (obj=46912522763114, old=0x2aace1226880,
tb=<optimized out>) at beam/erl_db_hash.c:508
#3 db_put_hash (tbl=0x2aaaaf2affa0, obj=46912522763114, key_clash_fail=0)
at beam/erl_db_hash.c:823
#4 0x00000000004d09ba in ets_insert_2 (A__p=0x2aaacb3038c0, BIF__ARGS=0x2aaaac28c2c0)
at beam/erl_db.c:1078
#5 0x00000000005453ce in process_main () at beam/beam_emu.c:2779
#6 0x000000000049a5e3 in sched_thread_func (vesdp=0x2aaaabf23640) at beam/erl_process.c:7719
#7 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348780) at pthread/ethread.c:106
#8 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()
(gdb) thread 2
[Switching to thread 2 (Thread 0x2aaaaca35700 (LWP 5616))]
#0 0x00002aaaab908d87 in writev () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0 0x00002aaaab908d87 in writev () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x000000000055e22e in efile_writev (errInfo=0x2aaaac7c102c, flags=<optimized out>, fd=14,
iov=0x2aaaac7405b8, iovcnt=72) at drivers/unix/unix_efile.c:633
#2 0x00000000005741d3 in invoke_writev (data=0x2aaaac7c0ff8) at drivers/common/efile_drv.c:1563
#3 0x00000000005047f3 in async_main (arg=0x2aaaad3f9900) at beam/erl_async.c:515
#4 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348720) at pthread/ethread.c:106
#5 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
(gdb) thread 3
[Switching to thread 3 (Thread 0x2aaaaaada980 (LWP 5606))]
#0 0x00002aaaab909763 in select () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0 0x00002aaaab909763 in select () from /lib/x86_64-linux-gnu/libc.so.6
Cannot access memory at address 0x7fffb8348848
(gdb) thread 4
[Switching to thread 4 (Thread 0x2aaaacc80700 (LWP 5614))]
#0 0x00002aaaab405d2d in read () from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) where
#0 0x00002aaaab405d2d in read () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000055ccba in read (__nbytes=32, __buf=0x2aaaacc7fe30, __fd=<optimized out>)
at /usr/include/x86_64-linux-gnu/bits/unistd.h:45
#2 signal_dispatcher_thread_func (unused=<optimized out>) at sys/unix/sys.c:2944
#3 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348620) at pthread/ethread.c:106
#4 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#6 0x0000000000000000 in ?? ()
(gdb) thread 5
[Switching to thread 5 (Thread 0x2aaaae944700 (LWP 5626))]
#0 0x00002aaaab90c619 in syscall () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0 0x00002aaaab90c619 in syscall () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00000000005be835 in wait__ (spincount=0, e=0x2aaaaca40410) at pthread/ethr_event.c:92
#2 ethr_event_wait (e=0x2aaaaca40410) at pthread/ethr_event.c:218
#3 0x000000000049d97d in erts_tse_wait (ep=<optimized out>) at beam/erl_threads.h:2782
#4 aux_thread (unused=<optimized out>) at beam/erl_process.c:2726
#5 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348780) at pthread/ethread.c:106
#6 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()
(gdb) thread 6
[Switching to thread 6 (Thread 0x2aaaae341700 (LWP 5623))]
#0 0x0000000000539864 in rbt_search (size=216, root=<optimized out>)
at beam/erl_ao_firstfit_alloc.c:807
807 beam/erl_ao_firstfit_alloc.c: No such file or directory.
(gdb) where
#0 0x0000000000539864 in rbt_search (size=216, root=<optimized out>)
at beam/erl_ao_firstfit_alloc.c:807
#1 aoff_get_free_block (allctr=0x25f3680, size=216, cand_blk=0x0, cand_size=<optimized out>)
at beam/erl_ao_firstfit_alloc.c:849
#2 0x000000000043deb6 in mbc_alloc_block (blk_szp=<synthetic pointer>, size=208, allctr=0x25f3680)
at beam/erl_alloc_util.c:1956
#3 mbc_alloc (allctr=0x25f3680, size=208) at beam/erl_alloc_util.c:2085
#4 0x0000000000444b5e in do_erts_alcu_alloc (size=208, extra=0x25f3680, type=<optimized out>)
at beam/erl_alloc_util.c:4864
#5 do_erts_alcu_alloc (size=208, extra=0x25f3680, type=172) at beam/erl_alloc_util.c:4924
#6 erts_alcu_alloc_thr_pref (type=172, extra=<optimized out>, size=208)
at beam/erl_alloc_util.c:4941
#7 0x00000000004e0b50 in erts_alloc_fnf (type=22073, size=208) at beam/erl_alloc.h:259
#8 erts_create_magic_binary (destructor=0x4d7f90 <erts_db_match_prog_destructor>, size=176)
at beam/erl_binary.h:318
#9 db_match_compile (matchexpr=<optimized out>, guards=<optimized out>, body=<optimized out>,
num_progs=1, flags=<optimized out>, err_info=<optimized out>) at beam/erl_db_util.c:1553
#10 0x00000000004ea1f2 in analyze_pattern (tb=0x2aac7e2354c8, pattern=<optimized out>,
mpi=0x2aaaae340b40) at beam/erl_db_hash.c:2321
#11 0x00000000004ecdd1 in db_select_chunk_hash (p=0x2aaaea560f00, tbl=<optimized out>,
pattern=<optimized out>, chunk_size=0, reverse=<optimized out>, ret=0x2aaaae340c60)
at beam/erl_db_hash.c:1459
#12 0x00000000004ce147 in ets_select2 (p=0x2aaaea560f00, arg1=<optimized out>, arg2=46912555453665)
at beam/erl_db.c:2373
---Type <return> to continue, or q <return> to quit---
#13 0x00000000004d5455 in ets_match_object_2 (A__p=<optimized out>, BIF__ARGS=<optimized out>)
at beam/erl_db.c:2616
#14 0x00000000005453ce in process_main () at beam/beam_emu.c:2779
#15 0x000000000049a5e3 in sched_thread_func (vesdp=0x2aaaabf0f0c0) at beam/erl_process.c:7719
#16 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348780) at pthread/ethread.c:106
#17 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#18 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#19 0x0000000000000000 in ?? ()
(gdb) thread 7
[Switching to thread 7 (Thread 0x2aaaae140700 (LWP 5622))]
#0 0x0000000000477ee8 in erts_cmp (a=<optimized out>, b=<optimized out>, exact=0)
at beam/utils.c:3015
3015 beam/utils.c: No such file or directory.
(gdb) where
#0 0x0000000000477ee8 in erts_cmp (a=<optimized out>, b=<optimized out>, exact=0)
at beam/utils.c:3015
#1 0x00000000004ef4dc in cmp_key (obj=<optimized out>, key=46912522754098, tb=0x2aaaaea32b60,
key_base=<optimized out>) at beam/erl_db_tree.c:573
#2 linkout_tree (tb=0x2aaaaea32b60, key=46912522754098, key_base=<optimized out>)
at beam/erl_db_tree.c:1844
#3 0x00000000004efae0 in db_erase_tree (tbl=0x2aaaaea32b60, key=<optimized out>,
ret=<optimized out>) at beam/erl_db_tree.c:771
#4 0x00000000004d39b6 in ets_delete_2 (A__p=0x2aaaaeb80ae0, BIF__ARGS=0x2aaaac2800c0)
at beam/erl_db.c:1913
#5 0x00000000005453ce in process_main () at beam/beam_emu.c:2779
#6 0x000000000049a5e3 in sched_thread_func (vesdp=0x2aaaabf04e00) at beam/erl_process.c:7719
#7 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348780) at pthread/ethread.c:106
#8 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()
(gdb) thread 8
[Switching to thread 8 (Thread 0x2aaaad680700 (LWP 5615))]
#0 0x00002aaaab402d84 in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) where
#0 0x00002aaaab402d84 in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x00000000005bd329 in ethr_cond_wait (cnd=<optimized out>, mtx=<optimized out>)
at common/ethr_mutex.c:1368
#2 0x000000000046a80f in erts_cnd_wait (mtx=0x87e520, cnd=0x87e4e0) at beam/erl_threads.h:1821
#3 erts_smp_cnd_wait (cnd=<optimized out>, mtx=<optimized out>) at beam/erl_smp.h:951
#4 sys_msg_dispatcher_func (unused=<optimized out>) at beam/erl_trace.c:3305
#5 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348740) at pthread/ethread.c:106
#6 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#7 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#8 0x0000000000000000 in ?? ()
(gdb) thread 9
[Switching to thread 9 (Thread 0x2aaaaaad4700 (LWP 5621))]
#0 0x00002aaaab40688d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) where
#0 0x00002aaaab40688d in waitpid () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000055b005 in child_waiter (unused=<optimized out>) at sys/unix/sys.c:2868
#2 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348710) at pthread/ethread.c:106
#3 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#4 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#5 0x0000000000000000 in ?? ()
(gdb) thread 10
[Switching to thread 10 (Thread 0x2aaaacca2700 (LWP 5617))]
#0 0x00002aaaab90c619 in syscall () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0 0x00002aaaab90c619 in syscall () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00000000005be835 in wait__ (spincount=0, e=0x2aaaaca401d0) at pthread/ethr_event.c:92
#2 ethr_event_wait (e=0x2aaaaca401d0) at pthread/ethr_event.c:218
#3 0x00000000005047a8 in erts_tse_wait (ep=<optimized out>) at beam/erl_threads.h:2782
#4 async_get (prep_enq=<synthetic pointer>, tse=<optimized out>, q=0x2aaaad3f9a40)
at beam/erl_async.c:386
#5 async_main (arg=0x2aaaad3f9a40) at beam/erl_async.c:507
#6 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348720) at pthread/ethread.c:106
#7 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9 0x0000000000000000 in ?? ()
(gdb) thread 11
[Switching to thread 11 (Thread 0x2aaaae542700 (LWP 5624))]
#0 0x00000000004778c9 in eq (a=2671, b=4639) at beam/utils.c:2350
2350 in beam/utils.c
(gdb) where
#0 0x00000000004778c9 in eq (a=2671, b=4639) at beam/utils.c:2350
#1 0x00000000004e928f in db_eq (b=<optimized out>, a=46912557554514, tb=<optimized out>)
at beam/erl_db_util.h:308
#2 db_eq (b=<optimized out>, a=<optimized out>, tb=0x2aaaac6000a0) at beam/erl_db_hash.c:2859
#3 db_put_hash (tbl=0x2aaaac6000a0, obj=46912557554514, key_clash_fail=-919150672)
at beam/erl_db_hash.c:843
#4 0x00000000004d1c0e in ets_new_2 (A__p=0x2aaaaeb81160, BIF__ARGS=0x2aaaac288200)
at beam/erl_db.c:1528
#5 0x00000000005453ce in process_main () at beam/beam_emu.c:2779
#6 0x000000000049a5e3 in sched_thread_func (vesdp=0x2aaaabf19380) at beam/erl_process.c:7719
#7 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348780) at pthread/ethread.c:106
#8 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#10 0x0000000000000000 in ?? ()
(gdb) thread 12
[Switching to thread 12 (Thread 0x2aaaad6a2700 (LWP 5618))]
#0 0x00002aaaab90c619 in syscall () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0 0x00002aaaab90c619 in syscall () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00000000005be835 in wait__ (spincount=0, e=0x2aaaaca40210) at pthread/ethr_event.c:92
#2 ethr_event_wait (e=0x2aaaaca40210) at pthread/ethr_event.c:218
#3 0x00000000005047a8 in erts_tse_wait (ep=<optimized out>) at beam/erl_threads.h:2782
#4 async_get (prep_enq=<synthetic pointer>, tse=<optimized out>, q=0x2aaaad3f9b80)
at beam/erl_async.c:386
#5 async_main (arg=0x2aaaad3f9b80) at beam/erl_async.c:507
#6 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348720) at pthread/ethread.c:106
#7 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9 0x0000000000000000 in ?? ()
(gdb) thread 13
[Switching to thread 13 (Thread 0x2aaaad6e6700 (LWP 5620))]
#0 0x00002aaaab90c619 in syscall () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) where
#0 0x00002aaaab90c619 in syscall () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00000000005be835 in wait__ (spincount=0, e=0x2aaaaca40290) at pthread/ethr_event.c:92
#2 ethr_event_wait (e=0x2aaaaca40290) at pthread/ethr_event.c:218
#3 0x00000000005047a8 in erts_tse_wait (ep=<optimized out>) at beam/erl_threads.h:2782
#4 async_get (prep_enq=<synthetic pointer>, tse=<optimized out>, q=0x2aaaad3f9e00)
at beam/erl_async.c:386
#5 async_main (arg=0x2aaaad3f9e00) at beam/erl_async.c:507
#6 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348720) at pthread/ethread.c:106
#7 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#8 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#9 0x0000000000000000 in ?? ()
(gdb) thread 14
[Switching to thread 14 (Thread 0x2aaaad6c4700 (LWP 5619))]
#0 0x00002aaaab40640d in fsync () from /lib/x86_64-linux-gnu/libpthread.so.0
(gdb) where
#0 0x00002aaaab40640d in fsync () from /lib/x86_64-linux-gnu/libpthread.so.0
#1 0x000000000055de8b in efile_fsync (errInfo=0x2aaaac7c0f2c, fd=<optimized out>)
at drivers/unix/unix_efile.c:481
#2 0x0000000000573988 in invoke_fsync (data=0x2aaaac7c0ef8) at drivers/common/efile_drv.c:1123
#3 0x00000000005047f3 in async_main (arg=0x2aaaad3f9cc0) at beam/erl_async.c:515
#4 0x00000000005be1b0 in thr_wrapper (vtwd=0x7fffb8348720) at pthread/ethread.c:106
#5 0x00002aaaab3fee9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#6 0x00002aaaab9103fd in clone () from /lib/x86_64-linux-gnu/libc.so.6
#7 0x0000000000000000 in ?? ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment