Skip to content

Potential AnnexParseUtil Thread Safety #1146

Closed

Description

@philip-alldredge

Summary

While using OSATE(with the graphical editor), the user interface hung. Two thread dumps are attached. They are taken from the same event. Multiple dumps were taken to allow looking for changes in the thread's state.
d3.txt
d2.txt

From my perspective, it looks like the issue is in AnnexParseUtil's usage of the parseResults hash map internally. The main thread is stuck in a loop in WeakHashMap while trying to put an entry into the map. I believe this indicates that the data structure is corrupted since the thread doesn't block and is in a seemingly endless loop. I suspect that synchronizing the usage of the map would fix the issue. However, I'm not aware of what could have triggered such behavior. I suspect it is Xtext performing a rebuild while the graphical editor is opening a resource. Unable to confirm.

Steps to Reproduce

Unable to reliable reproduce. As the time it occurred I performing small changes and saves to various resources and selecting various Eclipse views.

Environment

  • OSATE Version:
  • Platform: Windows

Activity

  1. lwrage commented on Jul 2, 2018

    @lwrage
    Contributor

    @philip-alldredge I can't look at the thread dumps. I only get a 404 error when clicking on the links.

  2. philip-alldredge commented on Jul 2, 2018

    @philip-alldredge
    ContributorAuthor

    @lwrage I updated the post to take the -core out of the URL. That seems to have fixed the links.

  3. ghost assigned on Jul 3, 2018
  4. added this to the 2.3.5 milestone on Jul 3, 2018
  5. lwrage commented on Jul 6, 2018

    @lwrage
    Contributor

    I'll synchronize the WeakHashMap.

  6. ghost removed on Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions