- **status**: accepted --> review
---
** [tickets:#1932] Amf: Standby Amfd crashes during node group modification**
**Status:** review
**Milestone:** 4.7.2
**Created:** Thu Aug 04, 2016 10:00 AM UTC by Nagendra Kumar
**Last Updated:** Thu Aug 04, 2016 10:00 AM UTC
**Owner:** Nagendra Kumar
Steps to reproduce
------------------
1. Start single controller and run the following command:
immcfg -c "SaClmNode" -a saClmNodeLockCallbackTimeout=50000000000
safNode=PL-5,safCluster=myClmCluster
immcfg -c "SaAmfNode" -a saAmfNodeSuFailoverMax=2 -a
saAmfNodeSuFailOverProb=1200000000000 -a
saAmfNodeClmNode=safNode=PL-5,safCluster=myClmCluster
safAmfNode=PL-5,safAmfCluster=myAmfCluster
immcfg -c "SaClmNode" -a saClmNodeLockCallbackTimeout=50000000000
safNode=PL-6,safCluster=myClmCluster
immcfg -c "SaAmfNode" -a saAmfNodeSuFailoverMax=2 -a
saAmfNodeSuFailOverProb=1200000000000 -a
saAmfNodeClmNode=safNode=PL-6,safCluster=myClmCluster
safAmfNode=PL-6,safAmfCluster=myAmfCluster
2. On Standby controller, add the following lines of code:
diff --git a/osaf/services/saf/amf/amfd/role.cc
b/osaf/services/saf/amf/amfd/role.cc
--- a/osaf/services/saf/amf/amfd/role.cc
+++ b/osaf/services/saf/amf/amfd/role.cc
@@ -304,6 +304,9 @@ uint32_t avd_standby_role_initialization
}
cb->init_state = AVD_CFG_DONE;
+ LOG_ER("1. Waiting ..........................");
+ sleep(7);
+ LOG_ER("2. Waiting ..........................");
if (avd_imm_applier_set() != SA_AIS_OK) {
LOG_ER("avd_imm_applier_set FAILED");
3. Start Standby controller.
4. When first error log comes, run the following command:
immcfg -c "SaAmfNodeGroup" -a
saAmfNGNodeList=safAmfNode=PL-5,safAmfCluster=myAmfCluster
safAmfNodeGroup=nagu,safAmfCluster=myAmfCluster
After second error log comes, the run the following command:
immcfg -m -a saAmfNGNodeList+=safAmfNode=PL-6,safAmfCluster=myAmfCluster
safAmfNodeGroup=nagu,safAmfCluster=myAmfCluster
Observed behaviour
------------------
Standby Amfd crashes at
1 0x0000000000444199 in ng_ccb_apply_cb(CcbUtilOperationData*) () at
/usr/include/c++/4.9.0/bits/stl_set.h:511
2 0x0000000000433947 in ccb_apply_cb(unsigned long long, unsigned long long)
() at imm.cc:1202
3 0x00007fcd0ed887f9 in imma_process_callback_info () from
/usr/local/lib/libSaImmOi.so.0
ng is NULL in ng_ccb_apply_modify_hdlr() and Amfd crashes.
The reason is when Stdby Amfd reads configuration, and sleeps, Act Amfd adds a
node group.
After it comes after sleep, then a node gets added to the node group. Since Act
Amfd have node gruop name, so it adds it. Standby Amfd doesn't have node group,
so it crashes because of NULL pointer access.
Expected behaviour
------------------
Standby Amfd should not crash and it should recover the node group, which was
missed inbetween
config read and being applier.
Error messages
------------------
Aug 4 14:48:54 PM_SC-2 osafamfd[8814]: ER 1. Waiting ..........................
Aug 4 14:48:55 PM_SC-2 osafimmnd[8774]: NO Ccb 6 COMMITTED
(immcfg_PM_SC-1_10353)
Aug 4 14:49:01 PM_SC-2 osafamfd[8814]: ER 2. Waiting ..........................
Aug 4 14:49:01 PM_SC-2 osafimmnd[8774]: NO Implementer (applier) connected: 13
(@safAmfService2020f) <126, 2020f>
Aug 4 14:49:02 PM_SC-2 osafimmnd[8774]: NO Ccb 7 COMMITTED
(immcfg_PM_SC-1_10361)
Aug 4 14:49:02 PM_SC-2 osafamfnd[8824]: WA AMF director unexpectedly crashed
Aug 4 14:49:02 PM_SC-2 osafamfnd[8824]: Rebooting OpenSAF NodeId = 131599 EE
Name = , Reason: local AVD down(Adest) or both AVD down(Vdest) received,
OwnNodeId = 131599, SupervisionTime = 60
---
Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets