pcp
[Top] [All Lists]

pcp updates - fix for bug 1057 (mem leaks from pmDestroyContext)

To: pcp@xxxxxxxxxxx
Subject: pcp updates - fix for bug 1057 (mem leaks from pmDestroyContext)
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Thu, 19 Jun 2014 09:41:51 +1000
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0
Changes committed to git://oss.sgi.com/kenj/pcp.git dev

 qa/828                   |  228 +++++++++++++++++++
 qa/828.out               |  146 ++++++++++++
 qa/833                   |   48 ++++
 qa/833.out               |  542 ++++++++++++++++++++++++++++++++++++++++++++++-
 qa/common.check          |   37 +--
 qa/group                 |    2 
 qa/src/.gitignore        |    1 
 qa/src/GNUlocaldefs      |    5 
 qa/src/bug1057.0         |binary
 qa/src/bug1057.index     |binary
 qa/src/bug1057.meta      |binary
 qa/src/churnctx.c        |  429 +++++++++++++++++++++++++++++++++++++
 src/include/pcp/impl.h   |    1 
 src/libpcp/src/context.c |   10 
 src/libpcp/src/exports   |    5 
 src/libpcp/src/interp.c  |   76 ++++++
 src/libpcp/src/pdubuf.c  |   15 +
 17 files changed, 1513 insertions(+), 32 deletions(-)

commit 0aca276deb631849a3944aa73e9857a46af1acdb
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Jun 19 09:17:02 2014 +1000

    libpcp - fix mem leaks associated with pmDestroyContext()
    
    Fixes for http://oss.sgi.com/bugzilla/show_bug.cgi?id=1057
    
    Frank's changes to pmwebd introduced a new libpcp use case, namely
    repeated iteration involving pmNewContext() ... pmDestroyContext()
    and specifically for archives.
    
    This exposed a number of memory leaks that this commit addresses.
    
    + introduce a new __pmFreeInterpData() routine that is called from
      pmDestroyContext() to do most of the work, namely for the context
      being destroyed, ...
      - walk the ac_pmid_hc hash table unpinning any PDU buffers that
        have been held for prior or next values (but not when valfmt
        is PM_VAL_INSITU) used in "interp" mode
      - free the chain of pmidcntl_ structs (PMIDs) from each __pmHashNode
      - free the chain of instcntl_t structs (instances) from each __pmHashNode
      - free the hash table and its entries
      - remove any pmResult held in the read cache (and unpin any associated
        PDU buffers) for enties from the data file associated with the
        context being destroyed
    + changes in pmDupContext() to ensure the archive hash table
      (...c_archctl->ac_pmid_hc) is NOT shared after a context is
      "dup'd" ... otherwise untold badness will flow from calling
      pmDestroyContext() on either the original or the dup'd
      archive context

commit 8728ae22e0e8e1c998ecdab20b0c3f0831a13601
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Jun 19 09:14:25 2014 +1000

    libpcp - small changes to diags for pinnned/unpinned buffers
    
    Part of tracking down http://oss.sgi.com/bugzilla/show_bug.cgi?id=1057

commit c4758018b89c5cc96016a1cd7fbfbba17db2b318
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Jun 19 09:12:33 2014 +1000

    qa/833 - tweak filter to remove current date

commit 4a0b4c794993820c9ffcada5f638151da285c8b1
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Jun 19 08:33:47 2014 +1000

    qa for bug 1057 - mem leaks from pmDestroyContext()
    
    See http://oss.sgi.com/bugzilla/show_bug.cgi?id=1057
    New test program (churntx) and archive (first hour of archive from
    the bug, thanks Frank).
    New qa tests 833 (buffer pinning part of the bug) and 828 (all of the
    other memory leaks exposed via valgrind).

commit 231f6ea4bcd3372644dba52fee4dbc28ff9b191c
Author: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date:   Thu Jun 19 08:31:16 2014 +1000

    qa/common.check - refactor valgrind support
    
    Simple change to expose _filter_valgrind() that can be used with
    roll-your-own valgrind execution (when _run_valgrind is not appropriate).

<Prev in Thread] Current Thread [Next in Thread>
  • pcp updates - fix for bug 1057 (mem leaks from pmDestroyContext), Ken McDonell <=