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

Memory leak when attempting to create a mapreduce context with syntactically invalid JavaScript functions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.0.1
    • 2.0
    • view-engine
    • Security Level: Public
    • None

    Description

      If a context is created with a syntactically invalid JavaScript function, not all previously allocated memory is released, due to the fact the context was never returned to Erlang.

      This happens exclusively at design document validation when the design document is validated.

      The following bash command exposes the leak:

      for i in `seq 1 10000`; do
      curl -s -H 'Content-Type: application/json' \
      -X PUT 'http://localhost:9500/default/_design/badspatial2' \
      -d '{ "spatial": { "view1": "function(doc, meta { emit(

      {type: 'Point', coordinates: doc.loc}

      , meta.id); }" } }'
      done

      Attachments

        For Gerrit Dashboard: MB-7407
        # Subject Branch Project Status CR V

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty