Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elf: perf event ordering has bugs #42

Open
alban opened this issue May 5, 2017 · 3 comments
Open

elf: perf event ordering has bugs #42

alban opened this issue May 5, 2017 · 3 comments

Comments

@alban
Copy link
Collaborator

alban commented May 5, 2017

The algorithm to re-order perf events coming from several cpus has some bugs:

I can reproduce the issue with incorrect ordering with this test. I attach a eBPF kprobe on the uname system call. A shell script to run uname in a loop was not fast enough to reproduce the problem, so I needed to write a small program in Golang running syscall.Uname as fast as possible, then execute it in parallel in 2 different cpus:

  • taskset --cpu-list 0 uname-loop
  • taskset --cpu-list 1 uname-loop

I am working on a patch. I want to avoid using the userspace clock clock_gettime at all.

/cc @iaguis @krnowak @2opremio

@alban
Copy link
Collaborator Author

alban commented May 5, 2017

Discussion about clock bpf_ktime_get_ns and clock_gettime: iovisor/bcc#931
Summary:

@2opremio
Copy link
Contributor

2opremio commented Jul 11, 2017

@alban what's left here? Could this be the cause of weaveworks/scope#2650 ?

@bboreham
Copy link

bboreham commented Jul 4, 2019

We continue to observe events arriving out of order from time to time.

Would it be an idea to adjust beforeHarvest back in time a few milliseconds: we would be reporting events a little late but less likely to hit whatever race causes them to come out of order?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants