Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • 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 86
    • Issues 86
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenWalnut
  • OpenWalnut CoreOpenWalnut Core
  • Issues
  • #37

Closed
Open
Created May 08, 2017 by André Reichenbach@reichenbachDeveloper

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
Assignee
Assign to
Long Term Goals
Milestone
Long Term Goals
Assign milestone
Time tracking