Uploaded image for project: 'VOLTHA'
  1. VOLTHA
  2. VOL-2708

Deadlock in kafka_interadapter_proxy when timeout happens at the same time as dispatchResponse

    XMLWordPrintable

    Details

      Description

      1) InvokeRPC Calls SubscribeForResponse, allocates a channel
      2) wait_for_messages receives a message, launches a goroutine to handleMessage
      3) handleMessage launches a goroutine to dispatchMessage
      4) dispatchResponse grabs lockTransactionIdToChannelMap
      5) dispatchResponse attempts to send on channel, blocks on send.
      6) InvokeRPC timesout and exits, calling deferred unSubscribeForResponse
      7) unSubscribeForResponse calls deleteFromTransactionIdChannelMap
      8) deleteFromTransactionIdChannelMap attempts to grab lockTransactionIdToChannelMap  

      Increasing the buffering of the channel created by SubscribeForResponse should fix this issue. There is only 1 expected response, so channel size of 1 should be fine

        Attachments

          Issue Links

          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              scottb Scott Baker
              Reporter:
              scottb Scott Baker
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes