Summary: | stapbpf loses perf_events when writing to interactive terminal | ||
---|---|---|---|
Product: | systemtap | Reporter: | Sagar Patel <sapatel> |
Component: | bpf | Assignee: | Unassigned <systemtap> |
Status: | NEW --- | ||
Severity: | normal | CC: | sapatel, serhei |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Sagar Patel
2019-11-22 23:13:25 UTC
My suspicion is that the perf_events buffer used to receive transport messages fills up while the stapbpf process is delayed writing output. This results in transport messages being overwritten and the 'lost perf_events' warning being generated. When stapbpf output is redirected to a file, there is no I/O delay, and perf_events are consumed before the buffer overflows. If my suspicion is true, this could be solved by receiving transport messages in a separate thread. One thing that I should definitely fix, aside from tackling the speed disparity in console/file output: when perf_events are lost, unpaired PRINTF_{START,END} messages should not cause a fatal error for stapbpf. That is, a sequence such as PRINTF_START PRINTF_END <lost events> PRINTF_END should cause the PRINTF_END to be dropped along with the lost events. Currently it causes stapbpf to terminate with an error message. |