perf icon indicating copy to clipboard operation
perf copied to clipboard

Revisit testComm waiting on sawcommevfd

Open pwaller opened this issue 4 years ago • 0 comments

In #25, I accidentally introduced an additional comment on evwait(sawcommevfd) in the testComm test. This was unintentional, and doesn't otherwise relate to the fixes introduced in that PR.

This issue is here as a reminder to revisit this.

https://github.com/acln0/perf/blob/4d8e4e56611537f4610f397f35453c63f4bb5fcc/record_test.go#L528-L544

The current state for me is that if I apply the patch of #26 onto master at 4d8e4e56611537f4610f397f35453c63f4bb5fcc, then sudo ./perf.test -test.count=1000 -test.run=Record/Comm passes with no failures for me.

However, if I uncomment the evwait above, then the tests fail. In that case, ReadRecord doesn't return, even if the context deadline is set many seconds into the future. What I see is that the child ends up waiting for the signal sawcommevfd after changing its COMM, and never exits.

So the mystery is why ReadRecord doesn't return when this wait is present. It feels as though the kernel isn't respecting our wakeup events = 1. When the wait is commented out (erroneously by me), then the process exits, and we receive the event.

pwaller avatar May 16 '20 10:05 pwaller