Pax Logging
  1. Pax Logging
  2. PAXLOGGING-26

deadlock when pax logging sends an event to EventAdmin

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0-RC2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Felix

      Description

      I have two threads that often deadlock.

      • thread 1 logs the "unget" of my service, this holds a lock from the Felix registry, it's waiting for a linked list in EventAdminTracker
      • thread 2 (felix event dispatch thread) logs a framework event, holds the linked list in EventAdminTracker and tries to obtain the felix registry lock in order to find the Event Admin service.

      In my humble opinion, this is caused by pax logging (EventAdminTracker), not adhering to the rule that an OSGi service should not hold locks when calling the framework.
      Of course, one can debate whether Felix should hold a lock when calling ServiceFactory.ungetService(), but still, pax logging should not hold a lock when posting an event.

      1. deadlock.txt
        4 kB
        Peter Doornbosch

        Activity

          People

          • Assignee:
            Niclas Hedhman
            Reporter:
            Peter Doornbosch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development