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

Memory leaks in mapreduce NIF

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.0.0
    • 4.1.0, 4.5.0
    • view-engine
    • None
    • Untriaged
    • No

    Description

      As per Aliaksey Artamonau comments on CBSE-2489

      Memory leak

      If http://src.couchbase.org/source/xref/4.1.0/couchdb/src/mapreduce/mapreduce.cc#186 throws, nothing is going to release the isolate created earlier in the function.

      Yet another memory leak

      When initContext (http://src.couchbase.org/source/xref/4.1.0/couchdb/src/mapreduce/mapreduce_nif.cc#113) throws any exception (this is what happens if there's an error in view definitions), enif_release_context is never called. So the memory allocated for the ctx is never released.

      Attachments

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

        Activity

          People

            harsha Harsha Havanur
            harsha Harsha Havanur
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty