Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Merge requests
  • !3006

i#2993: avoid itimer lock splitting by alarms

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Derek Bruening requested to merge i2993-alarm-lock into master May 14, 2018
  • Overview 1
  • Commits 1
  • Pipelines 0
  • Changes 3

Addresses two problems with itimer lock acquisition being split by an alarm signal:

First, rather than a single lock for all itimers, which is subject to races due to alarms of different types arriving in different threads simultaneously, we switch to using a separate lock per itimer signal type. (We also have to handle an alarm arriving while handling an app itimer syscall, which is why we can't just blindly block and wait for the lock.)

Second, rather than holding a mutex to increment a counter, we switch two different itimer counters to use atomic increments instead. These counters are used for new threads, and an alarm can arrive in a new thread while it's setting up. This avoids having a frequent time window where an alarm splits the lock routine.

Fixes #2993 (closed)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: i2993-alarm-lock