GWP-Tsan’s questions

Hi All,

Thanks @Matt Morehouse for a very interesting talk on GWP-TSan at the 2020 developpers’ meeting.

I was wondering if some more details about GWP-TSan could be shared.

Are private patches to the OS needed? Which OS are supported?

In which llvm projects is the feature implemented?

Is there a plan to make GWP-TSan available in open source?

Best Regards,

Pierre

Hi Pierre,

Hi All,

Thanks @Matt Morehouse for a very interesting talk on GWP-TSan at the 2020 developpers’ meeting.

I was wondering if some more details about GWP-TSan could be shared.

We’ve had some developments with GWP-TSan since the LLVM talk last year.

The prototype discussed in that talk used page protections as the watchpoint mechanism and required syscall wrappers to avoid EFAULT. We have since realized that implementing the syscall wrappers is too tricky to get 100% right, and introduces ongoing maintenance burden that we’d like to avoid.

Our current line of investigation is using hardware watchpoints (perf_event_open) instead, which come with their own set of challenges. One major challenge is contention in the kernel over the perf event data structures, causing unacceptable overhead for production use. +Dmitry Vyukov is looking into kernel patches that should help.

Are private patches to the OS needed? Which OS are supported?

Linux is the only OS we’re interested in currently. Any patches needed will likely go upstream.

In which llvm projects is the feature implemented?

None yet; still in prototype phase.

Is there a plan to make GWP-TSan available in open source?

Yes, if/when we have a production-ready version it will likely be available in TCMalloc first, and compiler-rt later.

Best Regards,

Pierre

  • Matt

Hi Matt,

Thank you for the update!

Supporting 10k threads would be great!

I have some more questions if that is ok.

With hardware breakpoints, can GWP-TSan run along a debugger?

Does the current GWP-TSan prototype need compiler instrumentation or changes to the linker?

Best Regards,

Pierre