couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Samuel Newson <rnew...@apache.org>
Subject Re: Couch stopped working (service was still alive)
Date Sun, 27 Nov 2016 23:29:22 GMT
looks like a bug in a core Erlang/OTP application (disksup) rather than couchdb itself. What
version of erlang are you using?

Ubuntu 14.04 bundles R16B03 so I'll assume that for now, so that's

terminate(_Reason, State) ->
    clear_alarms(),
    case State#state.port of
        not_used ->
            ok;
        Port ->
            port_close(Port)
    end,
    ok.

Which is to say, the reason for that process to terminate is a bug in the terminate callback
function, and that makes no sense to me. I suspect, but don't know, that this is just wonky
reporting. Something else must have caused termination, and the bug in terminate/2 is being
reported erroneously as that reason. Perhaps there's more in your log that would explain this.

On your question of data corruption, that won't happen for any kind of process crash in couchdb.
The worst scenario would be any un-fsynced data being lost and all databases rolling back
to the last fsynced state. For this reason, we recommend setting the delayed_commits config
setting to false. This defaults to true in versions earlier than 2.0, and defaults to true
from 2.0 onward.

HTH
B.


> On 27 Nov 2016, at 08:46, Kiril Stankov <kiril@open-net.biz> wrote:
> 
> Hi,
> 
> I adore Couch, but one thing always puzzled me is the log files syntax.
> I understand it is readable for Erlang people, but not being one of them, can, please,
someone help me decipher the lines below.
> 
> Couch stopped answering queries yesterday, after 6 months of flawless operation.
> There was nothing unusual on the OS, disk has plenty of space, etc. Ubuntu 14. Couch
1.6.
> 
> Restarting it fixed the problem.
> 
> But I am still unsure if possible data corruption may have occurred and what was the
root cause of the problem.
> 
> Thanks!
> 
> [Fri, 25 Nov 2016 14:53:01 GMT] [error] [<0.2510.0>] {error_report,<0.78.0>,
>                      {<0.2510.0>,crash_report,
> [[{initial_call,{disksup,init,['Argument__1']}},
>                         {pid,<0.2510.0>},
>                         {registered_name,disksup},
>                         {error_info,
>                          {exit,
>                           {badarg,
> [{erlang,port_close,[#Port<0.3152>],[]},
>                             {disksup,terminate,2,
>                              [{file,"disksup.erl"},{line,164}]},
>                             {gen_server,terminate,6,
>                              [{file,"gen_server.erl"},{line,719}]},
>                             {proc_lib,init_p_do_apply,3,
>                              [{file,"proc_lib.erl"},{line,239}]}]},
>                           [{gen_server,terminate,6,
>                             [{file,"gen_server.erl"},{line,722}]},
>                            {proc_lib,init_p_do_apply,3,
>                             [{file,"proc_lib.erl"},{line,239}]}]}},
>                         {ancestors,[os_mon_sup,<0.79.0>]},
>                         {messages,[]},
>                         {links,[<0.80.0>]},
>                         {dictionary,[]},
>                         {trap_exit,true},
>                         {status,running},
>                         {heap_size,610},
>                         {stack_size,27},
>                         {reductions,350}],
>                        []]}}
> 
> [Fri, 25 Nov 2016 14:53:01 GMT] [error] [<0.80.0>] {error_report,<0.78.0>,
>                       {<0.80.0>,supervisor_report,
>                        [{supervisor,{local,os_mon_sup}},
>                         {errorContext,child_terminated},
>                         {reason,
>                             {badarg,
> [{erlang,port_close,[#Port<0.3157>],[]},
>                                  {disksup,terminate,2,
> [{file,"disksup.erl"},{line,164}]},
>                                  {gen_server,terminate,6,
> [{file,"gen_server.erl"},{line,719}]},
>                                  {proc_lib,init_p_do_apply,3,
> [{file,"proc_lib.erl"},{line,239}]}]}},
>                         {offender,
>                             [{pid,<0.2514.0>},
>                              {name,disksup},
>                              {mfargs,{disksup,start_link,[]}},
>                              {restart_type,permanent},
>                              {shutdown,2000},
>                              {child_type,worker}]}]}}
> 
> 
> [Fri, 25 Nov 2016 14:53:01 GMT] [error] [<0.2514.0>] ** Generic server disksup
terminating
> ** Last message in was timeout
> ** When Server state == {state,100,60000,{unix,linux},[],#Port<0.3157>}
> ** Reason for termination ==
> ** {badarg,[{erlang,port_close,[#Port<0.3157>],[]},
>            {disksup,terminate,2,[{file,"disksup.erl"},{line,164}]},
> {gen_server,terminate,6,[{file,"gen_server.erl"},{line,719}]},
> {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
> 
> -- 
> ------------------------------------------------------------------------
> *With best regards,*
> Kiril Stankov,
> CEO
> 
> 
>           This Email disclaimer
>           <http://open-net.biz/emailsignature.html> is integral part
>           of this message.
> 


Mime
View raw message