cpuinfo_linux_get_max_processors_count always warns Ubuntu default MAX cpu values (stderr)

Bug #1840847 reported by Rafael David Tinoco on 2019-08-20
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cpuinfo (Ubuntu)
Medium
Rafael David Tinoco

Bug Description

From bug:

https://bugs.launchpad.net/bugs/1840511

clickhouse builds test started failing because of the presence of stderr whenever using the function:

cpuinfo_linux_get_max_processors_count(void)

From cpuid library.

This happens because:

----

#if defined(__ANDROID__) && !defined(CPU_SETSIZE)
    /*
     * Android NDK headers before platform 21 do not define CPU_SETSIZE,
     * so we hard-code its value, as defined in platform 21 headers
     */
    #if defined(__LP64__)
        static const uint32_t default_max_processors_count = 1024;
    #else
        static const uint32_t default_max_processors_count = 32;
    #endif
#else
    static const uint32_t default_max_processors_count = CPU_SETSIZE;
#endif

----

#if !defined(__ANDROID__)
    /*
     * sched.h is only used for CPU_SETSIZE constant.
     * Android NDK headers before platform 21 do have this constant in sched.h
     */
    #include <sched.h>
#endif

----

and resolving includes:

x86_64-linux-gnu/bits/cpu-set.h:

/* Size definition for CPU sets. */
#define __CPU_SETSIZE 1024

----

And the warning:

Warning in cpuinfo: kernel_max value of 8191 parsed from /sys/devices/system/cpu/kernel_max exceeds platform-default limit 1023

Will always be displayed in Ubuntu OS, when it should NOT (does not make any sense to trigger a warning for something that can't be changed).

FOR THE KERNEL TEAM:

Should ubuntu update sched.h and/or cpu-set.h to reflect its decision in using 8192 max CPUs ?

description: updated

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1840847

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete

I'm changing CPUINFO_LOG_LEVEL from warning to error only to mitigate this issue. Unfortunately this is the best way to address:

https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1840511

Right now, allowing clickhouse build to succeed and unblocking MySQL 8 upgrade.

Changed in cpuinfo (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Rafael David Tinoco (rafaeldtinoco)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Low
description: updated

PPA containing clickhouse build (LP: #1840511) and cpuinfo with this fix:

https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1840511

Debdiff with proposed changes are attached to this bug.

The attachment "cpuinfo_0.0~git20190201.d5e37ad-1ubuntu1.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
description: updated

Shouldn't this change be forwarded in Debian? can you please open a bug report?

sponsored!

and opened a merge request in Debian

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cpuinfo - 0.0~git20190201.d5e37ad-1ubuntu1

---------------
cpuinfo (0.0~git20190201.d5e37ad-1ubuntu1) eoan; urgency=medium

  * debian/rules: Set CPUINFO_LOG_LEVEL to error only (LP: #1840847)

 -- Rafael David Tinoco <email address hidden> Wed, 21 Aug 2019 02:08:24 +0000

Changed in cpuinfo (Ubuntu):
status: In Progress → Fix Released
no longer affects: linux (Ubuntu)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers