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,400
    • Issues 5,400
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 590
    • Merge requests 590
  • 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
  • Issues
  • #17090
Closed
Open
Issue created Aug 20, 2019 by Jinwoo Lee@jinwoo

Data races in ioManagerWakeup reported by ThreadSanitizer (GHC v8.6.4)

Similar to #16150 (closed) but a different one.

Our local environment allows running Haskell programs under ThreadSanitizer. We disabled it for a while and then re-enabled it recently and we're seeing data race errors from GHC. It'd be great if someone could fix this because this makes it hard for us to enable ThreadSanitizer for our tests.

WARNING: ThreadSanitizer: data race (pid=1830)
  Read of size 8 at 0x7ba0000000a0 by thread T1:
    #0 write /proc/self/cwd/third_party/llvm/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc:1115 (discriminator 18) (ecc9223f2e9ca92878082a9b248bf000254b28aa1e7f797cbb34c9f99565cd08_0200002b0840+0x5d883)
    #1 ioManagerWakeup vendor_src/v8_6_4/rts/posix/Signals.c:162 (libHSrts_thr-ghc8.6.4.so+0x4e4d4)

  Previous write of size 8 at 0x7ba0000000a0 by main thread:
    [failed to restore the stack]

  Location is file descriptor 10 created by main thread at:
    #0 eventfd /proc/self/cwd/third_party/llvm/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cpp:1586 (discriminator 16) (ecc9223f2e9ca92878082a9b248bf000254b28aa1e7f797cbb34c9f99565cd08_0200002b0840+0x55ade)
    #1 c7Eq_info ghc_12.c:? (libHSbase-4.12.0.0-ghc8.6.4.so+0x893104)
    #2 __libc_start_main ??:? (libc.so.6+0x38bbc)

  Thread T1 'ghc_ticker' (tid=1832, running) created by main thread at:
    #0 pthread_create /proc/self/cwd/third_party/llvm/llvm/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cpp:967 (discriminator 6) (ecc9223f2e9ca92878082a9b248bf000254b28aa1e7f797cbb34c9f99565cd08_0200002b0840+0x5152a)
    #1 initTicker vendor_src/v8_6_4/rts/posix/itimer/Pthread.c:167 (libHSrts_thr-ghc8.6.4.so+0x4d728)
    #2 __libc_start_main ??:? (libc.so.6+0x38bbc)

SUMMARY: ThreadSanitizer: data race vendor_src/v8_6_4/rts/posix/Signals.c:162 in ioManagerWakeup
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking