- **status**: accepted --> assigned
- **assigned_to**: do truong giang --> Vu Minh Nguyen



---

** [tickets:#1396] log: issue with priority of messages adding to mailbox in 
the server**

**Status:** assigned
**Milestone:** 5.0.FC
**Created:** Mon Jun 29, 2015 09:14 AM UTC by Vu Minh Nguyen
**Last Updated:** Sun Nov 01, 2015 09:36 PM UTC
**Owner:** Vu Minh Nguyen


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]
1. saLogInitialize()
2. saLogFinalize()
3. saLogInitialize()
4. saLogFinalize()
--> get error SA_AIS_ERR_BAD_HANDLE

Here is the problem:
====================
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).
- The initialize will create a client
- The agent down will remove all clients for the agent  process including the 
just initialized
- The agent sends a finalize and gets BAD_HANDLE as a reply in the ack from the 
server since the client is already deleted.


---

Sent from sourceforge.net because [email protected] 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.
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to