Bug 508236

Summary: SAF Test lck: saLckDispatch/2-3.c doesn't pass
Product: [Fedora] Fedora Reporter: Jan Friesse <jfriesse>
Component: openaisAssignee: Ryan O'Hara <rohara>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 14CC: agk, fdinitto, sdake
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 561192 (view as bug list) Environment:
Last Closed: 2011-10-03 15:34:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 561192    
Attachments:
Description Flags
Move list_init calls in saLckResourceOpenAsync none

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.