[erlang-questions] ets and zombie process

Tony Rogvall tony@REDACTED
Mon Jul 18 17:15:42 CEST 2011


On 18 jul 2011, at 15.54, Carlo Bertoldi wrote:

> Hello list,
> I have problem, as usual ;), this time with a process that refuses to die.
> This particular process is the owner of an ets table:
> ets:i().
> id              name              type        size   mem      owner
> sonde_in        sonde_in          ordered_set 1131   165217   <0.122.0>
> 
> In the meanwhile. the owner process crashed, let's check:
> 3> whereis(probe_db_manager).
> undefined

I would say that the server did not crash, it is just unregistered.
Clearly the <0.122.0> is not registered as probe_db_manager so, either it was
never registered or "someone" unregistered it.

/Tony


> 4> probe_db_manager:sonde_in_last_probe().
> ** exception exit: {noproc,{gen_server,call,
> [probe_db_manager,sonde_in_last_probe]}}
>     in function  gen_server:call/2
> 
> Ok, it is pushing daisies, but then why is the ets table still available? That made me suspicious, so I've checked running processes, and it's still there:
> 5> i().
> ...
> <0.122.0>             probe_db_manager:init/1                987 233278    0
>                      gen_server:loop/6                  9
> ...
> 
> So, to double check:
> 6> process_info(pid(0, 122,0)).
> [{current_function,{gen_server,loop,6}},
> {initial_call,{proc_lib,init_p,5}},
> {status,waiting},
> {message_queue_len,0},
> {messages,[]},
> {links,[<0.107.0>]},
> {dictionary,[{'$ancestors',[starter_sonda,<0.47.0>]},
>              {'$initial_call',{probe_db_manager,init,1}}]},
> {trap_exit,false},
> {error_handler,error_handler},
> {priority,normal},
> {group_leader,<0.46.0>},
> {total_heap_size,1974},
> {heap_size,987},
> {stack_size,9},
> {reductions,233278},
> {garbage_collection,[{min_bin_vheap_size,46368},
>                      {min_heap_size,233},
>                      {fullsweep_after,65535},
>                      {minor_gcs,845}]},
> {suspending,[]}]
> 7> is_process_alive(pid(0, 122,0)).
> true
> 8> sys:get_status(pid(0, 122, 0)).
> {status,<0.122.0>,
>        {module,gen_server},
>        [[{'$ancestors',[starter_sonda,<0.47.0>]},
>          {'$initial_call',{probe_db_manager,init,1}}],
>         running,<0.107.0>,[],
>         [{header,"Status for generic server probe_db_manager"},
>          {data,[{"Status",running},
>                 {"Parent",<0.107.0>},
>                 {"Logged events",[]}]},
>          {data,[{"State","1-VENERA-20110718150001"}]}]]}
> 
> Parent is the supervisor.
> 
> So, why the process <0.122.0> is in this sort of limbo?
> What do I have to do to make sure that after a crash it really goes away?
> 
> Thanks,
> Carlo
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

"Have run Make so many times I dunno what's installed anymore"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110718/812f9d91/attachment.htm>


More information about the erlang-questions mailing list