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

certain map functions crash the server

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.1.0
    • Component/s: view-engine
    • Security Level: Public
    • Labels:
      None

      Description

      1. 2.0.1, build 170 (but i saw the exact same behavior on 2.0 GA).
      2. Run the game simulator workload on 3 nodes cluster - (http://loadgen.west.aws.couchbase.net:9980/)
      3. create a player/leaderboard view
      4. setup the following map (notice the javascript syntax error):
      -----------------------
      Leader board
      function (doc, meta) {
      if (doc.jsonType == "player" && doc.experience)

      { emit(doc.experience, null); }

      }
      -------------------------
      5. Save the view.

      Server is crashing, UI disappears
      cbcollect info file is attached.

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

        Activity

        Hide
        farshid Farshid Ghods (Inactive) added a comment -

        is this on mac ?

        Show
        farshid Farshid Ghods (Inactive) added a comment - is this on mac ?
        Hide
        farshid Farshid Ghods (Inactive) added a comment - - edited

        it should be reproducible but Deep was unable to reproduce using the UI because it does not allow invalid map function.
        from Deep,

        Tried this on Linux(centos) for build 2.0.1-160-rel and 2.0.0-1976-rel.

        If I create a view with below map function:

        Leader board
        function (doc, meta) {
        if (doc.jsonType == "player" && doc.experience)

        { emit(doc.experience, null); }

        }

        I get the below error on saving it:

        "Syntax error in the map function of the view `v1': SyntaxError: Unexpected identifier"

        I just have a default bucket on 4 nodes with 1000 json docs in it.

        Tried with gamesim-sample bucket as well. Added a new view to it with above definition. Getting the "syntax error" message there as well.

        Deep

        Show
        farshid Farshid Ghods (Inactive) added a comment - - edited it should be reproducible but Deep was unable to reproduce using the UI because it does not allow invalid map function. from Deep, Tried this on Linux(centos) for build 2.0.1-160-rel and 2.0.0-1976-rel. If I create a view with below map function: Leader board function (doc, meta) { if (doc.jsonType == "player" && doc.experience) { emit(doc.experience, null); } } I get the below error on saving it: "Syntax error in the map function of the view `v1': SyntaxError: Unexpected identifier" I just have a default bucket on 4 nodes with 1000 json docs in it. Tried with gamesim-sample bucket as well. Added a new view to it with above definition. Getting the "syntax error" message there as well. Deep
        Hide
        vmx Volker Mische added a comment -

        Sharon, so the "Leader board" is part of the function? Is that the syntax error? Can you please tell us how you created the function? I also can't reproduce it, even through the HTTP you can't add invalid functions.

        Show
        vmx Volker Mische added a comment - Sharon, so the "Leader board" is part of the function? Is that the syntax error? Can you please tell us how you created the function? I also can't reproduce it, even through the HTTP you can't add invalid functions.
        Hide
        sharon Sharon Barr (Inactive) added a comment -

        yes, it's part of the function, i.e. expecting a syntax error.

        to be clear on the details,
        i installed 3 nodes cluster via rightscale on EC2, run the load of the gamesimulator itself (not the sample bucket) and had ~400K documents.
        i created this view while load was running. and then the node crashed.

        doesn't the collect info show this crash clearly?
        it happens to me all the time. i never saw this syntax error message on a cluster, i'll try it on my macbook later on.

        Show
        sharon Sharon Barr (Inactive) added a comment - yes, it's part of the function, i.e. expecting a syntax error. to be clear on the details, i installed 3 nodes cluster via rightscale on EC2, run the load of the gamesimulator itself (not the sample bucket) and had ~400K documents. i created this view while load was running. and then the node crashed. doesn't the collect info show this crash clearly? it happens to me all the time. i never saw this syntax error message on a cluster, i'll try it on my macbook later on.
        Hide
        vmx Volker Mische added a comment -

        Sharon, any news? Can you reproduce it on your MacBook? It could be a serious issue if it can be reproduced.

        Show
        vmx Volker Mische added a comment - Sharon, any news? Can you reproduce it on your MacBook? It could be a serious issue if it can be reproduced.
        Hide
        maria Maria McDuff (Inactive) added a comment -

        waiting for repro. Deep - pls repro then assign to one of the view engine team. thanks.

        Show
        maria Maria McDuff (Inactive) added a comment - waiting for repro. Deep - pls repro then assign to one of the view engine team. thanks.
        Hide
        deepkaran.salooja Deepkaran Salooja added a comment -

        Unable to repro with build 2.0.2-764-rel and 2.0.1-170-rel. Tried on a 3 node cluster on Centos 64. With the load running, created the view with javascript error. It gives syntax error. No crash observed.
        Tried creating the bad view with indexing/compaction/mutations running in parallel. Syntax error is always returned.

        Show
        deepkaran.salooja Deepkaran Salooja added a comment - Unable to repro with build 2.0.2-764-rel and 2.0.1-170-rel. Tried on a 3 node cluster on Centos 64. With the load running, created the view with javascript error. It gives syntax error. No crash observed. Tried creating the bad view with indexing/compaction/mutations running in parallel. Syntax error is always returned.
        Hide
        maria Maria McDuff (Inactive) added a comment -

        sharon,
        QE is unable to repro. see details from deep.

        Show
        maria Maria McDuff (Inactive) added a comment - sharon, QE is unable to repro. see details from deep.

          People

          • Assignee:
            sharon Sharon Barr (Inactive)
            Reporter:
            sharon Sharon Barr (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes