Uploaded image for project: 'MediaPortal 2'
  1. MediaPortal 2
  2. MP2-936

Potential deadlock when disposing GENA event subscription

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 2.5
    • 2.5
    • UPnP
    • None

    Description

      A deadlock can occur when disposing an event subscription if a pending request is in the callback method and waiting to obtain a lock on _serverData.SyncObj.

      When disposing the event subscription any pending requests are waited on to complete whilst the waiting thread holds a lock on _serverData.SyncObj here - https://github.com/MediaPortal/MediaPortal-2/blob/25f5c755477efdcc8c4919324bcf450b86131222/MediaPortal/Source/Core/UPnP/Infrastructure/Dv/GENA/EventSubscription.cs#L155
      If the request thread is currently in a callback and is itself waiting to obtain _serverData.SyncObj then a deadlock will occur, e.g. here - https://github.com/MediaPortal/MediaPortal-2/blob/25f5c755477efdcc8c4919324bcf450b86131222/MediaPortal/Source/Core/UPnP/Infrastructure/Dv/GENA/EventSubscription.cs#L213

      Attachments

        Activity

          People

            brownard Brownard
            brownard Brownard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: