cpuinfo_linux_get_max_processors_count always warns Ubuntu default MAX cpu values (stderr)

Bug #1840847 reported by Rafael David Tinoco
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cpuinfo (Ubuntu)
Fix Released
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 ?

Tags: patch
description: updated
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

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
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

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)
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Low
description: updated
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

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.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

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

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

sponsored!

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

and opened a merge request in Debian

Revision history for this message
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
Mathew Hodson (mhodson)
no longer affects: linux (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.