[erlang-questions] R12B-5 Help diagnosing erl_exit() from beam/copy.c:180

Paul Fisher pfisher@REDACTED
Wed Feb 4 20:29:07 CET 2009


We've had an abort raised out of erts_send_message() -> size_object()
and I would like to ask for some assistance in troubleshooting it.  (I 
only have a corefile because we run the vm with +d in order to diagnose 
driver problems from the corefiles.)

In particular, I am having trouble understanding how to decode Eterm
values, and therefore getting anywhere beyond basic "where it blew up".
   Is there any description of the encoding beyond pulling apart
erl_term.h macros?

Some minimal information about the crash context, the message, sender
and receiver process information.

(gdb) where
#0  0x00002ab5b140f07b in raise () from /lib/libc.so.6
#1  0x00002ab5b141084e in abort () from /lib/libc.so.6
#2  0x0000000000442469 in erl_exit (n=-2147483647,
      fmt=0x5530ad "size_object: bad tag for %#x\n") at beam/erl_init.c:1243
#3  0x0000000000460311 in size_object (obj=6) at beam/copy.c:180
#4  0x000000000047c47a in erts_send_message (sender=0x2aaaaaaae490,
      receiver=0x2aaaafd18af0, receiver_locks=0x46889f0c,
      message=46959855828714, flags=0) at beam/erl_message.c:758
#5  0x000000000046ec46 in do_send (p=0x2aaaaaaae490, to=5075,
      msg=46959855828714, suspend=0) at beam/bif.c:1839
#6  0x000000000046f1c6 in send_2 (p=0x1116, to=4455, msg=6) at
beam/bif.c:1915
#7  0x00000000004dae25 in process_main () at beam/beam_emu.c:1385
#8  0x000000000048100f in sched_thread_func (vesdp=<value optimized out>)
      at beam/erl_process.c:752
#9  0x0000000000549f24 in thr_wrapper (vtwd=<value optimized out>)
      at common/ethread.c:474
#10 0x00002ab5b11c6f1a in start_thread () from /lib/libpthread.so.0
#11 0x00002ab5b14a9602 in clone () from /lib/libc.so.6
#12 0x0000000000000000 in ?? ()
(gdb) up 4
#4  0x000000000047c47a in erts_send_message (sender=0x2aaaaaaae490,
      receiver=0x2aaaafd18af0, receiver_locks=0x46889f0c,
      message=46959855828714, flags=0) at beam/erl_message.c:758
758	beam/erl_message.c: No such file or directory.
	in beam/erl_message.c
(gdb) p *sender
$4 = {htop = 0x2ab5b1867f08, stop = 0x2ab5b186b590, heap = 0x2ab5b1866568,
    hend = 0x2ab5b186b628, heap_sz = 2584, min_heap_size = 233,
    fp_exception = 0, hipe = {nsp = 0x8b0340, nstack = 0x8affd0,
      nstend = 0x8b03d0, ncallee = 0x49091f84, closure = 2, nstgraylim =
0x0,
      nstblacklim = 0x8b03d0, ngra = 0, ncsp = 0x46889ed0, narity = 0},
    arity = 2, arg_reg = 0x2aaaaaaae530, max_arg_reg = 6, def_arg_reg =
{596363,
      46959855828642, 46959855828529, 5, 0, 2000}, cp = 0x0, i =
0x2aaaaab8fef0,
    catches = 3, fcalls = 1989, status = 3, gcstatus = 3, rstatus = 0,
    rcount = 0, id = 19, prio = 2, skipped = 0, reds = 27697,
    error_handler = 9227, tracer_proc = 18446744073709551611, trace_flags
= 0,
    group_leader = 467, flags = 1, fvalue = 3275, freason = 16,
    ftrace = 46959856237457, dist_entry = 0x0, next = 0x0, reg = 0x0,
    nlinks = 0x2aaaaaaaed40, monitors = 0x2aaab93eaee8, nodes_monitors =
0x0,
    suspend_monitors = 0x0, msg = {first = 0x0, last = 0x2aaaaaaae620,
      save = 0x2aaaaaaae620, len = 0}, bif_timers = 0x0, dictionary = 0x0,
    ct = 0x0, seq_trace_clock = 0, seq_trace_lastcnt = 0,
    seq_trace_token = 18446744073709551611, initial = {9099, 31307, 2},
    current = 0x0, parent = 3, started = {tv_sec = 1233318945,
      tv_usec = 199426}, high_water = 0x2ab5b1866ad0, old_hend =
0x2ab5b18d3350,
    old_htop = 0x2ab5b18cbda0, old_heap = 0x2ab5b18cb0a8, gen_gcs = 20,
    max_gen_gcs = 65535, off_heap = {mso = 0x0, funs = 0x2ab5b1867668,
      externals = 0x0, overhead = 0}, mbuf = 0x0, mbuf_sz = 0, u = {
      ptimer = 0x0, exit_data = 0x0}, lock = {flags = {counter = 1},
      queues = 0x0, refc = 1}, scheduler_data = 0x2aaaaaaf49c8,
is_exiting = 0,
    scheduler_flags = 1, status_flags = 12, msg_inq = {first = 0x0,
      last = 0x2aaaaaaae738, len = 0}, suspendee = 18446744073709551611,
    pending_suspenders = 0x0, pending_exit = {reason = 0, bp = 0x0},
hipe_smp = {
      have_receive_locks = 0}}
