[tickets] [opensaf:tickets] #3333 rde: Valgrind reported errors

2023-03-27 Thread PhanTranQuocDat via Opensaf-tickets



---

** [tickets:#] rde: Valgrind reported errors**

**Status:** assigned
**Milestone:** 5.23.07
**Created:** Tue Mar 28, 2023 02:51 AM UTC by PhanTranQuocDat
**Last Updated:** Tue Mar 28, 2023 02:51 AM UTC
**Owner:** PhanTranQuocDat


Valgrind detected memleak when receive rde message:
==196== 177,584 (1,232 direct, 176,352 indirect) bytes in 22 blocks are 
definitely lost in loss record 81 of 81
==196==at 0x483B7F3: malloc (in 
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==196==by 0x48ADCF0: sysf_alloc_pkt (sysf_mem.c:429)
==196==by 0x489CD15: ncs_enc_init_space_pp (hj_ubaid.c:144)
==196==by 0x48CAF38: mdtm_fill_data (mds_dt_common.c:1454)
==196==by 0x48CAF38: mdtm_fill_data (mds_dt_common.c:1442)
==196==by 0x48CC0C0: mdtm_process_recv_message_common (mds_dt_common.c:544)
==196==by 0x48CC5F8: mdtm_process_recv_data (mds_dt_common.c:1126)
==196==by 0x48D71E7: mdtm_process_recv_events (mds_dt_tipc.c:1144)
==196==by 0x4B5A608: start_thread (pthread_create.c:477)
==196==by 0x4C94132: clone (clone.S:95)

Also, uninitialized value(s):
==351== Conditional jump or move depends on uninitialised value(s)
==351==at 0x50541FB: ava_fill_comp_reg_msg (ava_mds.cc:1310)
==351==by 0x50497D0: AmfAgent::ComponentRegister(unsigned long long, 
SaNameT const*, SaNameT const*) (amf_agent.cc:559)
==351==by 0x10E940: rde_amf_init(RDE_AMF_CB*) (rde_amf.cc:186)
==351==by 0x10DAAE: main (rde_main.cc:458)
==351==  Uninitialised value was created by a stack allocation
==351==at 0x10E743: rde_amf_init(RDE_AMF_CB*) (rde_amf.cc:140)


---

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


[tickets] [opensaf:tickets] #3040 Amfnd: reboot if mismatch msg id b/w amfd and amfnd

2023-03-27 Thread Gary Lee via Opensaf-tickets
- **Milestone**: 5.22.06 --> 5.23.03



---

** [tickets:#3040] Amfnd: reboot if mismatch msg id b/w amfd and amfnd**

**Status:** fixed
**Milestone:** 5.23.03
**Created:** Thu May 16, 2019 07:33 AM UTC by Thang Duc Nguyen
**Last Updated:** Sun Jan 29, 2023 09:10 AM UTC
**Owner:** Thang Duc Nguyen


During SC failover, message received on ACTIVE AMFD can not be checked point to 
AMFD on STANDBY SC. But the AMFND still process the message ack for that 
message then it remove from queue. 
STANDBY SC takes ACTIVE and mismatch message id b/w AMFD and AMFND on new 
ACTIVE. As consequence, clm track start can not invoked to update cluster 
member nodes if these node was rebooted.  

Need to reboot recovery if received message  id of amfd mismatch with sent 
message id of amfnd.


---

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


[tickets] [opensaf:tickets] #2798 mds: mdstest 5 1, 5 9, 4 10, 4 12, 10 1, 10 2, 14 5, 14 6 failed

2023-03-27 Thread Gary Lee via Opensaf-tickets
commit db861cc07e61330bf0c1686869b18e33d302f255
Author: hieu.h.hoang 
Date:   Wed Nov 30 08:27:05 2022 +0700

mds: Fix failed test cases in mdstest [#2798]

A number of test cases are failed because it retrieved the event without
polling the select object. Solution is to poll the select object.



---

** [tickets:#2798] mds: mdstest 5 1,5 9, 4 10, 4 12, 10 1, 10 2, 14 5, 14 6 
failed**

**Status:** fixed
**Milestone:** 5.23.03
**Created:** Wed Mar 07, 2018 04:19 AM UTC by Hoa Le
**Last Updated:** Mon Mar 27, 2023 11:31 PM UTC
**Owner:** Hieu Hong Hoang
**Attachments:**

- 
[mdstest_5_1.tar.gz](https://sourceforge.net/p/opensaf/tickets/2798/attachment/mdstest_5_1.tar.gz)
 (8.4 MB; application/gzip)


Opensaf commit 5629f554686a498f328e0c79fc946379cbcf6967

mdstest 5 1

~~~
LOG_NO("\nAction: Retrieve only ONE event\n");
if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl, 500,
  NCSMDS_SCOPE_INTRACHASSIS, 2,
  svcids) != NCSCC_RC_SUCCESS) {
LOG_NO("\nFail\n");
FAIL = 1;
} else {
LOG_NO("\nAction: Retrieve only ONE event\n");
if (mds_service_retrieve(gl_tet_adest.mds_pwe1_hdl, 500,
 SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
LOG_NO("Fail, retrieve ONE\n");
FAIL = 1;
} else
LOG_NO("\nSuccess\n");
~~~


After the subscription request being successful, mdstest would expectedly 
receive two 2 MDS_UP events of services 600 and 700. These info will be 
retrieved in the next step of the test case (mds_service_retrieve).

The problem here is, these MDS_UP events are processed in a separate (parallel) 
thread (mds core thread) from the test case's main thread. In a bad scenario, 
if the mds core thread cannot be processed before the RETRIEVE operations in 
the main thread, the RETRIEVE request with "SA_DISPATCH_ONE" flag will return 
"error", and the test case will fail.

<143>1 2018-03-07T01:10:29.936907+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="155"] << mds_mcm_svc_subscribe*** // MDS SUBSCRIBE request***
...
<142>1 2018-03-07T01:10:29.937631+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="162"] MDS_SND_RCV: info->info.retrieve_msg.i_dispatchFlags == 
SA_DISPATCH_ONE*** // MDS RETRIEVE request with SA DISPATCH ONE flag came 
before MDS UP events being processed***
<139>1 2018-03-07T01:10:29.937729+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="163"] MDS_SND_RCV: msgelem == NULL
<142>1 2018-03-07T01:10:29.937953+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="164"] MDTM: Processing pollin events
<142>1 2018-03-07T01:10:29.938333+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="165"] MDTM: Received SVC event
<143>1 2018-03-07T01:10:29.93838+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="166"] >> mds_mcm_svc_up
<143>1 2018-03-07T01:10:29.938418+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="167"] MCM:API: LOCAL SVC INFO  : svc_id = INTERNAL(500) | PWE id = 
1 | VDEST id = 65535 |
<143>1 2018-03-07T01:10:29.938439+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="168"] MCM:API: REMOTE SVC INFO : svc_id = EXTERNAL(600) | PWE id = 
1 | VDEST id = 65535 | POLICY = 1 | SCOPE = 3 | ROLE = 1 | MY_PCON = 0 |

