Re: Type assertion failure when tracing with process_dump message
Mikael Pettersson <[email protected]> Thu, 10 Sep 2015 12:10:00 +0200
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <[email protected]> |
James Fish writes: > On 10 September 2015 at 10:23, Mikael Pettersson <[email protected]> > wrote: > > > James Fish writes: > > > When using {message, {process_dump}} in a trace the VM can abort on OTP > > > R16B03 to 18.0.2 (not R16B02 and earlier) on a linux 3.19.0-21-generic > > > x86_64: > > > > > > TYPE ASSERTION FAILED, file beam/erl_term.c, line 115: tag_val_def: > > > 0x7f9c183ee6d2 > > > Aborted (core dumped) > > > > > > #0 0x00007f9c1c56f267 in __GI_raise (sig=sig@entry=6) at > > > ../sysdeps/unix/sysv/linux/raise.c:55 > > > #1 0x00007f9c1c570eca in __GI_abort () at abort.c:89 > > > #2 0x000000000056dfd1 in et_abort (expr=0x9081e0 <msg> "tag_val_def: > > > 0x7f9c183ee6d2", file=0x64fe45 "beam/erl_term.c", line=115) at > > > beam/erl_term.c:48 > > > #3 tag_val_def (x=x@entry=140308398401234) at beam/erl_term.c:115 > > > #4 0x00000000004cf12e in print_term (obj_base=<optimised out>, > > > dcount=<synthetic pointer>, obj=140308398401234, arg=0x7f9c1d780078, > > > fn=0x630a10 <write_ds>) at beam/erl_printf_term.c:352 > > > #5 erts_printf_term (fn=0x630a10 <write_ds>, arg=0x7f9c1d780078, > > > term=<optimised out>, precision=99999, term_base=<optimised out>) at > > > beam/erl_printf_term.c:657 > > > #6 0x000000000062ed17 in erts_printf_format (fn=fn@entry=0x630a10 > > > <write_ds>, arg=arg@entry=0x7f9c1d780078, fmt=fmt@entry=0x64830b > > "%T\n", > > > ap=ap@entry=0x7f9c198fc640) at common/erl_printf_format.c:847 > > > #7 0x0000000000631750 in erts_vdsprintf (dsbufp=dsbufp@entry > > =0x7f9c1d780078, > > > format=format@entry=0x64830b "%T\n", arglist=arglist@entry > > =0x7f9c198fc640) > > > at common/erl_printf.c:459 > > > #8 0x00000000004a9696 in erts_print (to=to@entry=-4, > > > arg=arg@entry=0x7f9c1d780078, > > > format=format@entry=0x64830b "%T\n") at beam/utils.c:400 > > > #9 0x00000000004ea8cf in stack_element_dump (yreg=2, sp=0x7f9c183ef258, > > > to_arg=0x7f9c1d780078, to=-4) at beam/erl_process.c:12546 > > > #10 erts_stack_dump (to=to@entry=-4, to_arg=to_arg@entry > > =0x7f9c1d780078, > > > p=p@entry=0x7f9c1bb003d8) at beam/erl_process.c:12466 > > > #11 0x000000000055b56d in print_process_info (to=to@entry=-4, > > > to_arg=to_arg@entry=0x7f9c1d780078, p=p@entry=0x7f9c1bb003d8) at > > > beam/break.c:339 > > > #12 0x000000000052cc20 in db_prog_match (c_p=c_p@entry=0x7f9c1bb003d8, > > > bprog=0x7f9c1bdc0b78, term=term@entry=18446744073709551611, > > > base=base@entry=0x0, > > > termp=termp@entry=0x7f9c198fca70, arity=arity@entry=1, > > > in_flags=ERTS_PAM_TMP_RESULT, return_flags=0x7f9c198fca14) at > > > beam/erl_db_util.c:2404 > > > #13 0x000000000052e5ec in erts_match_set_run (p=p@entry=0x7f9c1bb003d8, > > > mpsp=<optimised out>, args=args@entry=0x7f9c198fca70, > > > num_args=num_args@entry=1, in_flags=in_flags@entry=ERTS_PAM_TMP_RESULT, > > > return_flags=return_flags@entry=0x7f9c198fca14) at > > > beam/erl_db_util.c:1243 > > > #14 0x00000000004a0c55 in erts_call_trace (p=p@entry=0x7f9c1bb003d8, > > > mfa=mfa@entry=0x7f9c1822f058, match_spec=<optimised out>, > > > args=0x7f9c198fca70, args@entry=0x7f9c1bfc4180, local=local@entry=1, > > > tracer_pid=0x7f9c1bb003e8, tracer_pid@entry=0x7f9c198fdcc8) at > > > beam/erl_trace.c:1873 > > > #15 0x0000000000455654 in do_call_trace (c_p=0x7f9c1bb003d8, > > > I=0x7f9c1822f070, reg=0x7f9c1bfc4180, local=local@entry=1, > > ms=<optimised > > > out>, tracer_pid=tracer_pid@entry=75) at beam/beam_bp.c:900 > > > #16 0x0000000000459524 in erts_generic_breakpoint (c_p=0x7f9c1bb003d8, > > > I=0x7f9c1822f070, reg=0x7f9c1bfc4180) at beam/beam_bp.c:626 > > > #17 0x0000000000443f23 in process_main () at beam/beam_emu.c:4921 > > > #18 0x00000000004d6415 in sched_thread_func (vesdp=0x7f9c1ae4bc40) at > > > beam/erl_process.c:8021 > > > #19 0x000000000062d0e3 in thr_wrapper (vtwd=0x7fff8a43d010) at > > > pthread/ethread.c:114 > > > #20 0x00007f9c1cb136aa in start_thread (arg=0x7f9c198fe700) at > > > pthread_create.c:333 > > > #21 0x00007f9c1c640eed in clone () at > > > ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 > > > > > > A minimal example: > > > > > > c("test.erl"), > > > dbg:tracer(), > > > dbg:p(self(), [call]), > > > dbg:tpl(test, identity, [{'_',[],[{message,{process_dump}}]}]), > > > test:sum(<<0>>, 0). > > > > > > test.erl: > > > > > > -module(test). > > > > > > -export([sum/2]). > > > > > > sum(<<Int, Rest/binary>>, Acc) -> > > > sum(Rest, Acc + identity(Int)); > > > sum(<<>>, Acc) -> Acc. > > > > > > identity(Int) -> > > > Int. > > > > I can't reproduce the issue in a vanilla OTP R16B03-1. Are you sure > > R16B03-1 is affected? > > > > I'm asking because I started backporting the fix to R16, but noticed that > > the R16 code shouldn't abort() in this case, and indeed your recipe doesn't > > fail for me. > > > > I just tried again and I can't reproduce with R16B03-1 either. The earliest > version I can reproduce on is actually 17.0-rc1. Sorry for the mix up. No problem. One less issue/backport for me to handle in our R16 :-) _______________________________________________ erlang-bugs mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-bugs