[Mono-bugs] [Bug 561792] New: WaitAny does not consistently return when waiting on more than one WaitHandle

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 8 19:58:03 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=561792

http://bugzilla.novell.com/show_bug.cgi?id=561792#c0


           Summary: WaitAny does not consistently return when waiting on
                    more than one WaitHandle
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: i386
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: interop
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tom.philpot at logos.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=331677)
 --> (http://bugzilla.novell.com/attachment.cgi?id=331677)
WaitAny Test

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5

We've written a small test case against Mono 2.7 (r146315) that confirms
that WaitAny() does not return in a consistent amount of time, or sometimes
at all when waiting on more than one WaitHandle. It also appears that there
are no test cases in Mono for this case.

Our attached program takes 2 arguments. The first is the number of
milliseconds to wait before the wait handles are set, the second is the
number of milliseconds to wait in before exiting to give the thread pool
time to notify.

We're running these tests on Mac OS X, if that helps.



Example of Failure case:

ws1048:Mono Patches tom.philpot$ /opt/mono/bin/mono WaitAnyTest.exe 35000
10000
Setup wait handles, sleeping for 35s...
Wait2: Calling WaitAny with 2 WaitHandles
Wait1: Calling WaitAny with 1 WaitHandle
done sleeping.
Setting event 2.
Sleeping for 10s to see if wait handles respond.
Wait1: WaitAny(1) returned 0.


Example of Successful case:

ws1048:Mono Patches tom.philpot$ /opt/mono/bin/mono WaitAnyTest.exe 5000
10000
Setup wait handles, sleeping for 5s...
Wait1: Calling WaitAny with 1 WaitHandle
Wait2: Calling WaitAny with 2 WaitHandles
done sleeping.
Setting event 2.
Sleeping for 10s to see if wait handles respond.
Wait1: WaitAny(1) returned 0.
Wait2: WaitAny(2) returned 1.
RegisteredWaitForSingleObjectCallback called.

Reproducible: Sometimes

Steps to Reproduce:
1. Compile the attached test case. 
2. Run with various parameters
3. Verify results
Actual Results:  
Sometimes both wait handles are signaled, other times only one is signaled.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list