Let me clarify my previous statement. I believe it has nothing to do
with Close, but rather the process exiting before the
LockGrantCallback is processed by the dispatch thread. At least that
is how it works in my test code. I have a thread that calls
saLckDispatch. If a lock is requested (and granted) and the process
exits immediately, the dispatch thread won't handle the callback.

Make sense?

On Tue, Jun 02, 2009 at 02:02:55PM -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?
> 
> 
> 
> > 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