[erlang-questions] Supervisor does not restart Gen Server

Gurgen Tumanian tumanian@REDACTED
Tue Feb 20 13:41:02 CET 2007


Hello everybody.

In my application i have a set of gen_servers orginized in a simple one
level supervision tree, with  one superviser above all.  Now the problem
that i have , is that once one of my gen_servers is crashed, the supervisor
does not restart it, and what is even worse - dies himself.
I have simplified the problem, creating a simple gen server in which a
badarith can be initiated(divide by zero)  and a
simple supervisor, which should have restarted it in case of crash by
one_to_one strategy.

now when starting the supervisor, and then calling the zuzu:do(0) (causing
the badmatch)
i get the crash of the worker gen_serv, and then the supervisor
crashes.Supervior's crash report is
=CRASH REPORT==== 20-Feb-2007::16:35:12 ===
  crasher:
    pid: <0.41.0>
    registered_name: []
    error_info: {{badarith,[{zuzu,handle_call,3},
                             {gen_server,handle_msg,6},
                             {proc_lib,init_p,5}]},
                  {gen_server,call,[zuzu_serv,{do,0},35000]}}
    initial_call: {gen,init_it,
                      [gen_server,
                       <0.39.0>,
                       <0.39.0>,
                       supervisor,
                       {self,bubu,[]},
                       []]}
    ancestors: [<0.39.0>]
    messages: []
    links: []
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 233
    stack_size: 21
    reductions: 227
  neighbours:

I get the feeling that the supervisor dies as it pasess the restart limit,
but that's a quite surprise for me, as the first start of the worker proc
pases normally.
I will be greatfull for any advice on this issue.

Regards
Gurgen Tumanyan, Smart Tech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070220/e35f9318/attachment.htm>


More information about the erlang-questions mailing list