Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-100

QueryIteratorBase concurrency issues

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • Jena 2.11.0
    • ARQ
    • None

    Description

      QueryIteratorBase appears to have some concurrency bugs relating to cancelling a query:

      1) The cancel() and cancelAllowContinue() methods did not have large enough synchronized blocks (they also used "this" as the lock, which is not recommended)
      2) The order of setting the cancellation flags and the notifying subclasses via the requestCancel() method was incorrect
      3) The visibility and happens-before relationships were incorrect for the requestingCancel and abortIterator variables

      The cancelAllowContinue() feature adds a lot of complexity in terms of visibility and ordering. Unfortunately it is hard to write test cases for these types of concurrency issues, so the existing tests did not uncover the issues.

      Attachments

        1. JENA-100-r1157891.patch
          5 kB
          Stephen Allen

        Activity

          People

            andy Andy Seaborne
            sallen Stephen Allen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: