Bug 508236 - SAF Test lck: saLckDispatch/2-3.c doesn't pass
Summary: SAF Test lck: saLckDispatch/2-3.c doesn't pass
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: openais
Version: 14
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Ryan O'Hara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 561192
TreeView+ depends on / blocked
 
Reported: 2009-06-26 09:52 UTC by Jan Friesse
Modified: 2011-10-03 15:34 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
: 561192 (view as bug list)
Environment:
Last Closed: 2011-10-03 15:34:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Move list_init calls in saLckResourceOpenAsync (1.41 KB, application/octet-stream)
2009-06-26 17:14 UTC, Ryan O'Hara
no flags Details

Description Jan Friesse 2009-06-26 09:52:00 UTC
Description of problem:
SSIA

Version-Release number of selected component (if applicable):


How reproducible:
Run test

Steps to Reproduce:
1.
2.
3.

Actual results:
select error!

Expected results:
Test will run ok

Additional info:

Comment 1 Ryan O'Hara 2009-06-26 15:17:04 UTC
This test causes a segfault when I run it.

Comment 2 Ryan O'Hara 2009-06-26 16:48:33 UTC
First, it appears the the segfault was caused by not doing a list_init before sending the request to the executive. Since saLckDispatch is run in its own thread with SA_DISPATCH_BLOCKING flag, it is possible that the callback will processed (the dispatch thread will be scheduled) before we do the list_init. This test case calls saLckResourceClose in the resource open callback, which caused problems for finalize. I have a patch to fix that I will post.

Second, what is the point of the select call in this test case? Do we expect something it be present on selObject when we call select? I would think the answer is not, since we have a thread handling callbacks on this file descriptor. I think this test case is wrong. The dispatch thread is being scheduled before the code hits the select call, which is perfectly valid. We can't assume there will be any pending callbacks by they time we hit select.

Comment 3 Ryan O'Hara 2009-06-26 17:14:05 UTC
Created attachment 349584 [details]
Move list_init calls in saLckResourceOpenAsync

This patch moves the list_init calls in saLckResourceOpen and
saLckResourceOpenAsync such that they occur before we send the request
to the executive. This fix is really only required for the async call,
but for consistency I changed the sync call as well.

The reason for this fix is that is is possible that the callback
generated by the saLckResourceOpenAsync call could occur before we
list_init the lists in the lckResourceInstance. There is an test in
saftest (saLckDispatch/2-3.c) that calls saLckResourceClose in the
open callback, and this requires that the lists be initialized to
avoid a segfault.

Comment 4 Steven Dake 2009-09-28 15:45:13 UTC
Ryan,

Is this bugzilla fixed now by your patch?  If so, close as CURRENTRELEASE.

Regards
-steve

Comment 5 Bug Zapper 2009-11-16 10:27:51 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Steven Dake 2010-02-03 00:03:59 UTC
Honza,

Please retest.  Ensure that you install the openais distributed header files in the saftest suite rather then the saftest header files.

Comment 7 Jan Friesse 2010-02-09 13:11:57 UTC
(In reply to comment #6)
> Honza,
> 
> Please retest.  Ensure that you install the openais distributed header files in
> the saftest suite rather then the saftest header files.    

(In reply to comment #6)
> Honza,
> 
> Please retest.  Ensure that you install the openais distributed header files in
> the saftest suite rather then the saftest header files.    

Reported problem (select error!) is still there even with openais distributed header files.

Comment 8 Bug Zapper 2010-07-30 10:41:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 9 Ryan O'Hara 2011-10-03 15:34:33 UTC
Closing WONTFIX since openais will be going away in F17.


Note You need to log in before you can comment on or make changes to this bug.