Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6098445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:09:33+00:00 2026-05-23T13:09:33+00:00

Has anyone run into a situation where a WaitAny call returns a valid handle

  • 0

Has anyone run into a situation where a WaitAny call returns a valid handle index, but the Proxy.End call blocks? Or has any recommendations or how best to debug this – tried tracing, performance counters (to check the max percentages), logging everywhere

The test scenario: 2 async. requests are going out (there’s a bit more to the full implementation), and the 1st Proxy.End call return successfully, but the subsequent blocks. I’ve check the WCF trace and don’t see anything particularly interesting. NOTE that it is self querying an endpoint that exists in the same process as well as a remote machine (=2 async requests)

As far as I can see the call is going through on the service implementation side for both queries, but it just blocks on the subsequent end call. It seems to work with just a single call though, regardless of whether it is sending the request to a remote machine or to itself; so it something to do with the multiple queries or some other factor causing the lockup.

I’ve tried different “concurrencymode”s and “instancecontextmode”s but it doesn’t seem to have any bearing on the result.

Here’s a cut down version of the internal code for parsing the handle list:

ValidationResults IValidationService.EndValidate()
    {
        var results = new ValidationResults();

        if (_asyncResults.RemainingWaitHandles == null)
        {
            results.ReturnCode = AsyncResultEnum.NoMoreRequests;
            return results;                
        }

        var waitArray = _asyncResults.RemainingWaitHandles.ToArray();
        if (waitArray.GetLength(0) > 0)
        {
            int handleIndex = WaitHandle.WaitAny(waitArray, _defaultTimeOut);
            if (handleIndex == WaitHandle.WaitTimeout)
            {
                // Timeout on signal for all handles occurred                    
                // Close proxies and return...
            }

            var asyncResult = _asyncResults.Results[handleIndex];



            results.Results = asyncResult.Proxy.EndServerValidateGroups(asyncResult.AsyncResult);

            asyncResult.Proxy.Close();
            _asyncResults.Results.RemoveAt(handleIndex);
            _asyncResults.RemainingWaitHandles.RemoveAt(handleIndex);

    results.ReturnCode = AsyncResultEnum.Success;
            return results;
        }

    results.ReturnCode = AsyncResultEnum.NoMoreRequests;
        return results;
    }

and the code that calls this:

 validateResult = validationService.EndValidateSuppression();
 while (validateResult.ReturnCode == AsyncResultEnum.Success)
 {
       // Update progress step                        
       //duplexContextChannel.ValidateGroupCallback(progressInfo);

     validateResult = validationService.EndValidateSuppression();
 }

I’ve commented out the callbacks on the initiating node (FYI it’s actually an 3-tier setup, but the problem is isolated to this 2nd tier calling the 3rd tier – the callbacks go from the 2nd tier to the 1st tier which have been removed in this test). Thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:09:33+00:00Added an answer on May 23, 2026 at 1:09 pm

    Sticking to the solution I left in my comment. Simply avoid chaining a callback to an aysnc calls that have different destinations (i.e. proxies)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Has anyone run into this error message before when using a timer on an
Has anyone run into issues serializing components into a file and reading them back,
Has anyone run into this problem... In my layout.phtml I have: <head> <?= $this->headTitle('Control
Has anyone run into this problem? I have a collection of comments that I
Has anyone else run into this problem before? I've got a method that calls
Has anyone run into the error where your upgrading a VS2008 project which targets
Has anyone run into this while using Machine.Specifications.Mvc? I setup a spec to test
Possible Duplicate: Space bar not working in form fields Has anyone run into an
Has anyone been able to get xinc to run correctly under OpenBSD's chrooted default
Anyone who has tried to implement RoutedCommands in WPF using M-V-VM has undoubtedly run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.