Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-7299

Memory leak in PdxInstanceImpl::updatePdxStream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.12.0
    • native client
    • None

    Description

      The `PdxInstanceImpl::updatePdxStream` method assigns the result of `DataInput::getBufferCopy` to its `m_buffer` member variable, but `m_buffer` is deleted by `PdxInstanceImpl` in its destructor, implying that `PdxInstanceImpl` owns the pointer, which means, in this case, that the existing `m_buffer`, if there is one, is leaked in this call.  We discovered that `updatePdxStream` is called on every put of a Pdx type, so in a tight loop with a lot of puts we are potentially leaking a lot of memory.

       

      Repro steps:

      Run the soon-to-be-implemented `LeakPdxMemory` test in the NC integration test suite.  Test will attempt to do a large number of puts of a large Pdx object, and look for an out of memory exception.

       

      Expected result:

      Test passes

       

      Actual result:

      Test fails.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bbender Blake Bender
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h