Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
OpenWalnut Core
OpenWalnut Core
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 44
    • Issues 44
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • OpenWalnut
  • OpenWalnut CoreOpenWalnut Core
  • Issues
  • #37

Closed
Open
Opened May 08, 2017 by André Reichenbach@reichenbach
  • Report abuse
  • New issue
Report abuse New issue

Race condition in WMFiberDisplay

Quickly changing input fibers of WMFiberDisplay leads to an exception in the following line:

753: ( *m_bitfieldAttribs )[ fidx ] = overrideROIFiltering | m_fiberSelector->getBitfield()->at( fidx );

Debugging reveals this is due to a race condition. The pointers m_fibers and m_fiberSelector get updated non-atomically in lines 364 and 382 respectively. The aforementioned code however runs in the OSG thread, so if it gets executed in between the updates of the two pointers, fidx ends up with too high values when accessing the bitfield in line 753.

I tried fixing this by locking a mutex for the durations of the updates and uses of the pointers, however this lead to another crash. There must be some additional dependencies between the data.

I can provide a module that outputs rapidly changing fiber data if needed for debuggung.

(from redmine: created on 2014-12-04)

Edited Sep 26, 2020 by Alexander Wiebel
To upload designs, you'll need to enable LFS. More information
Assignee
Assign to
Long Term Goals
Milestone
Long Term Goals
Assign milestone
Time tracking
None
Due date
None
1
Labels
Bug
Assign labels
  • View project labels
Reference: openwalnut/openwalnut#37