[erlang-bugs] [erlang-questions] Process/FD leak in SSL R15B01

Attila Rajmund Nohl attila.r.nohl@REDACTED
Mon Oct 15 18:09:48 CEST 2012


2012/10/15 Loïc Hoguin <essen@REDACTED>:
[...]
>> lists:foldl(fun(X, Sum) -> case erlang:process_info(X) of undefined ->
>> Sum; [{current_function, XXX}|_] -> case lists:keyfind(XXX, 1, Sum) of false
>> -> Curr = 0; {_, Curr} -> ok end, lists:keystore(XXX, 1, Sum, {XXX, Curr +
>> 1}) end end, [], List).
> [{{prim_inet,recv0,3},25856},{{gen_fsm,loop,7},26574}]
>
> Not sure which one is the ESTABLISHED list and which one is the FIN_WAIT2.
> Of course, I can't use sys:get_status/1 on the PIDs stuck in
> prim_inet:recv0/3 because the receive there is quite specific. So I can't
> get the stacktrace. The other case doesn't seem to give anything useful (for
> my level of knowledge, anyway).

You can get the stacktrace with erlang:process_info(Pid, backtrace).



More information about the erlang-bugs mailing list