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

Failed to detect CPU frequency if run container (LXC) with fixed CPUs. #82

Open
roadk1ll opened this issue Jul 13, 2016 · 1 comment
Open

Comments

@roadk1ll
Copy link

roadk1ll commented Jul 13, 2016

Ran into this issue using coro inside of an lxc container when cpu resources of the container were fixed to something other than the first few cores.

When you assign the cpus to the container - they report back sequentially starting at , 0,1,2,3,4...depending on the number of cores assigned to the container ( in the /proc/cpuinfo file.)

However when you get the current_cpu_number = sched_getcpu(), this returns the actual cpu on which the program is running. They don't match up, so cpu-found remains false - and the error below is produced.

see tsc_time.pyx, lines 254-280

import coro
File "/root/traffic_gen/py27/local/lib/python2.7/site-packages/coro/init.py", line 25, in
from coro._coro import *
File "coro/clocks/tsc_time.pxd", line 25, in init coro._coro (coro/_coro.c:58161)
File "coro/clocks/tsc_time.pyx", line 308, in init coro.clocks.tsc_time (coro/clocks/tsc_time.c:15190)
File "coro/clocks/tsc_time.pyx", line 272, in coro.clocks.tsc_time.get_ticks_per_sec (coro/clocks/tsc_time.c:2119)
RuntimeError: failed to detect CPU frequency

@markpeek
Copy link
Member

Thank you for the issue. Do you have repeatable steps you can share that show setting up the container and limiting the resources?

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

2 participants