2018-03-07 01:10:29.941 SC-1 mdstest: NO #012Action: Retrieve only ONE event
2018-03-07 01:10:29.941 SC-1 mdstest: NO #012Request to ncsmds_api: MDS 
RETRIEVE has FAILED
2018-03-07 01:10:29.942 SC-1 mdstest: NO Fail, retrieve ONE

The same issue was observed in mdstest 5 9, 4 10, 4 12, 10 1, 10 2, 14 5, 14 6.



---

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


[tickets] [opensaf:tickets] #2798 mds: mdstest 5 1, 5 9, 4 10, 4 12, 10 1, 10 2, 14 5, 14 6 failed

2023-03-27 Thread Gary Lee via Opensaf-tickets
- **Milestone**: future --> 5.23.03



---

** [tickets:#2798] mds: mdstest 5 1,5 9, 4 10, 4 12, 10 1, 10 2, 14 5, 14 6 
failed**

**Status:** fixed
**Milestone:** 5.23.03
**Created:** Wed Mar 07, 2018 04:19 AM UTC by Hoa Le
**Last Updated:** Mon Dec 19, 2022 01:47 AM UTC
**Owner:** Hieu Hong Hoang
**Attachments:**

- 
[mdstest_5_1.tar.gz](https://sourceforge.net/p/opensaf/tickets/2798/attachment/mdstest_5_1.tar.gz)
 (8.4 MB; application/gzip)


Opensaf commit 5629f554686a498f328e0c79fc946379cbcf6967

mdstest 5 1

~~~
LOG_NO("\nAction: Retrieve only ONE event\n");
if (mds_service_subscribe(gl_tet_adest.mds_pwe1_hdl, 500,
  NCSMDS_SCOPE_INTRACHASSIS, 2,
  svcids) != NCSCC_RC_SUCCESS) {
LOG_NO("\nFail\n");
FAIL = 1;
} else {
LOG_NO("\nAction: Retrieve only ONE event\n");
if (mds_service_retrieve(gl_tet_adest.mds_pwe1_hdl, 500,
 SA_DISPATCH_ONE) != NCSCC_RC_SUCCESS) {
LOG_NO("Fail, retrieve ONE\n");
FAIL = 1;
} else
LOG_NO("\nSuccess\n");
~~~


After the subscription request being successful, mdstest would expectedly 
receive two 2 MDS_UP events of services 600 and 700. These info will be 
retrieved in the next step of the test case (mds_service_retrieve).

The problem here is, these MDS_UP events are processed in a separate (parallel) 
thread (mds core thread) from the test case's main thread. In a bad scenario, 
if the mds core thread cannot be processed before the RETRIEVE operations in 
the main thread, the RETRIEVE request with "SA_DISPATCH_ONE" flag will return 
"error", and the test case will fail.

<143>1 2018-03-07T01:10:29.936907+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="155"] << mds_mcm_svc_subscribe*** // MDS SUBSCRIBE request***
...
<142>1 2018-03-07T01:10:29.937631+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="162"] MDS_SND_RCV: info->info.retrieve_msg.i_dispatchFlags == 
SA_DISPATCH_ONE*** // MDS RETRIEVE request with SA DISPATCH ONE flag came 
before MDS UP events being processed***
<139>1 2018-03-07T01:10:29.937729+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="163"] MDS_SND_RCV: msgelem == NULL
<142>1 2018-03-07T01:10:29.937953+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="164"] MDTM: Processing pollin events
<142>1 2018-03-07T01:10:29.938333+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="165"] MDTM: Received SVC event
<143>1 2018-03-07T01:10:29.93838+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="166"] >> mds_mcm_svc_up
<143>1 2018-03-07T01:10:29.938418+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="167"] MCM:API: LOCAL SVC INFO  : svc_id = INTERNAL(500) | PWE id = 
1 | VDEST id = 65535 |
<143>1 2018-03-07T01:10:29.938439+07:00 SC-1 mdstest 473 mds.log [meta 
sequenceId="168"] MCM:API: REMOTE SVC INFO : svc_id = EXTERNAL(600) | PWE id = 
1 | VDEST id = 65535 | POLICY = 1 | SCOPE = 3 | ROLE = 1 | MY_PCON = 0 |

