Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 577
    • Issues 577
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 116
    • Merge requests 116
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container 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
  • ISC Open Source ProjectsISC Open Source Projects
  • BINDBIND
  • Issues
  • #1027
Closed
Open
Issue created May 13, 2019 by Ondřej Surý@ondrejOwner

Make rndc ThreadSanitizer clean

Currently rndc fails with:

==================
WARNING: ThreadSanitizer: data race (pid=27100)
  Read of size 4 at 0x0001032e66fc by main thread:
    #0 main rndc.c:1000 (rndc:x86_64+0x100001aa1)

  Previous write of size 4 at 0x0001032e66fc by thread T2:
    #0 rndc_connected rndc.c:450 (rndc:x86_64+0x100003532)
    #1 dispatch task.c:1128 (rndc:x86_64+0x10003f7e5)
    #2 run task.c:1295 (rndc:x86_64+0x10003d168)

  Location is global 'connects' at 0x0001032e66fc (rndc+0x00010006f6fc)

  Thread T2 (tid=18346395, running) created by main thread at:
    #0 pthread_create <null> (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2a17d)
    #1 isc_thread_create thread.c:63 (rndc:x86_64+0x100055056)
    #2 isc_taskmgr_create task.c:1380 (rndc:x86_64+0x10003cf10)
    #3 main rndc.c:935 (rndc:x86_64+0x10000165b)

SUMMARY: ThreadSanitizer: data race rndc.c:1000 in main
==================
==================
WARNING: ThreadSanitizer: data race (pid=27100)
  Read of size 4 at 0x0001032e6700 by main thread:
    #0 main rndc.c:1000 (rndc:x86_64+0x100001ab6)

  Previous write of size 4 at 0x0001032e6700 by thread T2:
    #0 rndc_senddone rndc.c:274 (rndc:x86_64+0x100003fb9)
    #1 dispatch task.c:1128 (rndc:x86_64+0x10003f7e5)
    #2 run task.c:1295 (rndc:x86_64+0x10003d168)

  Location is global 'sends' at 0x0001032e6700 (rndc+0x00010006f700)

  Thread T2 (tid=18346395, running) created by main thread at:
    #0 pthread_create <null> (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2a17d)
    #1 isc_thread_create thread.c:63 (rndc:x86_64+0x100055056)
    #2 isc_taskmgr_create task.c:1380 (rndc:x86_64+0x10003cf10)
    #3 main rndc.c:935 (rndc:x86_64+0x10000165b)

SUMMARY: ThreadSanitizer: data race rndc.c:1000 in main
==================
==================
WARNING: ThreadSanitizer: data race (pid=27100)
  Read of size 4 at 0x0001032e6704 by main thread:
    #0 main rndc.c:1000 (rndc:x86_64+0x100001acb)

  Previous write of size 4 at 0x0001032e6704 by thread T2:
    #0 rndc_recvdone rndc.c:294 (rndc:x86_64+0x1000040c3)
    #1 dispatch task.c:1128 (rndc:x86_64+0x10003f7e5)
    #2 run task.c:1295 (rndc:x86_64+0x10003d168)

  Location is global 'recvs' at 0x0001032e6704 (rndc+0x00010006f704)

  Thread T2 (tid=18346395, running) created by main thread at:
    #0 pthread_create <null> (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2a17d)
    #1 isc_thread_create thread.c:63 (rndc:x86_64+0x100055056)
    #2 isc_taskmgr_create task.c:1380 (rndc:x86_64+0x10003cf10)
    #3 main rndc.c:935 (rndc:x86_64+0x10000165b)

SUMMARY: ThreadSanitizer: data race rndc.c:1000 in main
==================
ThreadSanitizer: reported 3 warnings

Should be fairly easy to fix...

Assignee
Assign to
Time tracking