Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Erlang, eprof and segmentation fault
$ gdberl
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
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:
Reading symbols from /usr/local/lib/erlang/erts-5.9/bin/erlexec...done.
(gdb) run
Starting program: /usr/local/lib/erlang/erts-5.9/bin/erlexec
process 32464 is executing new program: /usr/local/lib/erlang/erts-5.9/bin/beam.smp
[Thread debugging using libthread_db enabled]
[New Thread 0x7ffff6acb700 (LWP 32506)]
[New Thread 0x7ffff628a700 (LWP 32507)]
[New Thread 0x7ffff5988700 (LWP 32508)]
[New Thread 0x7ffff5881700 (LWP 32509)]
[New Thread 0x7ffff5080700 (LWP 32510)]
[New Thread 0x7ffff487f700 (LWP 32511)]
[New Thread 0x7ffff407e700 (LWP 32512)]
[New Thread 0x7ffff387d700 (LWP 32513)]
[New Thread 0x7ffff307c700 (LWP 32514)]
[New Thread 0x7ffff287b700 (LWP 32515)]
[New Thread 0x7ffff207a700 (LWP 32516)]
[New Thread 0x7ffff1879700 (LWP 32517)]
Erlang R15B (erts-5.9) [source] [64-bit] [smp:8:8] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.9 (abort with ^G)
1> eprof:start ().
2> eprof:profile(fun () -> lists:seq (1,100) end).
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5881700 (LWP 32509)]
0x0000000000558aa2 in is_break (pc=<value optimized out>,
match_spec_ret=0x7ffff5880be0, tracer_pid_ret=0x0) at beam/beam_bp.c:1342
1342 if ( (break_op == 0) || (bd->this_instr == break_op)) {
(gdb) bt
#0 0x0000000000558aa2 in is_break (pc=<value optimized out>,
match_spec_ret=0x7ffff5880be0, tracer_pid_ret=0x0) at beam/beam_bp.c:1342
#1 erts_is_trace_break (pc=<value optimized out>,
match_spec_ret=0x7ffff5880be0, tracer_pid_ret=0x0) at beam/beam_bp.c:358
#2 0x000000000046d2fa in function_is_traced (A__p=0xa302b8,
BIF__ARGS=<value optimized out>) at beam/erl_bif_trace.c:1031
#3 trace_info_func (A__p=0xa302b8, BIF__ARGS=<value optimized out>)
at beam/erl_bif_trace.c:1084
#4 trace_info_2 (A__p=0xa302b8, BIF__ARGS=<value optimized out>)
at beam/erl_bif_trace.c:849
#5 0x000000000047b672 in erts_bif_trace (bif_index=236, p=0xa302b8,
args=<value optimized out>, I=0x7ffff013ba38) at beam/erl_trace.c:2112
#6 0x0000000000544271 in process_main () at beam/beam_emu.c:2427
#7 0x00000000004a42c1 in sched_thread_func (vesdp=0x7ffff6c6dc80)
at beam/erl_process.c:4475
#8 0x00000000005c1130 in thr_wrapper (vtwd=0x7fffffffd100)
at pthread/ethread.c:106
#9 0x00007ffff72f4d8c in start_thread (arg=0x7ffff5881700)
at pthread_create.c:304
#10 0x00007ffff6e37c2d in clone ()
at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()
(gdb) q
A debugging session is active.
Inferior 1 [process 32464] will be killed.
Quit anyway? (y or n) y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment