Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,351
    • Issues 5,351
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 567
    • Merge requests 567
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Merge requests
  • !6902

RTS: open timerfd synchronously (#20618)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Sylvain Henry requested to merge hsyl20/ghc:hsyl20/rts-ticker into master Nov 04, 2021
  • Overview 2
  • Commits 1
  • Pipelines 2
  • Changes 1

Open the file descriptor for the timer synchronously.

We used to do it in itimer_thread_func (i.e. in the timer thread) but it meant that some user code could run before it and get confused by the allocation of the timerfd.

See hClose002 which unsafely closes a file descriptor twice expecting an exception the second time: it sometimes failed when the second call to "close" closed our own timerfd which inadvertently reused the same file descriptor closed by the first call! (see #20618 (closed))

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: hsyl20/rts-ticker