Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-6653

[windows] Unable to update ddoc(1 bucket, single node)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0-beta-2
    • Component/s: view-engine
    • Security Level: Public
    • Labels:
      None
    • Environment:
      single node windows server r2 2008

      Description

      steps to reproduce:
      1. Create 3 ddocs
      2. Keep updating them (adding views)

      test to repro:
      -t view.createdeleteview.CreateDeleteViewTests.test_view_ops_parallel,ddoc_ops=update,test_with_view=True,num_ddocs=4,num_views_per_ddoc=10,items=200000,start_view=2,views_to_ops=5

      I had 9 views per ddoc when it started to fail updates with error:
      [couchdb:error,2012-09-13T12:34:30.306,ns_1@10.1.3.135:<0.15724.7>:couch_log:error:42]Uncaught error in HTTP request: {exit,
      {noproc,
      {gen_server,call,
      ['capi_set_view_manager-default',
      {interactive_update,
      {doc,<<"_design/dev_ddoc1">>,

      {0,<<>>}

      ,
      <<"{\"views\":{\"views0\":{\"map\":\"function (doc)

      { emit(doc.age, doc.first_name);}\"},\"views1\":{\"map\":\"function (doc) { emit(doc.age, doc.first_name);}

      \"},\"views2\":{\"map\":\"function (doc)

      { emit(null, doc);}\"},\"views3\":{\"map\":\"function (doc) { emit(null, doc);}

      \"},\"views4\":{\"map\":\"function (doc)

      { emit(null, doc);}\"},\"views5\":{\"map\":\"function (doc) { emit(null, doc);}

      \"},\"views6\":{\"map\":\"function (doc)

      { emit(doc.age, doc.first_name);}\"},\"views7\":{\"map\":\"function (doc) { emit(doc.age, doc.first_name);}

      \"},\"views8\":{\"map\":\"function (doc)

      { emit(doc.age, doc.first_name);}\"},\"views9\":{\"map\":\"function (doc) { emit(doc.age, doc.first_name);}

      \"}}}">>,
      0,false,[]}},
      infinity]}}}
      [couchdb:info,2012-09-13T12:34:30.306,ns_1@10.1.3.135:<0.15724.7>:couch_log:info:39]Stacktrace: [

      {gen_server,call,3}

      ,

      {capi_frontend,update_doc,3}

      ,

      {couch_httpd_db,update_doc,5}

      ,

      {couch_httpd,handle_request,6}

      ,

      {mochiweb_http,headers,5}

      ,

      {proc_lib,init_p_do_apply,3}

      ]

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        chiyoung Chiyoung Seo added a comment -

        Filipe, this looks like your land.

        Show
        chiyoung Chiyoung Seo added a comment - Filipe, this looks like your land.
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        Request was made too early. We were still starting up

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - Request was made too early. We were still starting up
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        Perhaps I was too quick. Looking at this more

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - Perhaps I was too quick. Looking at this more
        Hide
        alkondratenko Aleksey Kondratenko (Inactive) added a comment -

        Badness happens because of some crash in couch:

        [error_logger:error,2012-09-13T11:06:31.133,ns_1@10.1.3.135:error_logger:ale_error_logger_handler:log_msg:76]** Generic server couch_set_view_ddoc_cache terminating

          • Last message in was {update_ddoc,<<"default">>,
            {doc,<<"_design/dev_ddoc1">>,
            {1,<<"4\nûJ">>}

            ,
            {[{<<"views">>,
            {[{<<"views0">>,
            {[

            Unknown macro: {<<"map">>, <<"function (doc) { emit(doc.age, doc.first_name);}">>}

            ]}}]}}]},
            0,false,[]},
            197}

          • When Server state == {state,1048576,2965,<0.243.0>}
          • Reason for termination ==
          • {{badmatch,false},
            [ {couch_set_view_ddoc_cache,handle_call,3},
            {gen_server,handle_msg,5},
            {proc_lib,init_p_do_apply,3}]}

            [couchdb:info,2012-09-13T11:06:31.133,ns_1@10.1.3.135:<0.4225.1>:couch_log:info:39]Compaction file still behind main file (update seq=6. compact update seq=5). Retrying.
            [error_logger:error,2012-09-13T11:06:31.133,ns_1@10.1.3.135:error_logger:ale_error_logger_handler:log_report:72]
            =========================CRASH REPORT=========================
            crasher:
            initial call: couch_set_view_ddoc_cache:init/1
            pid: <0.242.0>
            registered_name: couch_set_view_ddoc_cache
            exception exit: {{badmatch,false},
            [{couch_set_view_ddoc_cache,handle_call,3}

            ,

            {gen_server,handle_msg,5}

            ,

            {proc_lib,init_p_do_apply,3}

            ]}
            in function gen_server:terminate/6
            ancestors: [couch_secondary_services,couch_server_sup,cb_couch_sup,
            ns_server_cluster_sup,<0.67.0>]
            messages: [

            {'EXIT',<0.243.0>,normal}

            ]
            links: [<0.220.0>]
            dictionary: []
            trap_exit: true
            status: running
            heap_size: 2584
            stack_size: 24
            reductions: 12959
            neighbours:

        this leads to a bunch of failures inside ns_server and to this particular error

        Show
        alkondratenko Aleksey Kondratenko (Inactive) added a comment - Badness happens because of some crash in couch: [error_logger:error,2012-09-13T11:06:31.133,ns_1@10.1.3.135:error_logger:ale_error_logger_handler:log_msg:76] ** Generic server couch_set_view_ddoc_cache terminating Last message in was {update_ddoc,<<"default">>, {doc,<<"_design/dev_ddoc1">>, {1,<<"4\nûJ">>} , {[{<<"views">>, {[{<<"views0">>, {[ Unknown macro: {<<"map">>, <<"function (doc) { emit(doc.age, doc.first_name);}">>} ]}}]}}]}, 0,false,[]}, 197} When Server state == {state,1048576,2965,<0.243.0>} Reason for termination == {{badmatch,false}, [ {couch_set_view_ddoc_cache,handle_call,3}, {gen_server,handle_msg,5}, {proc_lib,init_p_do_apply,3}]} [couchdb:info,2012-09-13T11:06:31.133,ns_1@10.1.3.135:<0.4225.1>:couch_log:info:39] Compaction file still behind main file (update seq=6. compact update seq=5). Retrying. [error_logger:error,2012-09-13T11:06:31.133,ns_1@10.1.3.135:error_logger:ale_error_logger_handler:log_report:72] =========================CRASH REPORT========================= crasher: initial call: couch_set_view_ddoc_cache:init/1 pid: <0.242.0> registered_name: couch_set_view_ddoc_cache exception exit: {{badmatch,false}, [{couch_set_view_ddoc_cache,handle_call,3} , {gen_server,handle_msg,5} , {proc_lib,init_p_do_apply,3} ]} in function gen_server:terminate/6 ancestors: [couch_secondary_services,couch_server_sup,cb_couch_sup, ns_server_cluster_sup,<0.67.0>] messages: [ {'EXIT',<0.243.0>,normal} ] links: [<0.220.0>] dictionary: [] trap_exit: true status: running heap_size: 2584 stack_size: 24 reductions: 12959 neighbours: this leads to a bunch of failures inside ns_server and to this particular error
        Hide
        FilipeManana Filipe Manana (Inactive) added a comment -
        Show
        FilipeManana Filipe Manana (Inactive) added a comment - gerrit change: http://review.couchbase.org/#/c/20858/
        Hide
        thuan Thuan Nguyen added a comment -

        Integrated in github-couchdb-preview #505 (See http://qa.hq.northscale.net/job/github-couchdb-preview/505/)
        MB-6653 Fix ddoc cache cleanup on master database delete (Revision 34ae79b094c575990e445d302df2100bb3ecf662)

        Result = SUCCESS
        Farshid Ghods :
        Files :

        • src/couch_set_view/src/couch_set_view_ddoc_cache.erl
        • src/couch_set_view/test/02-old-index-cleanup.t
        Show
        thuan Thuan Nguyen added a comment - Integrated in github-couchdb-preview #505 (See http://qa.hq.northscale.net/job/github-couchdb-preview/505/ ) MB-6653 Fix ddoc cache cleanup on master database delete (Revision 34ae79b094c575990e445d302df2100bb3ecf662) Result = SUCCESS Farshid Ghods : Files : src/couch_set_view/src/couch_set_view_ddoc_cache.erl src/couch_set_view/test/02-old-index-cleanup.t

          People

          • Assignee:
            FilipeManana Filipe Manana (Inactive)
            Reporter:
            iryna iryna
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes