Reproduce:
Use immlist on an object with runtime attributes and OI attached.
Kill immlist before receiving the response from OI.
root@SC-1:~# immlist safSu=SC-1,safSg=NoRed,safApp=OpenSAF & kill -9 `pidof immlist`
==23745== 644 (24 direct, 620 indirect) bytes in 1 blocks are definitely lost in loss record 154 of 208 ==23745== at 0x4C2B200: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==23745== by 0x42104E: ImmSearchOp::nextResult(ImmsvOmRspSearchNext**, void**, std::list<SearchAttribute, std::allocator<SearchAttribute> >**) (ImmSearchOp.cc:124) ==23745== by 0x42AD55: immModel_nextResult (ImmModel.cc:1514) ==23745== by 0x40E216: immnd_evt_proc_search_next (immnd_evt.c:1526) ==23745== by 0x40EA86: immnd_evt_proc_accessor_get (immnd_evt.c:1861) ==23745== by 0x4187C2: immnd_process_evt (immnd_evt.c:609) ==23745== by 0x40B585: main (immnd_main.c:348)
Analysis:
The problem is 'mLastResult' is not freed when discarding the client node.
Diff:
default (5.1) [staging:2791b4]
changeset: 7686:2791b4c274dc
user: Hung Nguyen hung.d.nguyen@dektech.com.au
date: Thu May 26 13:54:43 2016 +0700
summary: imm: Free mLastResult of SearchOp when discarding the client [#1848]
opensaf-5.0.x [staging:556a6d]
changeset: 7687:556a6d37cc04
user: Hung Nguyen hung.d.nguyen@dektech.com.au
date: Thu May 26 13:54:43 2016 +0700
summary: imm: Free mLastResult of SearchOp when discarding the client [#1848]
opensaf-4.7.x [staging:d07700]
changeset: 7688:d0770045d67d
user: Hung Nguyen hung.d.nguyen@dektech.com.au
date: Thu May 26 13:54:43 2016 +0700
summary: imm: Free mLastResult of SearchOp when discarding the client [#1848]
Related
Commit: [2791b4]
Commit: [556a6d]
Commit: [d07700]
Tickets:
#1848