incubator-couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damien Katz <dam...@apache.org>
Subject Re: couch_server_sup
Date Sat, 15 Nov 2008 16:03:46 GMT
All it does is force the top level server to crash,  causing a restart  
of it and all components. The exceptions are normal.

-Damien


On Nov 15, 2008, at 9:03 AM, Robert Dionne wrote:

> I'm looking through couch_server and couch_serv_sup, as an example  
> for study while reading the Armstrong book on OTP.
>
> I've added allow_remote_restart and admin passwords to my couch- 
> dev.ini  so that couch_httpd_msc_handlers calls  
> couch_server:restart. When it sends the restart to couch_server_sup  
> I get the stacks below. Debugging it I see that couch_server and the  
> other children are terminated and couch seems to still behave okay.  
> Why the exceptions? Is it just the message not being handled? Thanks  
> and sorry if this is too newbie a question.
>
> Bob
>
>
> (foo@erlang)6> [error] [<0.173.0>] ** Generic server couch_server  
> terminating
> ** Last message in was remote_restart
> ** When Server state == {server,"/Users/bitdiddle/emacs/couchdb/tmp/ 
> lib",
>                         {concat,
>                          {concat,
>                           {concat,bos,{char_class,[{97,122}]}},
>                           {kclosure,
>                            {char_class,
>                             [47,45,43,41,40,36,95,{48,57}, 
> {97,122}]}}},
>                          eos},
>                         "100",4}
> ** Reason for termination ==
> ** {badarg,
>       [{erlang,exit,[couch_server_sup,restart]},
>        {couch_server,handle_call,
>            [remote_restart,
>             {<0.229.0>,#Ref<0.0.0.3189>},
>             {server,"/Users/bitdiddle/emacs/couchdb/tmp/lib",
>                 {concat,
>                     {concat,
>                         {concat,bos,{char_class,[{97,122}]}},
>                         {kclosure,
>                             {char_class,
>                                 [47,45,43,41,40,36,95,{48,57}, 
> {97,122}]}}},
>                     eos},
>                 "100",4}]}]}
>
> (foo@erlang)6>
> =ERROR REPORT==== 15-Nov-2008::07:53:50 ===
> ** Generic server couch_server terminating
> ** Last message in was remote_restart
> ** When Server state == {server,"/Users/bitdiddle/emacs/couchdb/tmp/ 
> lib",
>                         {concat,
>                          {concat,
>                           {concat,bos,{char_class,[{97,122}]}},
>                           {kclosure,
>                            {char_class,
>                             [47,45,43,41,40,36,95,{48,57}, 
> {97,122}]}}},
>                          eos},
>                         "100",4}
> ** Reason for termination ==
> ** {badarg,
>       [{erlang,exit,[couch_server_sup,restart]},
>        {couch_server,handle_call,
>            [remote_restart,
>             {<0.229.0>,#Ref<0.0.0.3189>},
>             {server,"/Users/bitdiddle/emacs/couchdb/tmp/lib",
>                 {concat,
>                     {concat,
>                         {concat,bos,{char_class,[{97,122}]}},
>                         {kclosure,
>                             {char_class,
>                                 [47,45,43,41,40,36,95,{48,57}, 
> {97,122}]}}},
>                     eos},
>                 "100",4}]}]}
> (foo@erlang)6> [error] [<0.173.0>] {error_report,<0.28.0>,
> {<0.173.0>,crash_report,
>  [[{pid,<0.173.0>},
>    {registered_name,couch_server},
>    {error_info,
>     {exit,
>      {badarg,
>       [{erlang,exit,[couch_server_sup,restart]},
>        {couch_server,handle_call,
>         [remote_restart,
>          {<0.229.0>,#Ref<0.0.0.3189>},
>          {server,"/Users/bitdiddle/emacs/couchdb/tmp/lib",
>           {concat,
>            {concat,
>             {concat,bos,{char_class,[{97,122}]}},
>             {kclosure,{char_class,[47,45,43,41,40,36,95,{48,57}, 
> {97,122}]}}},
>            eos},
>           "100",4}]}]},
>      [{gen_server,terminate,6},{proc_lib,init_p_do_apply,3}]}},
>    {initial_call,{couch_server,init,['Argument__1']}},
>    {ancestors,[<0.55.0>,couch_server_sup,<0.1.0>]},
>    {messages,[]},
>    {links,[<0.196.0>,<0.200.0>,<0.206.0>,<0.188.0>,<0.55.0>]},
>    {dictionary,[]},
>    {trap_exit,true},
>    {status,running},
>    {heap_size,2584},
>    {stack_size,23},
>    {reductions,25027}],
>   [{neighbour,
>     [{pid,<0.198.0>},
>      {registered_name,[]},
>      {initial_call,{couch_stream,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,
>        
> [<0.197.0>,<0.196.0>,couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.197.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,233},
>      {stack_size,9},
>      {reductions,42}]},
>    {neighbour,
>     [{pid,<0.197.0>},
>      {registered_name,[]},
>      {initial_call,{couch_db_updater,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors, 
> [<0.196.0>,couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.196.0>,<0.198.0>,<0.195.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,1597},
>      {stack_size,9},
>      {reductions,80382}]},
>    {neighbour,
>     [{pid,<0.199.0>},
>      {registered_name,[]},
>      {initial_call,{couch_file,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,[couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[#Port<0.3317>,<0.201.0>]},
>      {dictionary,[{<0.200.0>,{#Ref<0.0.0.1980>,1}}]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,233},
>      {stack_size,9},
>      {reductions,1100}]},
>    {neighbour,
>     [{pid,<0.202.0>},
>      {registered_name,[]},
>      {initial_call,{couch_stream,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,
>        
> [<0.201.0>,<0.200.0>,couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.201.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,233},
>      {stack_size,9},
>      {reductions,42}]},
>    {neighbour,
>     [{pid,<0.201.0>},
>      {registered_name,[]},
>      {initial_call,{couch_db_updater,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors, 
> [<0.200.0>,couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.200.0>,<0.202.0>,<0.199.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,1597},
>      {stack_size,9},
>      {reductions,80382}]},
>    {neighbour,
>     [{pid,<0.205.0>},
>      {registered_name,[]},
>      {initial_call,{couch_file,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,[couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[#Port<0.3326>,<0.207.0>]},
>      {dictionary,[{<0.206.0>,{#Ref<0.0.0.2233>,1}}]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,2584},
>      {stack_size,9},
>      {reductions,23700}]},
>    {neighbour,
>     [{pid,<0.208.0>},
>      {registered_name,[]},
>      {initial_call,{couch_stream,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,
>        
> [<0.207.0>,<0.206.0>,couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.207.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,610},
>      {stack_size,9},
>      {reductions,394}]},
>    {neighbour,
>     [{pid,<0.207.0>},
>      {registered_name,[]},
>      {initial_call,{couch_db_updater,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors, 
> [<0.206.0>,couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.206.0>,<0.208.0>,<0.205.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,2584},
>      {stack_size,9},
>      {reductions,364483}]},
>    {neighbour,
>     [{pid,<0.187.0>},
>      {registered_name,[]},
>      {initial_call,{couch_file,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,[couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[#Port<0.3311>,<0.189.0>]},
>      {dictionary,[{<0.188.0>,{#Ref<0.0.0.1911>,1}}]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,377},
>      {stack_size,9},
>      {reductions,1179}]},
>    {neighbour,
>     [{pid,<0.190.0>},
>      {registered_name,[]},
>      {initial_call,{couch_stream,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,
>        
> [<0.189.0>,<0.188.0>,couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.189.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,233},
>      {stack_size,9},
>      {reductions,42}]},
>    {neighbour,
>     [{pid,<0.189.0>},
>      {registered_name,[]},
>      {initial_call,{couch_db_updater,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors, 
> [<0.188.0>,couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.188.0>,<0.190.0>,<0.187.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,610},
>      {stack_size,9},
>      {reductions,80193}]},
>    {neighbour,
>     [{pid,<0.188.0>},
>      {registered_name,[]},
>      {initial_call,{couch_db,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,[couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.173.0>,<0.189.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,610},
>      {stack_size,9},
>      {reductions,197}]},
>    {neighbour,
>     [{pid,<0.206.0>},
>      {registered_name,[]},
>      {initial_call,{couch_db,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,[couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.173.0>,<0.207.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,2584},
>      {stack_size,9},
>      {reductions,1024}]},
>    {neighbour,
>     [{pid,<0.200.0>},
>      {registered_name,[]},
>      {initial_call,{couch_db,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,[couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.173.0>,<0.201.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,377},
>      {stack_size,9},
>      {reductions,147}]},
>    {neighbour,
>     [{pid,<0.196.0>},
>      {registered_name,[]},
>      {initial_call,{couch_db,init,['Argument__1']}},
>      {current_function,{gen_server,loop,6}},
>      {ancestors,[couch_server,<0.55.0>,couch_server_sup,<0.1.0>]},
>      {messages,[]},
>      {links,[<0.173.0>,<0.197.0>]},
>      {dictionary,[]},
>      {trap_exit,false},
>      {status,waiting},
>      {heap_size,377},
>      {stack_size,9},
>      {reductions,155}]}]]}}
> (foo@erlang)6> [error] [<0.55.0>] {error_report,<0.28.0>,
> {<0.55.0>,supervisor_report,
>  [{supervisor,{<0.55.0>,couch_server_sup}},
>   {errorContext,child_terminated},
>   {reason,
>    {badarg,
>     [{erlang,exit,[couch_server_sup,restart]},
>      {couch_server,handle_call,
>       [remote_restart,
>        {<0.229.0>,#Ref<0.0.0.3189>},
>        {server,"/Users/bitdiddle/emacs/couchdb/tmp/lib",
>         {concat,
>          {concat,
>           {concat,bos,{char_class,[{97,122}]}},
>           {kclosure,{char_class,[47,45,43,41,40,36,95,{48,57}, 
> {97,122}]}}},
>          eos},
>         "100",4}]}]}},
>   {offender,
>    [{pid,<0.173.0>},
>     {name,couch_server},
>     {mfa,{couch_server,sup_start_link,[]}},
>     {restart_type,permanent},
>     {shutdown,brutal_kill},
>     {child_type,supervisor}]}]}}
>
>
>
>
>


Mime
View raw message