- Description has changed:
Diff:
~~~~
--- old
+++ new
@@ -1,6 +1,14 @@
In NtfAdmin::checkNotificationList(), when deleteConfirmedNotification()
deletes the last item, the NotificationMap is reduced, posNot++ will be out of
range of NotificationMap, not equal NotificationMap.end()
Got ntfd coredump while switch over
+steps to reproduce
+- Run loop of ntftest 32
+root@SC-1:~# for i in {1..10}; do ntftest 32; done
+- On another terminal, keep swapping 2N Opensaf SI, got coredump after couples
of swaps
+root@SC-1:~# amf-adm si-swap safSi=SC-2N,safApp=OpenSAF
+...
+root@SC-1:~# amf-adm si-swap safSi=SC-2N,safApp=OpenSAF
+
ntfd coredump bt
~~~~
---
** [tickets:#2223] NTFD: Increment iterator out of range NotificationMap**
**Status:** review
**Milestone:** 5.0.2
**Created:** Mon Dec 12, 2016 12:37 AM UTC by Minh Hon Chau
**Last Updated:** Tue Dec 13, 2016 12:32 AM UTC
**Owner:** Minh Hon Chau
In NtfAdmin::checkNotificationList(), when deleteConfirmedNotification()
deletes the last item, the NotificationMap is reduced, posNot++ will be out of
range of NotificationMap, not equal NotificationMap.end()
Got ntfd coredump while switch over
steps to reproduce
- Run loop of ntftest 32
root@SC-1:~# for i in {1..10}; do ntftest 32; done
- On another terminal, keep swapping 2N Opensaf SI, got coredump after couples
of swaps
root@SC-1:~# amf-adm si-swap safSi=SC-2N,safApp=OpenSAF
...
root@SC-1:~# amf-adm si-swap safSi=SC-2N,safApp=OpenSAF
ntfd coredump bt
~~~
(gdb) bt full
#0 NtfNotification::getNextSubscription (this=0x978930, subId=...) at
NtfNotification.cc:165
No locals.
#1 0x000000000041658d in NtfAdmin::checkNotificationList (this=0x974240) at
NtfAdmin.cc:661
uSubId = {clientId = 1277, subscriptionId = 1}
notification = {<std::tr1::__shared_ptr<NtfNotification,
(__gnu_cxx::_Lock_policy)2>> = {
_M_ptr = 0x978930, _M_refcount = {_M_pi = 0x978a40}}, <No data
fields>}
__FUNCTION__ = "checkNotificationList"
posNot = {_M_node = 0x978770}
#2 0x000000000040407e in amf_csi_set_callback (invocation=4290772996,
compName=<optimized out>,
new_haState=<optimized out>, csiDescriptor=...) at ntfs_amf.c:255
error = <optimized out>
prev_haState = SA_AMF_HA_STANDBY
role_change = <optimized out>
rc = <optimized out>
__FUNCTION__ = "amf_csi_set_callback"
#3 0x00007ff32687e48e in ava_hdl_cbk_rec_prc (info=0x7ff32000b880,
reg_cbk=reg_cbk@entry=0x7ffc7437fd00) at ava_hdl.cc:655
csi_set = 0x7ff32000b898
actv_or_stdby = <optimized out>
rc = 1
i = <optimized out>
__FUNCTION__ = "ava_hdl_cbk_rec_prc"
#4 0x00007ff32687f749 in ava_hdl_cbk_dispatch_all (hdl_rec=0x7ffc7437fda8,
cb=0x7ffc7437fda0)
at ava_hdl.cc:446
list_resp = 0x962698
reg_cbk = {saAmfHealthcheckCallback = 0x403ee0
<amf_health_chk_callback>,
saAmfComponentTerminateCallback = 0x403f00
<amf_comp_terminate_callback>,
saAmfCSISetCallback = 0x403fd0 <amf_csi_set_callback>,
saAmfCSIRemoveCallback = 0x403e70 <amf_csi_rmv_callback>,
---Type <return> to continue, or q <return> to quit---
saAmfProtectionGroupTrackCallback = 0x0,
saAmfProtectionGroupTrackCallback_4 = 0x0,
saAmfProxiedComponentInstantiateCallback = 0x0,
saAmfProxiedComponentCleanupCallback = 0x0,
saAmfContainedComponentInstantiateCallback = 0x0,
saAmfContainedComponentCleanupCallback = 0x0,
osafCsiAttributeChangeCallback = 0x0}
rec = 0x7ff32000c2a0
hdl = 4288675841
rc = 1
#5 ava_hdl_cbk_dispatch (cb=0x7ffc7437fda0, hdl_rec=0x7ffc7437fda8,
flags=<optimized out>)
at ava_hdl.cc:320
rc = 1
__FUNCTION__ = "ava_hdl_cbk_dispatch"
#6 0x00007ff3268783ea in AmfAgent::Dispatch (hdl=4288675841,
flags=flags@entry=SA_DISPATCH_ALL)
at amf_agent.cc:283
hdl_rec = 0x962610
pend_dis = 0
__FUNCTION__ = "Dispatch"
cb = 0x961b20
rc = SA_AIS_OK
pend_fin = 0
#7 0x00007ff326878465 in saAmfDispatch (hdl=<optimized out>,
flags=flags@entry=SA_DISPATCH_ALL)
at amf_agent.cc:244
No locals.
#8 0x00000000004037e4 in main (argc=<optimized out>, argv=<optimized out>) at
ntfs_main.c:357
mbx_fd = <optimized out>
error = <optimized out>
rc = <optimized out>
fds = {{fd = 20, events = 1, revents = 0}, {fd = 16, events = 1,
revents = 1}, {fd = 22,
events = 1, revents = 1}, {fd = 14, events = 1, revents = 0}, {fd =
24, events = 1,
---Type <return> to continue, or q <return> to quit---
revents = 0}, {fd = 18, events = 1, revents = 0}}
term_fd = 20
__FUNCTION__ = "main"
(gdb)
~~~
ntfd trace:
~~~
Dec 9 22:39:28.984523 osafntfd [453:ntfs_amf.c:0175] >> amf_csi_set_callback
Dec 9 22:39:28.984527 osafntfd [453:ntfs_main.c:0271] >>
initialize_for_assignment: ha_state = 1
Dec 9 22:39:28.984531 osafntfd [453:ntfs_main.c:0292] <<
initialize_for_assignment: rc = 1
Dec 9 22:39:28.984535 osafntfd [453:ntfs_amf.c:0043] >>
amf_active_state_handler: HA ACTIVE request
Dec 9 22:39:28.984539 osafntfd [453:ntfs_amf.c:0047] <<
amf_active_state_handler
Dec 9 22:39:28.984556 osafntfd [453:ntfs_mbcsv.c:0180] >>
ntfs_mbcsv_change_HA_state
Dec 9 22:39:28.984560 osafntfd [453:mbcsv_api.c:0662] >>
mbcsv_process_chg_role_request: Change HA role for the checkpoint
Dec 9 22:39:28.984564 osafntfd [453:mbcsv_api.c:0685] TR svc_id:44,
pwe_hdl:65550
Dec 9 22:39:28.984568 osafntfd [453:mbcsv_api.c:0743] <<
mbcsv_process_chg_role_request: retval: 1
Dec 9 22:39:28.984571 osafntfd [453:ntfs_mbcsv.c:0194] <<
ntfs_mbcsv_change_HA_state
Dec 9 22:39:28.984575 osafntfd [453:ntfs_amf.c:0248] TR amf_csi_set_callback
NTFS changing HA role from SA_AMF_HA_STANDBY to SA_AMF_HA_ACTIVE
Dec 9 22:39:28.984578 osafntfd [453:amf_agent.cc:1987] >> Response:
SaAmfHandleT passed is ffa00001
Dec 9 22:39:28.984582 osafntfd [453:ava_hdl.cc:0890] >> ava_hdl_pend_resp_get
Dec 9 22:39:28.984585 osafntfd [453:ava_hdl.cc:0906] << ava_hdl_pend_resp_get
Dec 9 22:39:28.984589 osafntfd [453:ava_mds.cc:0342] >> ava_mds_send
Dec 9 22:39:28.984601 osafntfd [453:ava_mds.cc:0928] >> ava_mds_msg_async_send
Dec 9 22:39:28.984606 osafntfd [453:ava_mds.cc:0181] >> ava_mds_cbk
Dec 9 22:39:28.984613 osafntfd [453:ava_mds.cc:0496] >> ava_mds_flat_enc
Dec 9 22:39:28.984616 osafntfd [453:ava_mds.cc:0645] << ava_mds_flat_enc:
retval = 1
Dec 9 22:39:28.984620 osafntfd [453:ava_mds.cc:0244] TR MDS flat encode
callback success
Dec 9 22:39:28.984623 osafntfd [453:ava_mds.cc:0319] << ava_mds_cbk
Dec 9 22:39:28.984631 osafntfd [453:ava_mds.cc:0953] <<
ava_mds_msg_async_send: retval = 1
Dec 9 22:39:28.984634 osafntfd [453:ava_mds.cc:0370] TR AVA MDS send success
Dec 9 22:39:28.984638 osafntfd [453:ava_mds.cc:0372] << ava_mds_send
Dec 9 22:39:28.984657 osafntfd [453:amf_agent.cc:2078] TR Callback resonse
completed
Dec 9 22:39:28.984662 osafntfd [453:amf_agent.cc:2096] << Response: rc:1
Dec 9 22:39:28.984667 osafntfd [453:NtfAdmin.cc:0646] >> checkNotificationList
Dec 9 22:39:28.984671 osafntfd [453:NtfNotification.cc:0184] >> loggedOk
Dec 9 22:39:28.984675 osafntfd [453:NtfNotification.cc:0187] TR Not alarm and
Not recurity alarm
Dec 9 22:39:28.984679 osafntfd [453:NtfAdmin.cc:0658] T2 list not empty check
subscriptions for 1503
Dec 9 22:39:28.984684 osafntfd [453:NtfClient.cc:0279] >>
sendNotConfirmedNotification
Dec 9 22:39:28.985111 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.985130 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.985138 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.985145 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.984688 osafntfd [453:NtfSubscription.cc:0211] >>
sendNotification
Dec 9 22:39:28.985484 osafntfd [453:NtfSubscription.cc:0222] T3
send_notification_lib called, client 1277, notification 1503
Dec 9 22:39:28.985490 osafntfd [453:ntfs_com.c:0284] >> send_notification_lib
Dec 9 22:39:28.985495 osafntfd [453:ntfsv_mem.c:0769] >> ntfsv_get_ntf_header
Dec 9 22:39:28.985499 osafntfd [453:ntfsv_mem.c:0790] << ntfsv_get_ntf_header
Dec 9 22:39:28.985502 osafntfd [453:ntfs_com.c:0286] T3 client id: 1277,
not_id: 1503
Dec 9 22:39:28.985510 osafntfd [453:ntfsv_enc_dec.c:0471] >> ntfsv_enc_not_msg
Dec 9 22:39:28.985515 osafntfd [453:ntfsv_enc_dec.c:0642] TR enc
SA_NTF_TYPE_STATE_CHANGE
Dec 9 22:39:28.985520 osafntfd [453:ntfsv_enc_dec.c:0432] T2 ENC: Not ptr
0x977c90: 1503
Dec 9 22:39:28.985524 osafntfd [453:ntfsv_enc_dec.c:0444] T2 enc :
param->numAdditionalInfo 0
Dec 9 22:39:28.985529 osafntfd [453:ntfsv_enc_dec.c:0649] TR enc numStCh: 0
Dec 9 22:39:28.985533 osafntfd [453:ntfsv_enc_dec.c:0742] << ntfsv_enc_not_msg
Dec 9 22:39:28.985537 osafntfd [453:ntfs_mds.c:0654] T8 enc NTFSV_NTFS_CBK_MSG
Dec 9 22:39:28.985551 osafntfd [453:NtfNotification.cc:0142] T1 Removing
subscription 1 client 1277 from notification 1503, subscriptionList size is 0
Dec 9 22:39:28.985704 osafntfd [453:ntfs_com.c:0503] >> sendNotConfirmUpdate:
client: 1277, subId: 1, notId: 1503
Dec 9 22:39:28.985711 osafntfd [453:ntfs_mbcsv.c:1343] >>
ntfs_send_async_update
Dec 9 22:39:28.985715 osafntfd [453:mbcsv_api.c:0773] >>
mbcsv_process_snd_ckpt_request: Sending checkpoint data to all STANDBY peers,
as per the send-type specified
Dec 9 22:39:28.985720 osafntfd [453:mbcsv_api.c:0803] TR svc_id:44,
pwe_hdl:65550
Dec 9 22:39:28.985724 osafntfd [453:mbcsv_util.c:0343] >>
mbcsv_send_ckpt_data_to_all_peers
Dec 9 22:39:28.985728 osafntfd [453:mbcsv_util.c:0387] TR dispatching FSM for
NCSMBCSV_SEND_ASYNC_UPDATE
Dec 9 22:39:28.985732 osafntfd [453:mbcsv_act.c:0079] TR Illegal dispatch
event. role:2, svc_id: 44, pwe_hdl:65550
Dec 9 22:39:28.985736 osafntfd [453:mbcsv_util.c:0492] <<
mbcsv_send_ckpt_data_to_all_peers
Dec 9 22:39:28.985740 osafntfd [453:mbcsv_api.c:0868] <<
mbcsv_process_snd_ckpt_request: retval: 1
Dec 9 22:39:28.985744 osafntfd [453:ntfs_mbcsv.c:1365] <<
ntfs_send_async_update
Dec 9 22:39:28.985748 osafntfd [453:ntfs_com.c:0513] << sendNotConfirmUpdate
Dec 9 22:39:28.985751 osafntfd [453:ntfs_com.c:0312] << send_notification_lib
Dec 9 22:39:28.985755 osafntfd [453:NtfSubscription.cc:0273] <<
sendNotification
Dec 9 22:39:28.985758 osafntfd [453:NtfClient.cc:0290] <<
sendNotConfirmedNotification
Dec 9 22:39:28.985997 osafntfd [453:NtfAdmin.cc:0629] >>
deleteConfirmedNotification
Dec 9 22:39:28.986004 osafntfd [453:NtfNotification.cc:0184] >> loggedOk
Dec 9 22:39:28.986008 osafntfd [453:NtfNotification.cc:0187] TR Not alarm and
Not recurity alarm
Dec 9 22:39:28.986013 osafntfd [453:NtfAdmin.cc:0636] T2 Notification 1503
removed, notificationMap size is 0
Dec 9 22:39:28.986017 osafntfd [453:NtfAdmin.cc:0638] <<
deleteConfirmedNotification
Dec 9 22:39:28.986364 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.987485 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.987497 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.987504 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.987515 osafntfd [453:clma_mds.c:0947] T2 CLMA Rcvd MDS
subscribe evt from svc 34
Dec 9 22:39:28.987520 osafntfd [453:clma_mds.c:0978] T2 MSG from CLMS
NCSMDS_NEW_ACTIVE/UP
Dec 9 22:39:28.987525 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.987532 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.987538 osafntfd [453:mds_dt_trans.c:0608] >>
mdtm_process_poll_recv_data_tcp
Dec 9 22:39:28.987547 osafntfd [453:NtfNotification.cc:0058] T3 Notification
1503 with type 3000 destroyed.
destructor this = 0x978850
Dec 9 22:39:28.987552 osafntfd [453:ntfsv_mem.c:0653] >>
ntfsv_dealloc_notification: ntfsv_send_not_req_t ptr = 0x978780
notificationType = 0x3000
Dec 9 22:39:28.987558 osafntfd [453:ntfsv_mem.c:0673] T1 free v_data.p_base
(nil)
Dec 9 22:39:28.987562 osafntfd [453:ntfsv_mem.c:0677] <<
ntfsv_dealloc_notification
Dec 9 22:39:28.987587 osafntfd [453:NtfNotification.cc:0184] >> loggedOk
Dec 9 22:39:28.987757 osafntfd [453:NtfNotification.cc:0187] TR Not alarm and
Not recurity alarm
Dec 9 22:39:28.987784 osafntfd [453:NtfAdmin.cc:0658] T2 list not empty check
subscriptions for 0
Dec 9 22:39:32.491768 osafntfd [449:ntfs_main.c:0181] >> initialize
Dec 9 22:39:32.491790 osafntfd [449:ncs_main_pub.c:0220] TR
NCS:PROCESS_ID=449
~~~
---
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.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets