Re: [devel] [PATCH 1/1] ckptnd: fix crash during checkpoint open timeout with large sections [#1510]

2017-10-20 Thread Alex Jones


signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] CLM issue #2088 not oserved now

2017-10-20 Thread Ravi Sekhar Reddy Konda
Hi Mathi & Anders,


Regarding CLM issue #2088 "saClmClusterNodeGetAsync returns OK on a non member 
node" 

I am not observing this issue now

here is the tests performed

On two node systems
Locked the CLM Node SC-2 and then invoked the async API returns ERR_UNAVAILABLE


root@SC-2:~# clmprint -a 0x2020f
node_id:131599(2020f)

===CLM NODE GET CALLBACK STARTS==
Error: SA_AIS_ERR_UNAVAILABLE (31)
Invocation: 0
error - InvocationId wrong,expected: , received: 0
===CLM NODE GET CALLBACK ENDS==

Let me know if the issue can be closed now


Thanks,
Ravi

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] ntf: Add support for code coverage to ntfimcn [#2623]

2017-10-20 Thread Hans Nordebäck
Ack, code review only/Thanks HansN

-Original Message-
From: Lennart Lund 
Sent: den 20 oktober 2017 12:45
To: Minh Hon Chau ; Hans Nordebäck 
; Anders Widell 
Cc: opensaf-devel@lists.sourceforge.net; Lennart Lund 

Subject: [PATCH 1/1] ntf: Add support for code coverage to ntfimcn [#2623]

Add gcov handling in ntfimcn, create_gcov_flush_thread Also refacor handling of 
configure handling for gcov functionality, create_gcov_flush_thread
---
 src/base/Makefile.am| 6 +-
 src/base/daemon.c   | 3 +--
 src/base/osaf_gcov.c| 7 ---
 src/base/osaf_gcov.h| 4 
 src/ntf/ntfimcnd/ntfimcn_main.c | 4 
 5 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/base/Makefile.am b/src/base/Makefile.am index 
54234691c..d0d67bbf0 100644
--- a/src/base/Makefile.am
+++ b/src/base/Makefile.am
@@ -60,7 +60,6 @@ lib_libopensaf_core_la_SOURCES += \
src/base/osaf_timerfd.c \
src/base/osaf_unicode.c \
src/base/osaf_utility.c \
-   src/base/osaf_gcov.c \
src/base/patricia.c \
src/base/process.cc \
src/base/saf_edu.c \
@@ -75,6 +74,11 @@ lib_libopensaf_core_la_SOURCES += \
src/base/unix_server_socket.cc \
src/base/unix_socket.cc
 
+if ENABLE_GCOV
+lib_libopensaf_core_la_SOURCES += \
+   src/base/osaf_gcov.c
+endif
+
 nodist_EXTRA_lib_libopensaf_core_la_SOURCES = dummy.cc
 
 noinst_HEADERS += \
diff --git a/src/base/daemon.c b/src/base/daemon.c index c88cbe710..27170d779 
100644
--- a/src/base/daemon.c
+++ b/src/base/daemon.c
@@ -400,9 +400,8 @@ void daemonize(int argc, char *argv[])
 
create_fifofile(fifo_file);
 
-#ifdef ENABLE_GCOV
+   /* Enable code coverage logging. (if --enable-gcov in configure) */
create_gcov_flush_thread();
-#endif
 
/* Create the process PID file */
if (__create_pidfile(__pidfile) != 0)
diff --git a/src/base/osaf_gcov.c b/src/base/osaf_gcov.c index 
916b49791..e7d6ca4a8 100644
--- a/src/base/osaf_gcov.c
+++ b/src/base/osaf_gcov.c
@@ -26,11 +26,6 @@
 #include 
 #include 
 
-#ifdef HAVE_CONFIG_H
-#include "osaf/config.h"
-#endif
-
-#ifdef ENABLE_GCOV
 // default multicast group for gcov collection  #define DFLT_MULTICAST_GROUP 
"239.0.0.1"
 #define DFLT_MULTICAST_PORT "4712"
@@ -195,5 +190,3 @@ void create_gcov_flush_thread(void) {
 
pthread_attr_destroy();
 }
-
-#endif  // ENABLE_GCOV
diff --git a/src/base/osaf_gcov.h b/src/base/osaf_gcov.h index 
fb9c81732..6dc1b47c1 100644
--- a/src/base/osaf_gcov.h
+++ b/src/base/osaf_gcov.h
@@ -31,6 +31,10 @@ extern "C" {
 
 extern void create_gcov_flush_thread(void);
 
+#else // gcov not enabled
+
+inline void create_gcov_flush_thread(void) {}
+
 #endif
 
 #ifdef __cplusplus
diff --git a/src/ntf/ntfimcnd/ntfimcn_main.c b/src/ntf/ntfimcnd/ntfimcn_main.c 
index 156414aeb..691dfba53 100644
--- a/src/ntf/ntfimcnd/ntfimcn_main.c
+++ b/src/ntf/ntfimcnd/ntfimcn_main.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 
+#include "base/osaf_gcov.h"
 #include "base/os_defs.h"
 #include "base/ncs_osprm.h"
 #include "base/logtrace.h"
@@ -153,6 +154,9 @@ int main(int argc, char **argv)
imcn_exit(EXIT_FAILURE);
}
 
+   // Enable code coverage logging. (if --enable-gcov in configure)
+   create_gcov_flush_thread();
+
/*
 * Initiate polling
 */
--
2.14.2


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 0/1] Review Request for ntf: Add support for code coverage to ntfimcn [#2623]

2017-10-20 Thread Lennart Lund
Summary: ntf: Add support for code coverage to ntfimcn [#2623]
Review request for Ticket(s): 2623
Peer Reviewer(s): hans.nordeb...@ericsson.com, anders.wid...@ericsson.com
  minh.c...@dektech.com.au
Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE ***
Affected branch(es): develop
Development branch: ticket-2623
Base revision: 1c58a2106a55ad212a8e296424b1f20508eeb9cd
Personal repository: git://git.code.sf.net/u/elunlen/review


Impacted area   Impact y/n

 Docsn
 Build systemn
 RPM/packaging   n
 Configuration files n
 Startup scripts n
 SAF servicesn
 OpenSAF servicesy
 Core libraries  n
 Samples n
 Tests   n
 Other   n


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

revision 4e2110446e5fb4d53d23c55080c4f59c1ea62a6f
Author: Lennart Lund 
Date:   Fri, 20 Oct 2017 12:08:55 +0200

ntf: Add support for code coverage to ntfimcn [#2623]

Add gcov handling in ntfimcn, create_gcov_flush_thread
Also refacor handling of configure handling for gcov functionality,
create_gcov_flush_thread



Complete diffstat:
--
 src/base/Makefile.am| 6 +-
 src/base/daemon.c   | 3 +--
 src/base/osaf_gcov.c| 7 ---
 src/base/osaf_gcov.h| 4 
 src/ntf/ntfimcnd/ntfimcn_main.c | 4 
 5 files changed, 14 insertions(+), 10 deletions(-)


Testing Commands:
-
Test coverage can be logged and logs can be dumped in UML
Follow instructions in 00-README.conf


Testing, Expected Results:
--
*** PASTE COMMAND OUTPUTS / TEST RESULTS ***


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


Arch  Built StartedLinux distro
---
mipsn  n
mips64  n  n
x86 n  n
x86_64  n  n
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 ~/.gitconfig file (i.e. user.name, user.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.


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1/1] ntf: Add support for code coverage to ntfimcn [#2623]

2017-10-20 Thread Lennart Lund
Add gcov handling in ntfimcn, create_gcov_flush_thread
Also refacor handling of configure handling for gcov functionality,
create_gcov_flush_thread
---
 src/base/Makefile.am| 6 +-
 src/base/daemon.c   | 3 +--
 src/base/osaf_gcov.c| 7 ---
 src/base/osaf_gcov.h| 4 
 src/ntf/ntfimcnd/ntfimcn_main.c | 4 
 5 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/base/Makefile.am b/src/base/Makefile.am
index 54234691c..d0d67bbf0 100644
--- a/src/base/Makefile.am
+++ b/src/base/Makefile.am
@@ -60,7 +60,6 @@ lib_libopensaf_core_la_SOURCES += \
src/base/osaf_timerfd.c \
src/base/osaf_unicode.c \
src/base/osaf_utility.c \
-   src/base/osaf_gcov.c \
src/base/patricia.c \
src/base/process.cc \
src/base/saf_edu.c \
@@ -75,6 +74,11 @@ lib_libopensaf_core_la_SOURCES += \
src/base/unix_server_socket.cc \
src/base/unix_socket.cc
 
+if ENABLE_GCOV
+lib_libopensaf_core_la_SOURCES += \
+   src/base/osaf_gcov.c
+endif
+
 nodist_EXTRA_lib_libopensaf_core_la_SOURCES = dummy.cc
 
 noinst_HEADERS += \
diff --git a/src/base/daemon.c b/src/base/daemon.c
index c88cbe710..27170d779 100644
--- a/src/base/daemon.c
+++ b/src/base/daemon.c
@@ -400,9 +400,8 @@ void daemonize(int argc, char *argv[])
 
create_fifofile(fifo_file);
 
-#ifdef ENABLE_GCOV
+   /* Enable code coverage logging. (if --enable-gcov in configure) */
create_gcov_flush_thread();
-#endif
 
/* Create the process PID file */
if (__create_pidfile(__pidfile) != 0)
diff --git a/src/base/osaf_gcov.c b/src/base/osaf_gcov.c
index 916b49791..e7d6ca4a8 100644
--- a/src/base/osaf_gcov.c
+++ b/src/base/osaf_gcov.c
@@ -26,11 +26,6 @@
 #include 
 #include 
 
-#ifdef HAVE_CONFIG_H
-#include "osaf/config.h"
-#endif
-
-#ifdef ENABLE_GCOV
 // default multicast group for gcov collection
 #define DFLT_MULTICAST_GROUP "239.0.0.1"
 #define DFLT_MULTICAST_PORT "4712"
@@ -195,5 +190,3 @@ void create_gcov_flush_thread(void) {
 
pthread_attr_destroy();
 }
-
-#endif  // ENABLE_GCOV
diff --git a/src/base/osaf_gcov.h b/src/base/osaf_gcov.h
index fb9c81732..6dc1b47c1 100644
--- a/src/base/osaf_gcov.h
+++ b/src/base/osaf_gcov.h
@@ -31,6 +31,10 @@ extern "C" {
 
 extern void create_gcov_flush_thread(void);
 
+#else // gcov not enabled
+
+inline void create_gcov_flush_thread(void) {}
+
 #endif
 
 #ifdef __cplusplus
diff --git a/src/ntf/ntfimcnd/ntfimcn_main.c b/src/ntf/ntfimcnd/ntfimcn_main.c
index 156414aeb..691dfba53 100644
--- a/src/ntf/ntfimcnd/ntfimcn_main.c
+++ b/src/ntf/ntfimcnd/ntfimcn_main.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 
+#include "base/osaf_gcov.h"
 #include "base/os_defs.h"
 #include "base/ncs_osprm.h"
 #include "base/logtrace.h"
@@ -153,6 +154,9 @@ int main(int argc, char **argv)
imcn_exit(EXIT_FAILURE);
}
 
+   // Enable code coverage logging. (if --enable-gcov in configure)
+   create_gcov_flush_thread();
+
/*
 * Initiate polling
 */
-- 
2.14.2


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] develop branch build is failing

2017-10-20 Thread Ravi Sekhar Reddy Konda
Hi All,

Its building fine after doing make uninstall and then make
I think its problem with old .so 

Thanks,
Ravi
- Original Message -
From: ravisekhar.ko...@oracle.com
To: opensaf-devel@lists.sourceforge.net
Sent: Friday, October 20, 2017 2:03:17 PM GMT +05:30 Chennai, Kolkata, Mumbai, 
New Delhi
Subject: [devel] develop branch build is failing


Hi All,

Make is failing with following error 

  CCLD bin/immadm
/usr/local/lib/opensaf/libimm_common.so.0: undefined reference to 
`_logtrace_trace'
/usr/local/lib/opensaf/libimm_common.so.0: undefined reference to 
`_logtrace_log'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/immadm] Error 1
make[2]: Leaving directory `/root/osaf_latest'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/osaf_latest'
make: *** [all] Error 2



Here is the last changeset, with which I am building 

root@PL-5:~/osaf_latest# git log | more
commit 1c58a2106a55ad212a8e296424b1f20508eeb9cd
Author: Lennart Lund 
Date:   Thu Oct 19 15:17:27 2017 +0200

smf: coredump and syslog flood after immnd crash [#2441]

Thanks,
Ravi

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! 
https://urldefense.proofpoint.com/v2/url?u=http-3A__sdm.link_slashdot=DwICAg=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=rFCQ76TW5HZUgA7b20ApVcXgXru6mvz4fvCm1_H6w1k=tnI13Hf_kVjeMGtW13ygt6HOOWJIGXgx1rzBDJFZki8=cPOLG6fUoDfslyCe8srrTH3HtZVsrGG6pzs7XSYjQAo=
 
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.sourceforge.net_lists_listinfo_opensaf-2Ddevel=DwICAg=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=rFCQ76TW5HZUgA7b20ApVcXgXru6mvz4fvCm1_H6w1k=tnI13Hf_kVjeMGtW13ygt6HOOWJIGXgx1rzBDJFZki8=_l6yoloWh8jwMRPH7dMymfHxwWlg3FshX1yvJOc94n4=
 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] develop branch build is failing

2017-10-20 Thread Ravi Sekhar Reddy Konda

Hi All,

Make is failing with following error 

  CCLD bin/immadm
/usr/local/lib/opensaf/libimm_common.so.0: undefined reference to 
`_logtrace_trace'
/usr/local/lib/opensaf/libimm_common.so.0: undefined reference to 
`_logtrace_log'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/immadm] Error 1
make[2]: Leaving directory `/root/osaf_latest'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/osaf_latest'
make: *** [all] Error 2



Here is the last changeset, with which I am building 

root@PL-5:~/osaf_latest# git log | more
commit 1c58a2106a55ad212a8e296424b1f20508eeb9cd
Author: Lennart Lund 
Date:   Thu Oct 19 15:17:27 2017 +0200

smf: coredump and syslog flood after immnd crash [#2441]

Thanks,
Ravi

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] develop branch build is failing

2017-10-20 Thread Ravi Sekhar Reddy Konda
Hi All,

Make is failing with following error 

commit 1c58a2106a55ad212a8e296424b1f20508eeb9cd
Author: Lennart Lund 
Date:   Thu Oct 19 15:17:27 2017 +0200


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


Re: [devel] [PATCH 1/1] ckptnd: fix crash during checkpoint open timeout with large sections [#1510]

2017-10-20 Thread Vo Minh Hoang
Dear Alex,

I got confuse with this path as following:
>> sync from the active can timeout with errorcode SA_AIS_ERR_TRY_AGAIN
Does that mean out_evt->info.cpnd.error == SA_AIS_ERR_TRY_AGAIN?

Your current cpnd_ckpt_node_del() is added in ckpt_node_free_error.
If above is true, please consider moving ckpt_node_free_error() to
agent_rsp2 part, node_added flag might not need.

Sincerely,
Hoang

-Original Message-
From: Alex Jones [mailto:alex.jo...@genband.com] 
Sent: Tuesday, October 17, 2017 9:20 PM
To: Hoang Vo 
Cc: opensaf-devel@lists.sourceforge.net; Alex Jones 
Subject: [PATCH 1/1] ckptnd: fix crash during checkpoint open timeout with
large sections [#1510]

ckptnd crashes

When opening a collocated checkpoint replica where the active has large
numbers of sections (~200k), the sync from the active can timeout with
errorcode SA_AIS_ERR_TRY_AGAIN. In this case the code deletes the memory for
the node, but does not delete the node from the db. When the checkpoint
access is tried again, the freed memory for the node is still in the db, and
ckptnd crashes.

Delete the node from the db if the node is deleted during the open.
---
 src/ckpt/ckptnd/cpnd_evt.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/src/ckpt/ckptnd/cpnd_evt.c b/src/ckpt/ckptnd/cpnd_evt.c index
2070163..a968f34 100644
--- a/src/ckpt/ckptnd/cpnd_evt.c
+++ b/src/ckpt/ckptnd/cpnd_evt.c
@@ -702,6 +702,7 @@ static uint32_t cpnd_evt_proc_ckpt_open(CPND_CB *cb,
CPND_EVT *evt,
CPSV_EVT send_evt, *out_evt = NULL;
SaConstStringT ckpt_name = NULL;
uint32_t rc = NCSCC_RC_SUCCESS;
+  bool node_added = false;
CPND_CPD_DEFERRED_REQ_NODE *node = NULL;
CPND_CKPT_CLIENT_NODE *cl_node = NULL;
CPND_CKPT_NODE *cp_node = NULL;
@@ -1026,6 +1027,8 @@ static uint32_t cpnd_evt_proc_ckpt_open(CPND_CB *cb,
CPND_EVT *evt,
goto ckpt_shm_node_free_error;
}
 
+node_added = true;
+
if (out_evt->info.cpnd.info.ckpt_info.ckpt_rep_create ==
true &&
cp_node->create_attrib.maxSections == 1) {
 
@@ -1200,6 +1203,13 @@ ckpt_node_free_error:
if (cp_node->ret_tmr.is_active)
cpnd_tmr_stop(_node->ret_tmr);
cpnd_ckpt_sec_map_destroy(_node->replica_info);
+
+  if (node_added) {
+rc = cpnd_ckpt_node_del(cb, cp_node);
+if (rc == NCSCC_RC_FAILURE)
+  LOG_ER("cpnd client tree del failed");  }
+
m_MMGR_FREE_CPND_CKPT_NODE(cp_node);
 
 agent_rsp:
--
2.9.5



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel