XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0-M10 (2.0.0.v20151221-M10)
    • 2.0.0-M11, 2.0.0-M12
    • studio-ldapbrowser
    • None
    • x86_64, Linux Debian 8, GTK

    Description

      Hello,
      perhaps I am wrong, but I suspect myself of seeing a bug in Apache Directory Studio 2.0.0.v20151221-M10.

      In method EntryEditorManager.updateAutoSaveSharedReferenceCopy (runs in main thread):

      Firstly:
      -> EntryEditorUtils.ensureAttributesInitialized(entry);
      -> StudioBrowserJob runs InitializeAttributesRunnable in a thread
      -> InitializeAttributesRunnable.run
      -> initializeAttributes( entry, monitor ) -> initializeAttributes( entry, returningAttributes, true, monitor )
      -> entry.deleteAttribute( oldAttribute ) -> ai.attributeMap.remove(Strings.toLowerCase(oidString));

      Secondly:
      -> new CompoundModification().replaceAttributes(entry, workingCopy, this);
      -> fromEntry.getAttributes() -> ai.attributeMap.values()

      Thus, the 1st thread modifies ai.attributeMap and at the same time the 2nd thread reads it. Only initializeAttributes is synchronized, but on its class object.

      Is it not a race condition?

      Thank you. With regards Vaclav Havlik.

      Attachments

        Activity

          People

            seelmann Stefan Seelmann
            havlikv Václav Havlík
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: