iovisor / iovisor/bcc

cpuunclaimed.py: CPU samples arrived at skewed offsets

Open
#2,163 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

I'm trying to run ```tools/cpuunclaimed.py``` on a machine running Ubuntu 18.04 with a 4.18 kernel. The machine has 2x Xeon E5-2630 (Haswell) dies, 16 cores (32 threads). Turbo Boost, C-states and P-states have all been disabled from the BIOS. Additionally, ```intel_idle.max_cstate``` is set to 0:
```
$ cat /sys/module/intel_idle/parameters/max_cstate
0
$
```

Nevertheless, the script quits anywhere between 1 to 5 seconds:
```
$ sudo ./cpuunclaimed.py
Sampling run queues... Output every 1 seconds. Hit Ctrl-C to end.
%CPU 0.16%, unclaimed idle 5.05%
ERROR: CPU samples arrived at skewed offsets (CPUs may have powered down when idle), spanning 710556 ns (expected < 400400 ns). Debug with -J, and see the man page. As output may begin to be unreliable, exiting.
$ sudo ./cpuunclaimed.py
Sampling run queues... Output every 1 seconds. Hit Ctrl-C to end.
ERROR: CPU samples arrived at skewed offsets (CPUs may have powered down when idle), spanning 722753 ns (expected < 400400 ns). Debug with -J, and see the man page. As output may begin to be unreliable, exiting.
$ sudo ./cpuunclaimed.py
Sampling run queues... Output every 1 seconds. Hit Ctrl-C to end.
%CPU 0.17%, unclaimed idle 5.39%
ERROR: CPU samples arrived at skewed offsets (CPUs may have powered down when idle), spanning 746505 ns (expected < 400400 ns). Debug with -J, and see the man page. As output may begin to be unreliable, exiting.
```

There is hardly any load on the machine (as can be seen). I've tried the same under load, and the behavior is similar.

From what I understand, the CPUs should not be powering down. Is there anything I'm missing?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with tools/cpuunclaimed.py and reproduce the skewed-offset error on the reported Ubuntu 18.04 and 4.18 kernel setup. Use the script's -J debugging option and consult its man page; done means identifying the cause of the premature exit and documenting or correcting the behavior without unreliable output.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, python
Domain
operating-systems, performance, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.