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

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

    XMLWordPrintableJSON

    Details

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

      Description

      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:
              ptupitsyn Pavel Tupitsyn
              Reporter:
              ilyak Ilya Kasnacheev
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: