Bug#1036818: linux on armel/armhf: Perl library unable to access get CPU info from /proc/cpu or kstat
Package: linux
Version: 6.1.0
Hi!
I noticed that the autopkgtests on Debian on armhf and armel that run
the mariadb-test-run have been failing since the Linux kernel was
updated from 5.10.0 to 6.1.0. The failure is due to a Perl module not
being able to get from /proc/cpu the number of processors:
Last passing one:
2023-04-28 https://ci.debian.net/data/autopkgtest/unstable/armel/m/mariadb/33218554/log.gz
kernel: Linux 5.10.0-21-arm64 #1 SMP Debian 5.10.162-1 (2023-01-21)
perl 5.36.0-7
libdbi-perl armel 1.643-4
libconfig-inifiles-perl all 3.000003-2
First failing one:
2023-05-05 https://ci.debian.net/data/autopkgtest/unstable/armel/m/mariadb/33379866/log.gz
kernel: Linux 6.1.0-7-arm64 #1 SMP Debian 6.1.20-2 (2023-04-08)
perl 5.36.0-7
libdbi-perl armhf 1.643-4
libconfig-inifiles-perl all 3.000003-2
Error:
starting mysql-test-tun.pl...
Logging: ./mysql-test-run.pl --force --testcase-timeout=120
--suite-timeout=540 --retry=3 --
...
Collecting tests...
Installing system database...
Can't use an undefined value as an ARRAY reference at
lib/My/SysInfo.pm line 166.
This line 166 in src:mariadb/mysql-test/lib/My/SysInfo.pm has:
# Return the number of cpus found
sub num_cpus {
my ($self)= @_;
return int(@{$self->{cpus}}) or
confess "INTERNAL ERROR: No cpus in list";
}
The cpus is initialized to be an empty list on the line 119:
118 my $self= bless {
119 cpus => (),
120 }, $class;
Then it tries to fill it from /proc/cpuinfo (line 67) and `kstat`
(line 95). If nothing worked it'll create one dummy cpu:
145 push(@{$self->{cpus}},
146 {
147 bogomips => DEFAULT_BOGO_MIPS,
148 model_name => "unknown",
149 });
See more discussion from MariaDB devs:
https://lists.launchpad.net/maria-developers/msg13356.html
Thus the primary suspect here is the kernel upgrade. Perl versions
have not changed. This only happens on armel/armhf, other archs are
fine.
Reproducing the environment on ci.debian.net / ci-worker-arm??-?? to
study how /proc/cpu etc looks like, so filing this against the Linux
package is somewhat of a guess, but at least we get a Bug# to
reference for further research.
Reply to: