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

Bad custom reduce function kills the server

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0, 2.0.1
    • Fix Version/s: 2.1.0
    • Component/s: view-engine
    • Security Level: Public
    • Labels:
      None
    • Environment:
      Tested on:
      - Ubuntu 12 : crash(does not restart automatically)
      - OS X : crash then restart

      Description

      If a developer does a emit in the reduce function the server crashes.

      For example:

      1. Install Couchbase 2.0
      2. Load the beer sample data
      3. Create a new view in the beer-sample data
      4. Keep the default values
      5- Add a custom reduce function:

      function (keys, values, rereduce)

      { emit("this is bad"); }


      6- Save
      7- Click "Show Results"

      >> Server Crashed

      I know that it is not something that is supposed to be done, but one developer that was "playing" around with views and try to understand how reduce works made a mistake in a copy and paste and kills his server.

      Our view engine should not crash the server, when bad code is inserted.

        Issue Links

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

          Activity

          Hide
          tgrall Tug Grall (Inactive) added a comment -

          OS X log file

          Show
          tgrall Tug Grall (Inactive) added a comment - OS X log file
          Hide
          dipti Dipti Borkar added a comment -

          Filipe, is this a dupe of the other reduce "emit" bug you fixed?

          Show
          dipti Dipti Borkar added a comment - Filipe, is this a dupe of the other reduce "emit" bug you fixed?
          Hide
          FilipeManana Filipe Manana (Inactive) added a comment -
          Show
          FilipeManana Filipe Manana (Inactive) added a comment - MB-7764
          Hide
          tgrall Tug Grall (Inactive) added a comment -

          Sorry I just found that it is a duplicate reading the forum...

          Show
          tgrall Tug Grall (Inactive) added a comment - Sorry I just found that it is a duplicate reading the forum...
          Hide
          maria Maria McDuff (Inactive) added a comment -
          Show
          maria Maria McDuff (Inactive) added a comment - MB-7764

            People

            • Assignee:
              FilipeManana Filipe Manana (Inactive)
              Reporter:
              tgrall Tug Grall (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes