Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 16.0
    • Fix Version/s: 15.4, 16.1
    • Component/s: xsd extensions
    • Labels:
      None

      Description

      Deadlocks can occur on schema parsing, due to synchronized blocks.

      In our case a GeoServer instance parses a remote XSD schema. The schema is hosted by the same GeoServer instance. Before loading the schema the GeoServer synchronizes on the Schemas class. Concurrently the same GeoServer creates the schema, using a different thread and tries to synchronize on the same Schemas class -> deadlock.

      In addition to the deadlock problem this is a scalability issue: The synchronized lock is held longer than required.

      Proposed solution: The loading of a remote schema should be splitted into

      1. prefetching the schema - does not require synchronization
      2. loading the prefetched schema - requires synchronization to preserve data structure consistency

      I will create a corresponding pull request.

      Best regards,
      Andreas

      PS: The deadlock is typically resolved by a readTimeout (10s by default) on the consumer side. So, in fact it is a performance bottleneck and scalability issue only.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              awaterme Andreas W
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: