Ack with minor comments:

* Have you considered to use two values (e.g. -1 and -2) to avoid 
spamming syslog as I suggested in the ticket, instead of using a global 
flag for this purpose? A global flag is, well, global, so it doesn't 
work so good when there is more than one NCS_SEL_OBJ. Something like this:

     if (i_ind_obj.rmv_obj < 0) {
         /* Very unlikely, still avoid spamming and log only once */
         if (i_ind_obj.rmv_obj == -1)
             syslog(LOG_ERR, "%s: FAILED", __FUNCTION__);
         i_ind_obj.rmv_obj = -2;
         return NCSCC_RC_FAILURE;
     }

*  Before failing with osaf_abort(), it would probably be a good idea to 
log the values of both raise_obj and rmv_obj in the syslog message, 
since this kind of problems (at least the ones I have seen) is likely to 
be caused by a mixup of file descriptors.

/ Anders Widell

On 06/11/2014 11:03 AM, ramesh.bet...@oracle.com wrote:
> Summary: base: Corrected handling of raise_obj, rmv_obj file descriptors of 
> Selection object [#928]
> Review request for Trac Ticket(s): #928
> Peer Reviewer(s): Mathi, Anders.W
> Affected branch(es): default, 4.4.x and 4.3.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        y
>   Core libraries          y
>   Samples                 n
>   Tests                   n
>   Other                   n
>
>
> Comments (indicate scope for each "y" above):
> ---------------------------------------------
>
> changeset 606b18b5b513bd75f0aea52e3572f7996132664b
> Author:       Ramesh <ramesh.bet...@oracle.com>
> Date: Wed, 11 Jun 2014 14:22:39 +0530
>
>       base: Corrected handling of raise_obj, rmv_obj file descriptors of 
> Selection
>       object [#928] This patch addresses the corrections suggested by the 
> ticket
>       #928, in handling raise_obj, rmv_obj file descriptors of selection 
> object.
>
>       1. Whenever the file descriptors raise_obj and/or rmv_obj are closed, 
> the
>       respective file descriptor(s) in the data structure are set to -1 
> indicating
>       that the file descriptor(s) are no longer valid.
>
>       2. The function ncs_sel_obj_rmv_ind() checks rmv_obj file descriptor, 
> and if
>       set to -1, return immediately without trying to operate on the file
>       descriptor.
>
>       3. The function ncs_sel_obj_ind() checks raise_obj file descriptor, and 
> if
>       set to -1, return immediately without trying to operate on the file
>       descriptor.
>
>       4. If still recv() fails due to any other reason than EAGAIN or EINTR, 
> does
>       osaf_abort() to generate a core dump.
>
>
> Complete diffstat:
> ------------------
>   osaf/libs/agents/saf/amfa/ava_init.c          |   2 +-
>   osaf/libs/agents/saf/clma/clma_util.c         |   2 +-
>   osaf/libs/agents/saf/cpa/cpa_init.c           |   2 +-
>   osaf/libs/agents/saf/cpa/cpa_proc.c           |   2 +-
>   osaf/libs/agents/saf/eda/eda_mds.c            |   2 +-
>   osaf/libs/agents/saf/gla/gla_init.c           |   2 +-
>   osaf/libs/agents/saf/imma/imma_init.c         |   2 +-
>   osaf/libs/agents/saf/lga/lga_util.c           |   2 +-
>   osaf/libs/agents/saf/mqa/mqa_init.c           |   4 ++--
>   osaf/libs/agents/saf/ntfa/ntfa_util.c         |   2 +-
>   osaf/libs/agents/saf/plma/plma_mds.c          |   2 +-
>   osaf/libs/core/include/ncs_osprm.h            |   2 +-
>   osaf/libs/core/leap/os_defs.c                 |  37 
> ++++++++++++++++++++++++++++---------
>   osaf/libs/core/leap/sysf_tmr.c                |   8 ++++----
>   osaf/libs/core/mds/mds_c_sndrcv.c             |  10 +++++-----
>   osaf/libs/core/mds/mds_main.c                 |   4 ++--
>   osaf/services/infrastructure/fm/fms/fm_main.c |   2 +-
>   osaf/services/infrastructure/rde/rde_main.c   |   2 +-
>   osaf/services/saf/clmsv/clms/clms_main.c      |   2 +-
>   osaf/services/saf/clmsv/nodeagent/main.c      |   2 +-
>   osaf/services/saf/immsv/immd/immd_main.c      |   2 +-
>   osaf/services/saf/immsv/immnd/immnd_main.c    |   2 +-
>   osaf/services/saf/logsv/lgs/lgs_main.c        |   2 +-
>   osaf/services/saf/ntfsv/ntfs/ntfs_main.c      |   2 +-
>   osaf/services/saf/plmsv/plms/plms_main.c      |   2 +-
>   25 files changed, 61 insertions(+), 42 deletions(-)
>
>
> Testing Commands:
> -----------------
> Bring up opensaf, verify switch-overs and fail-overs.
>
>
> Testing, Expected Results:
> --------------------------
> Should not report any failures.
>
>
> Conditions of Submission:
> -------------------------
> Ack from Mathi/Anders.W
>
> 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.
>


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to