0

We are seeing a strange phenomena on one of our servers where the /proc/cpuinfo is emitting different values for the "cpu core" fields frequently. /proc/cpuinfo correctly says there are 8 cpus (1 physical x 4 cores x 2 hyperthreading) however the cpu-cores field can be 4 (correct) or 65531, 65528, ... (not very correct). It seems to be the same virtual CPUs that report the bad numbers.

Why do we care? Well one of our 3rd party libraries is using fingerprints from /proc/cpuinfo for it's licensing and so is generating failures because the number of cores is changing.

  • Has anyone seen this before?
  • Any idea if it is a hardware or an OS bug?
  • Any recommendations about how to diagnose and resolve the problem?

Thanks for any info.


Here's an example of output from the /proc/cpuinfo:

cpu cores : 4 cpu cores : 20 cpu cores : 20 cpu cores : 20 cpu cores : 4 cpu cores : 4 cpu cores : 4 cpu cores : 65528 
2
  • What does lscpu say? Commented Jun 11, 2018 at 16:49
  • Core(s) per socket says 4 @RuiFRibeiro. Commented Jun 11, 2018 at 17:08

1 Answer 1

0

Although we don't have all of the information, right now this is looking like a Linux kernel bug. Here's the commit on github that seems to have been made to fix this issue. The tags seem to indicate that this fix is in 4.16.X kernels. Here's the comment from the commit:

Without this fix, /proc/cpuinfo will display an incorrect amount of CPU cores, after bringing them offline and online again, as exemplified below...

This patch fixes this by always zeroing the booted_cores variable upon turning off a logical CPU.

This looks to be due the box sleeping on occasion although we are also worried about the "turbo-boost" feature which also disables cores. We are turning off sleep and hibernate modes right now that may fix it since upgrading the kernel is not an easy option for us.

So far we have tried the following grub settings which didn't seem to work or at least it didn't stop the computer from sleeping and having this problem.

intel_idle.max_cstate=0 processor.max_cstate=1 

We also found this page about disabling turbo-boost.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.