2018-03-07 01:10:29.941 SC-1 mdstest: NO #012Action: Retrieve only ONE event
2018-03-07 01:10:29.941 SC-1 mdstest: NO #012Request to ncsmds_api: MDS 
RETRIEVE has FAILED
2018-03-07 01:10:29.942 SC-1 mdstest: NO Fail, retrieve ONE

The same issue was observed in mdstest 5 9, 4 10, 4 12, 10 1, 10 2, 14 5, 14 6.



---

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


[tickets] [opensaf:tickets] #3331 Valgrind reports errors

2023-03-27 Thread Gary Lee via Opensaf-tickets
- **status**: assigned --> fixed



---

** [tickets:#3331] Valgrind reports errors **

**Status:** fixed
**Milestone:** 5.23.03
**Created:** Wed Mar 01, 2023 02:20 AM UTC by PhanTranQuocDat
**Last Updated:** Wed Mar 22, 2023 08:35 AM UTC
**Owner:** PhanTranQuocDat


Valgrind detected errors:

==484== 542 (536 direct, 6 indirect) bytes in 1 blocks are definitely lost in 
loss record 312 of 368
==484==at 0x4C3217F: operator new(unsigned long) (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==484==by 0x1636BC: csiattr_create(std::__cxx11::basic_string, std::allocator > const&, SaImmAttrValuesT_2 
const**) (csiattr.cc:78)
==484==by 0x164443: csiattr_create_apply (csiattr.cc:519)
==484==by 0x164443: csiattr_ccb_apply_cb(CcbUtilOperationData*) 
(csiattr.cc:713)
==484==by 0x172155: ccb_apply_cb(unsigned long long, unsigned long long) 
(imm.cc:1265)
==484==by 0x54B0C94: imma_process_callback_info(imma_cb*, 
imma_client_node*, imma_callback_info*, unsigned long long) 

==407== Invalid read of size 1
==407==at 0x5732C3A: mds_svc_op_uninstall (mds_svc_op.c:375)
==407==by 0x57320C7: ncsmds_api (mds_papi.c:147)
==407==by 0x54A31D2: imma_mds_unregister(imma_cb*) (imma_mds.cc:171)
==407==by 0x54A25D4: imma_destroy (imma_init.cc:219)
==407==by 0x54A25D4: imma_shutdown(ncsmds_svc_id) (imma_init.cc:337)
==407==by 0x54AF316: saImmOmFinalize (imma_om_api.cc:940)
==407==by 0x5061961: immutil_saImmOmFinalize (immutil.c:1572)
==407==by 0x141267: hydra_config_get (main.cc:775)
==407==by 0x141267: avnd_cb_create (main.cc:349)

==461== Mismatched free() / delete / delete []
==461==at 0x4C3323B: operator delete(void*) (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==461==by 0x1308D4: comp_init(avnd_comp_tag*, SaImmAttrValuesT_2 const**) 
(compdb.cc:1422)
==461==by 0x131066: avnd_comp_config_reinit(avnd_comp_tag*) (compdb.cc:1759)
==461==by 0x123FD7: avnd_comp_clc_uninst_inst_hdler(avnd_cb_tag*, 
avnd_comp_tag*) (clc.cc:1584)
==461==by 0x124390: avnd_comp_clc_fsm_run(avnd_cb_tag*, avnd_comp_tag*, 
avnd_comp_clc_pres_fsm_ev) (clc.cc:887)
==461==by 0x153FE6: avnd_su_pres_uninst_suinst_hdler(avnd_cb_tag*, 
avnd_su_tag*, avnd_comp_tag*) (susm.cc:2145)
==461==by 0x1567C0: avnd_su_pres_fsm_run(avnd_cb_tag*, avnd_su_tag*, 
avnd_comp_tag*, avnd_su_pres_fsm_ev) (susm.cc:1604)
==461==by 0x15C3AA: avnd_evt_ir_evh(avnd_cb_tag*, avnd_evt_tag*) 
(susm.cc:4236)
==461==by 0x141D25: avnd_evt_process (main.cc:692)
==461==by 0x141D25: avnd_main_process() (main.cc:644)
==461==by 0x1170AD: main (main.cc:225)

==407== Invalid read of size 8
==407==at 0x119942: avnd_evt_tmr_cbk_resp_evh(avnd_cb_tag*, avnd_evt_tag*) 
(cbq.cc:678)
==407==by 0x141D15: avnd_evt_process (main.cc:692)
==407==by 0x141D15: avnd_main_process() (main.cc:644)
==407==by 0x1170AD: main (main.cc:225)
==407==  Address 0x8bb2ad0 is 64 bytes inside a block of size 112 free'd
==407==at 0x4C3323B: operator delete(void*) (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==407==by 0x11962B: avnd_comp_cbq_rec_pop_and_del(avnd_cb_tag*, 
avnd_comp_tag*, unsigned int, bool) (cbq.cc:973)
==407==by 0x119941: avnd_evt_tmr_cbk_resp_evh(avnd_cb_tag*, avnd_evt_tag*) 
(cbq.cc:678)
==407==by 0x141D15: avnd_evt_process (main.cc:692)


==428== 8,072 (56 direct, 8,016 indirect) bytes in 1 blocks are definitely lost 
in loss record 285 of 289
==428==at 0x4C31B0F: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==428==by 0x5914C2B: sysf_alloc_pkt (sysf_mem.c:429)
==428==by 0x5903A1F: ncs_enc_init_space_pp (hj_ubaid.c:144)
==428==by 0x5931996: mdtm_fill_data (mds_dt_common.c:1453)
==428==by 0x5932CC2: mdtm_process_recv_message_common (mds_dt_common.c:544)
==428==by 0x5933061: mdtm_process_recv_data (mds_dt_common.c:1125)
==428==by 0x59351D6: mds_mdtm_process_recvdata (mds_dt_trans.c:1217)
==428==by 0x5936426: mdtm_process_poll_recv_data_tcp (mds_dt_trans.c:903)
==428==by 0x593683E: mdtm_process_recv_events_tcp (mds_dt_trans.c:995)
==428==by 0x61196DA: start_thread (pthread_create.c:463) 


---

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