Summary: ckpt: ckptnd doesn't handle fault case when creating share memory at 
start
Review request for Trac Ticket(s): #1423
Peer Reviewer(s): [email protected];[email protected]
Pull request to: <<LIST THE PERSON WITH PUSH ACCESS HERE>>
Affected branch(es): default, opensaf-4.6.x, opensaf-4.5.x
Development branch: default

--------------------------------
Impacted area       Impact y/n
--------------------------------
 Docs                    n
 Build system            n
 RPM/packaging           n
 Configuration files     n
 Startup scripts         n
 SAF services            Y
 OpenSAF services        n
 Core libraries          n
 Samples                 n
 Tests                   n
 Other                   n


Comments (indicate scope for each "y" above):
---------------------------------------------
 <<EXPLAIN/COMMENT THE PATCH SERIES HERE>>

changeset 4d97a3954d4de4e85188f5361f29ff21e8670930
Author: Nhat Pham <[email protected]>
Date:   Mon, 17 Aug 2015 11:44:36 +0700

        ckpt: ckptnd doesn't handle fault case when creating share memory at 
start
        up [#1423]

        When installing a campaign a test component, the ckptnd trigger a core 
dump.
        Following is the message in the syslog.

        Jun 17 07:50:41 SC-2-2 osafckptnd[11361]: ER cpnd open request fail for 
RDWR
        mode (null) Jun 17 07:50:51 SC-2-2 kernel: [ 494.474214] 
osafckptnd[11361]:
        segfault at 0 ip 00007f25cd609608 sp 00007fffdb6290b8 error 4 in
        libc-2.19.so[7f25cd57f000+19e000]

        Following is the bt: (gdb) bt 0 0x00007fb733293608 in
        _wordcopy_fwd_dest_aligned () from /lib64/libc.so.6 1 
0x00007fb73328db8a in
        __memmove_sse2 () from /lib64/libc.so.6 2 0x00007fb7343258cc in
        ncs_os_posix_shm (req=0x7fffe65e7090) at os_defs.c:836 3 
0x0000000000415d1f
        in cpnd_find_free_loc () 4 0x0000000000415f46 in
        cpnd_restart_shm_client_update () 5 0x0000000000405a5b in
        cpnd_evt_proc_ckpt_init () 6 0x000000000040d532 in cpnd_process_evt () 7
        0x000000000040e235 in cpnd_main_process () 8 0x000000000040edf7 in main 
()

        Investigation:
        -------------- At start up, when cpnd creates restart share memory, it
        doesn't handle faulty case where a NULL shm_ptr pointer is returned. 
This
        leads triggering core dump when the pointer is used later.

        Solution:
        --------- To return fault code when creating restart share memory fails.


Complete diffstat:
------------------
 osaf/services/saf/cpsv/cpnd/cpnd_init.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


Testing Commands:
-----------------
restart ckptnd with kill command


Testing, Expected Results:
--------------------------
The ckptnd should be restarted normally


Conditions of Submission:
-------------------------
 <<HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC>>


Arch      Built     Started    Linux distro
-------------------------------------------
mips        n          n
mips64      n          n
x86         n          n
x86_64      y          y
powerpc     n          n
powerpc64   n          n


Reviewer Checklist:
-------------------
[Submitters: make sure that your review doesn't trigger any checkmarks!]


Your checkin has not passed review because (see checked entries):

___ Your RR template is generally incomplete; it has too many blank entries
    that need proper data filled in.

___ You have failed to nominate the proper persons for review and push.

___ Your patches do not have proper short+long header

___ You have grammar/spelling in your header that is unacceptable.

___ You have exceeded a sensible line length in your headers/comments/text.

___ You have failed to put in a proper Trac Ticket # into your commits.

___ You have incorrectly put/left internal data in your comments/files
    (i.e. internal bug tracking tool IDs, product names etc)

___ You have not given any evidence of testing beyond basic build tests.
    Demonstrate some level of runtime or other sanity testing.

___ You have ^M present in some of your files. These have to be removed.

___ You have needlessly changed whitespace or added whitespace crimes
    like trailing spaces, or spaces before tabs.

___ You have mixed real technical changes with whitespace and other
    cosmetic code cleanup changes. These have to be separate commits.

___ You need to refactor your submission into logical chunks; there is
    too much content into a single commit.

___ You have extraneous garbage in your review (merge commits etc)

___ You have giant attachments which should never have been sent;
    Instead you should place your content in a public tree to be pulled.

___ You have too many commits attached to an e-mail; resend as threaded
    commits, or place in a public tree for a pull.

___ You have resent this content multiple times without a clear indication
    of what has changed between each re-send.

___ You have failed to adequately and individually address all of the
    comments and change requests that were proposed in the initial review.

___ You have a misconfigured ~/.hgrc file (i.e. username, email etc)

___ Your computer have a badly configured date and time; confusing the
    the threaded patch review.

___ Your changes affect IPC mechanism, and you don't present any results
    for in-service upgradability test.

___ Your changes affect user manual and documentation, your patch series
    do not contain the patch that updates the Doxygen manual.


------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to