In MDS API test case 14 1, mdstest requests three MDS_DIRECT_SEND operations to NCSMDS_SVC_ID_EXTERNAL_MIN service to verify MDS_SENDTYPE_SND, MDS_SENDTYPE_SNDACK and MDS_SENDTYPE_SNDRSP in this order.
After verifying MDS_DIRECT_SEND operation with MDS_SENDTYPE_SNDACK send_type, mdstest starts a sub thread to respond to MDS_DIRECT_SEND operation with MDS_SENDTYPE_SNDRSP send_type.
Expectedly, this sub thread polls the selection object of NCSMDS_SVC_ID_EXTERNAL_MIN service for MDS_SENDTYPE_SNDRSP event. But in an undesirable scenario, if the event, which was caused by MDS_SENDTYPE_SNDACK, is late delivered, it may be accidentally caught by poll() on the sub thread (since MDS_SENDTYPE_SNDACK and MDS_SENDTYPE_SNDRSP send messages to the same destination). This will leads to the situation where the entire logic code of the sub thread is executed without waiting for the MDS_SENDTYPE_SNDRSP event to appear.
MDS_DIRECT_SEND operation with MDS_SENDTYPE_SNDRSP send_type is requested by mdstest afterward with timeout being set to 0. This causes the test case to hang forever.
2018-04-04 21:18:31.018 SC-1 mdstest: NO #012Direct send with ack 2018-04-04 21:18:31.057 SC-1 mdstest: NO #012Request to ncsmds_api: MDS DIRECT SEND is SUCCESSFULL **// MDS_SENDTYPE_SNDACK** 2018-04-04 21:18:31.058 SC-1 mdstest: NO #012Success 2018-04-04 21:18:31.058 SC-1 mdstest: NO #012Direct send with rsp 2018-04-04 21:18:31.061 SC-1 mdstest: NO #012Inside Receiver Thread **// The sub thread is started** 2018-04-04 21:18:31.064 SC-1 mdstest: NO #012Service 512 received events **// One event has been received before MDS_SENDTYPE_SNDRSP being called** 2018-04-04 21:18:31.065 SC-1 mdstest: NO #012Task has been Created 2018-04-04 21:18:31.082 SC-1 mdstest: NO #012#011#011Direct Receive callback 2018-04-04 21:18:31.083 SC-1 mdstest: NO The Sender service is = 512 is on <2010f000001d2> destination with anchor = <2010f000001d2> on Node = 2010f with msg fmt ver=0 2018-04-04 21:18:31.084 SC-1 mdstest: NO #012The Receiver service is = 512 is on <2010f000001d2> destination 2018-04-04 21:18:31.085 SC-1 mdstest: NO #012#012#011Received Message len = 15 and the message is=Direct Message 2018-04-04 21:18:31.095 SC-1 mdstest: NO #012#011#011Direct Receive callback 2018-04-04 21:18:31.096 SC-1 mdstest: NO The Sender service is = 512 is on <2010f000001d2> destination with anchor = <2010f000001d2> on Node = 2010f with msg fmt ver=0 2018-04-04 21:18:31.097 SC-1 mdstest: NO #012The Receiver service is = 512 is on <2010f000001d2> destination 2018-04-04 21:18:31.097 SC-1 mdstest: NO #012#012#011Received Message len = 15 and the message is=Direct Message 2018-04-04 21:18:31.099 SC-1 mdstest: NO #012 MDS RETRIEVE is SUCCESSFULL 2018-04-04 21:18:31.100 SC-1 mdstest: NO #012rsp_reqd = 0 2018-04-04 21:18:31.106 SC-1 mdstest: NO #012Receiver Thread End !!! **// The sub thread returns without waiting for MDSSENDTYPESNDRSP request.**
<143>1 2018-04-04T21:18:31.10865+07:00 SC-1 mdstest 466 mds.log [meta sequenceId="596"] >> mcm_pvt_normal_snd_process_common **// MDS_SENDTYPE_SNDRSP is called afterward.** ... <142>1 2018-04-04T21:18:31.118058+07:00 SC-1 mdstest 466 mds.log [meta sequenceId="612"] MDS_SND_RCV: Msg Destination is on same process ... <142>1 2018-04-04T21:18:31.123697+07:00 SC-1 mdstest 466 mds.log [meta sequenceId="628"] MDS_SND_RCV: Posting into mailbox <143>1 2018-04-04T21:18:31.124259+07:00 SC-1 mdstest 466 mds.log [meta sequenceId="629"] << mcm_pvt_normal_snd_process_common
Similar things also appear in 14 2, 14 3, 14 4 test cases.
https://sourceforge.net/p/opensaf/mailman/message/36289056/
Release branch:
commit ddc727f9184508ff03929dd6c3f7971c8215959c
Author: Hoa Le hoa.le@dektech.com.au
Date: Mon Apr 9 18:35:15 2018 +0700
Develop branch:
commit 51ab0aabd3e8d5fb6429fc0f51cccc7f2178d91b
Author: Hoa Le hoa.le@dektech.com.au
Date: Mon Apr 9 18:35:15 2018 +0700
Related
Tickets:
#2831