cirocosta / chicken-gun

stressing your system, a chicken at a time
MIT License
9 stars 0 forks source link

Faulty syscalls #1

Open cirocosta opened 5 years ago

cirocosta commented 5 years ago

Just like with strace one is able to inject either errors or delays into syscalls through -e inject (see http://man7.org/linux/man-pages/man1/strace.1.html), we could do the same for some very targetted system calls.

This could be used to:

  1. return very edge case errors for syscalls that we might assume to not fail, and
  2. make syscalls suddenly slow (especially interesting for simulating either disk or network devices being throttled).

For 2, we verify that this indeed works by using bpftrace.

cirocosta commented 5 years ago

Maybe we can start with making the syscalls quite slow via ptraceing the whole thing: https://ops.tips/gists/using-c-to-inspect-linux-syscalls/