Concurrency Testing using Custom Linux Schedulers

Day 1 | 12:00 | 00:25 | UD6.215 | Johannes Bechberger, Jake Hillion


Note: I'm reworking this at the moment, some things won't work.

The stream isn't available yet! Check back at 12:00.

Consider you want to have a concurrency bug that requires threads to run in a specific order. Wouldn't it be great if you could stop and start threads at random? Prevent them from being scheduled onto the CPU? And the best part: Without the application being able to prevent this, like it could do with POSIX STOP and START signals? In come the scheduler extensions for the Linux Kernel. Introduced in version 6.12, they allow you to quickly write your own schedulers with eBPF, and can be the base for simple libraries that enable you to start and stop threads directly in the Linux kernel. This opens the possibility of creating complex scheduler scenarios at a whim.

In this talk, we'll show you a prototypical sched_ext-based library for concurrency testing that we used to reproduce bugs when working on the OpenJDK.