On Tue, 2009-06-02 at 14:02 -0500, Ryan O'Hara wrote:
> On Tue, Jun 02, 2009 at 05:34:02PM +0200, Jan Friesse wrote:
> > Included are lck service patches. Many of them solves really big
> > problems (writing to uninitialized memory, testing some variable to
> > NULL *BEFORE* it is used as a structure, ...)
> > 
> > Ryan,
> > it looks there is some huge problem with calling this sequention:
> > [DEBUG]: saLckInitialize
> > [DEBUG]: saLckResourceOpen
> > [DEBUG]: saLckResourceLock
> > [DEBUG]: saLckResourceLockAsync
> > 
> > And lockAsync will never end. I didn't have time to figure our more
> > deeply where is problem, so maybe you know, why it happend.
> 
> Here is what I discovered.
> 
> I wrote a small test program that does this:
> 
> saLckInitialize
> saLckResourceOpen
> saLckResourceLock
> saLckResourceLockAsync
> saLckResourceClose
> 
> Both Lock and LockAsync request PR locks, so they will both be
> granted. I don't see the LockGrantCallback. But if I put a sleep
> before the Close operation, I will get the callback. That is all I
> know right now.
> 
> Steve, you have any thoughts on this behavior?
> 
> 

Maybe close triggers an ipc disconnect or lock stripping and causes the
grant callback not to happen.

I don't believe there is a guarantee in the spec that a grant will
happen when a resource is closed.  The sleep just gives time for the
grant to happen before being stripped or ipc_exit_fn'ed...

Regards
-steve


> 
> > Jan Friesse (7):
> >   Remove some warnings
> >   Sizeof should be structure and not pointer
> >   Test lockMode values
> >   Test resourceFlags in saResourceOpen(Async)
> >   Test validity of handle in *resourceLock(Async)
> >   Remove some compiler warnings.
> >   In saLckOptionCheck, test lckOptions to NULL
> > 
> >  trunk/include/ipc_lck.h |    2 +-
> >  trunk/lib/lck.c         |   24 +++++++++++++++
> >  trunk/services/lck.c    |   75 
> > ++++++++++++++++++++++++++++++----------------
> >  3 files changed, 74 insertions(+), 27 deletions(-)
> > 
> > _______________________________________________
> > Openais mailing list
> > [email protected]
> > https://lists.linux-foundation.org/mailman/listinfo/openais
> _______________________________________________
> Openais mailing list
> [email protected]
> https://lists.linux-foundation.org/mailman/listinfo/openais

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to