Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-12033

Callbacks from striped pool due to async/await may hang cluster

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.7.5
    • Fix Version/s: 2.10
    • Component/s: cache, platforms
    • Labels:
      None

      Description

      Discussed on dev-list:
      http://apache-ignite-developers.2346864.n4.nabble.com/Re-EXTERNAL-Re-Replace-or-Put-after-PutAsync-causes-Ignite-to-hang-td42921.html

      Must use the public pool for callbacks as the most obvious step.


      http://apache-ignite-users.70518.x6.nabble.com/Replace-or-Put-after-PutAsync-causes-Ignite-to-hang-td27871.html#a28051

      There's a reproducer project. Long story short, .Net can invoke cache operations with future callbacks, which will be invoked from striped pool. If such callbacks are to use cache operations, those will be possibly sheduled to the same stripe and cause a deadlock.

      The code is very simple:

                      Console.WriteLine("PutAsync");
                      await cache.PutAsync(1, "Test");
      
                      Console.WriteLine("Replace");
                      cache.Replace(1, "Testing"); // Hangs here
      
                      Console.WriteLine("Wait");
                      await Task.Delay(Timeout.Infinite); 
      

      async/await should absolutely not allow any client code to be run from stripes.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ilyak Ilya Kasnacheev
            • Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: