If there are several initialize and finalize done in a row in the same process, there is possibility getting SA_AIS_ERR_BAD_HANDLE.
[Test sequence]
The finalize request will delete the requested client and the agent will wait for the answer (ack). If the last client initialized by this process is finalized the agent will free the resources used by the agent which means that the mds also is finalized which results in an agent down event on the server side.
The agent down message to the event handler is placed in the mailbox queue with the lowest priority.
In this test sequence the next thing that happens is that the agent is started again and a new initiate request is sent. When this request is received on the server the initialize message to the event handler is placed in the queue with the highest priority.
What happen in this case is that the event handler has not yet fetched the agent down message when the initiate message is queued which means that the order of handling the messages will be initialize (highest priority) and then agent down (lowest priority).
Just FYI, note that there was a similair issue fixed in event service long back.
Changeset
summary: edsv: saEvtInitialize has same priority as saEvtFinalize (#2000)
mnaickan@ubuntu:~/staging$ hg diff -c 2683 | more
diff --git a/osaf/libs/agents/saf/eda/eda_mds.c b/osaf/libs/agents/saf/eda/eda_mds.c
--- a/osaf/libs/agents/saf/eda/eda_mds.c
+++ b/osaf/libs/agents/saf/eda/eda_mds.c
@@ -1608,7 +1608,8 @@ uint32_t eda_mds_msg_sync_send(EDA_CB *c
mds_info.info.svc_send.i_priority = MDS_SEND_PRIORITY_MEDIUM;
else
mds_info.info.svc_send.i_priority = MDS_SEND_PRIORITY_HIGH;
Mathi.
----- winhvu@users.sf.net wrote:
Related
Tickets:
#1396changeset: 7843:a474d9b4ad86
tag: tip
user: Canh Van Truong canh.v.truong@dektech.com.au
date: Mon Aug 08 16:39:05 2016 +0700
summary: log: fix issue with priority of messages adding to mailbox in the server [#1396]
Related
Tickets:
#1396