(gdb) p *receiver
$5 = {htop = 0x2aaaac91e130, stop = 0x2aaaac9252b0, heap = 0x2aaaac91d050,
    hend = 0x2aaaac9252f8, heap_sz = 4181, min_heap_size = 233,
    fp_exception = 0, hipe = {nsp = 0x983c70, nstack = 0x983870,
      nstend = 0x983c70, ncallee = 0x49147218, closure = 5104401,
      nstgraylim = 0x0, nstblacklim = 0x983c70, ngra = 0, ncsp = 0x45887ed0,
      narity = 0}, arity = 0, arg_reg = 0x2aaaafd18b90, max_arg_reg = 6,
    def_arg_reg = {46912528048378, 46912528044250, 42571, 4, 0, 2000}, cp
= 0x0,
    i = 0x2aaaaab916a0, catches = 1, fcalls = 1931, status = 2, gcstatus
= 3,
    rstatus = 0, rcount = 0, id = 5075, prio = 2, skipped = 0, reds = 67415,
    error_handler = 9227, tracer_proc = 18446744073709551611, trace_flags
= 0,
    group_leader = 5011, flags = 37, fvalue = 46912736747770, freason = 1,
    ftrace = 46912736747793, dist_entry = 0x0, next = 0x0, reg =
0x2aaaafd3e3d8,
    nlinks = 0x2aaaaaed2748, monitors = 0x2aaab93eaf30,
    nodes_monitors = 0x7861a8, suspend_monitors = 0x0, msg = {first = 0x0,
      last = 0x2aaaafd18c80, save = 0x2aaaafd18c80, len = 0}, bif_timers
= 0x0,
    dictionary = 0x7ad200, ct = 0x0, seq_trace_clock = 0,
seq_trace_lastcnt = 0,
    seq_trace_token = 18446744073709551611, initial = {114955, 128139, 5},
    current = 0x0, parent = 5043, started = {tv_sec = 1233318946,
      tv_usec = 488602}, high_water = 0x2aaaac91d708, old_hend =
0x2aaab90399a8,
    old_htop = 0x2aaab9026690, old_heap = 0x2aaab9017030, gen_gcs = 8,
    max_gen_gcs = 65535, off_heap = {mso = 0x2aaaac91ddf0,
      funs = 0x2aaaac91d130, externals = 0x0, overhead = 12}, mbuf = 0x0,
    mbuf_sz = 0, u = {ptimer = 0x0, exit_data = 0x0}, lock = {flags = {
        counter = 12}, queues = 0x0, refc = 1}, scheduler_data = 0x0,
    is_exiting = 0, scheduler_flags = 0, status_flags = 4, msg_inq = {
      first = 0x0, last = 0x2aaaafd18d98, len = 0},
    suspendee = 18446744073709551611, pending_suspenders = 0x0,
pending_exit = {
      reason = 0, bp = 0x0}, hipe_smp = {have_receive_locks = 0}}



--
paul




More information about the erlang-questions mailing list