dbg icon indicating copy to clipboard operation
dbg copied to clipboard

Dbg crashes when tracing calls

Open indiejames opened this issue 9 years ago • 1 comments

Attempted to follow instructions in README.md, but getting erorr with verison 1.0.1, Erlang 18, Elixir 1.2.0. Ran iex -S mix in dbg directory after mix compile then followed steps in README.m and got the following:

Erlang/OTP 18 [erts-7.2.1] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Interactive Elixir (1.2.0) - press Ctrl+C to exit (type h() ENTER for help)

iex(1)> Dbg.trace(self(), :call) %{counts: %{nonode@nohost: 1}, errors: %{}} iex(2)> Dbg.call(&Map.new/0) %{counts: %{nonode@nohost: 1}, errors: %{}} iex(3)> Map.new() %{} iex(4)> ** dbg got EXIT - terminating: {trace_handler_crashed, {function_clause, [{'Elixir.IEx.Config',default_option, [width], [{file,"lib/iex/config.ex"},{line,63}]}, {'Elixir.IEx.Config', '-default_config/0-fun-0-',1, [{file,"lib/iex/config.ex"},{line,60}]}, {'Elixir.Enum','-map/2-lists^map/1-0-',2, [{file,"lib/enum.ex"},{line,1088}]}, {'Elixir.Enum','-map/2-lists^map/1-0-',2, [{file,"lib/enum.ex"},{line,1088}]}, {'Elixir.IEx.Config',configuration,0, [{file,"lib/iex/config.ex"},{line,56}]}, {'Elixir.Dbg.Handler',handle_event,2, [{file,"lib/dbg/handler.ex"},{line,9}]}, {dbg,handle_traces,4, [{file,"dbg.erl"},{line,819}]}, {dbg,tracer_loop,2, [{file,"dbg.erl"},{line,783}]}]}}

=ERROR REPORT==== 9-Jan-2016::23:05:46 === ** Generic server 'Elixir.Dbg.Watcher' terminating ** Last message in was {'DOWN',#Ref<0.0.4.689>,process,<0.121.0>, {trace_handler_crashed, {function_clause, [{'Elixir.IEx.Config',default_option, [width], [{file,"lib/iex/config.ex"},{line,63}]}, {'Elixir.IEx.Config','-default_config/0-fun-0-',1, [{file,"lib/iex/config.ex"},{line,60}]}, {'Elixir.Enum','-map/2-lists^map/1-0-',2, [{file,"lib/enum.ex"},{line,1088}]}, {'Elixir.Enum','-map/2-lists^map/1-0-',2, [{file,"lib/enum.ex"},{line,1088}]}, {'Elixir.IEx.Config',configuration,0, [{file,"lib/iex/config.ex"},{line,56}]}, {'Elixir.Dbg.Handler',handle_event,2, [{file,"lib/dbg/handler.ex"},{line,9}]}, {dbg,handle_traces,4,[{file,"dbg.erl"},{line,819}]}, {dbg,tracer_loop,2, [{file,"dbg.erl"},{line,783}]}]}}} ** When Server state == #{'struct' => 'Elixir.Dbg.Watcher', dbg_ref => #Ref<0.0.4.688>, tracer => nil, tracer_ref => nil} ** Reason for termination == ** {trace_handler_crashed, {function_clause, [{'Elixir.IEx.Config',default_option, [width], [{file,"lib/iex/config.ex"},{line,63}]}, {'Elixir.IEx.Config','-default_config/0-fun-0-',1, [{file,"lib/iex/config.ex"},{line,60}]}, {'Elixir.Enum','-map/2-lists^map/1-0-',2, [{file,"lib/enum.ex"},{line,1088}]}, {'Elixir.Enum','-map/2-lists^map/1-0-',2, [{file,"lib/enum.ex"},{line,1088}]}, {'Elixir.IEx.Config',configuration,0, [{file,"lib/iex/config.ex"},{line,56}]}, {'Elixir.Dbg.Handler',handle_event,2, [{file,"lib/dbg/handler.ex"},{line,9}]}, {dbg,handle_traces,4,[{file,"dbg.erl"},{line,819}]}, {dbg,tracer_loop,2,[{file,"dbg.erl"},{line,783}]}]}}

indiejames avatar Jan 10 '16 04:01 indiejames

Unfortunately this is due to a bug in Elixir 1.2.0. It is fixed in 1.3.0-dev and 1.2.1-dev. https://github.com/elixir-lang/elixir/commit/a6b80a19c50905ff7f0de4e689e1339fa883a367

fishcakez avatar Jan 10 '16 12:01 fishcakez