boundary / folsom

Expose Erlang Events and Metrics
Apache License 2.0
587 stars 166 forks source link

pids and ets ids leaks #97

Open NOMORECOFFEE opened 9 years ago

NOMORECOFFEE commented 9 years ago
3> f(Pid1), f(Pid2), [Pid1, Pid2] = [erlang:spawn_link(fun() -> receive _ -> ok = folsom_metrics:new_histogram(<<"sorry">>, slide) end end) || _ <- lists:seq(1, 2)].
[<0.45.0>,<0.46.0>]
4>  Pid1 ! Pid2 ! sorry.
sorry
5> supervisor:which_children(folsom_sample_slide_sup).
[{undefined,<0.49.0>,worker,[folsom_sample_slide_server]},
 {undefined,<0.50.0>,worker,[folsom_sample_slide_server]}]
7> ets:tab2list(folsom_histograms).
[{<<"sorry">>,
  {histogram,slide,{slide,1028,20506,<0.50.0>}}}]

I expected that there would be only one child of folsom_sample_slide_sup. So the second child and its ets are leaked.

supervisor:count_children(folsom_sample_slide_sup) =/= erlang:length(ets:tab2list(folsom_histograms)).

metrics with the same leaks:

joewilliams commented 8 years ago

Folsom has moved, please resubmit your issue at https://github.com/folsom-project Thanks!