Open dezzak opened 1 month ago
Please provide more logs, this log can not determine the problem
Running pveprox with 8.2.9+port:
root@pia:~# apt-cache policy libpve-common-perl
libpve-common-perl:
Installed: 8.2.9+port
Candidate: 8.2.9+port1
Version table:
8.2.9+port1 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
*** 8.2.9+port 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
100 /var/lib/dpkg/status
8.2.9 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.2.6 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.2.3 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.2.1 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.1.1 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.1.0-1 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.0.10 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.0.9 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.0.8 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.0.6 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.0.5 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
8.0.1 500
500 https://mirrors.apqa.cn/proxmox/debian/pve bookworm/port arm64 Packages
root@pia:~# pveproxy status
stopped
pveproxy runs and returns a status
Now install 8.2.9+port1 and try the same
root@pia:~# apt install libpve-common-perl=8.2.9+port1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be upgraded:
libpve-common-perl
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/118 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Reading changelogs... Done
(Reading database ... 99714 files and directories currently installed.)
Preparing to unpack .../libpve-common-perl_8.2.9+port1_arm64.deb ...
Unpacking libpve-common-perl (8.2.9+port1) over (8.2.9+port) ...
Setting up libpve-common-perl (8.2.9+port1) ...
Processing triggers for pve-manager (8.3.3) ...
Job for pvedaemon.service failed.
See "systemctl status pvedaemon.service" and "journalctl -xeu pvedaemon.service" for details.
Job for pvestatd.service failed.
See "systemctl status pvestatd.service" and "journalctl -xeu pvestatd.service" for details.
Job for pvescheduler.service failed.
See "systemctl status pvescheduler.service" and "journalctl -xeu pvescheduler.service" for details.
Processing triggers for pve-ha-manager (4.0.6) ...
root@pia:~# pveproxy status
Attempt to reload PVE/QemuServer.pm aborted.
Compilation failed in require at /usr/share/perl5/PVE/HA/Resources/PVEVM.pm line 14.
BEGIN failed--compilation aborted at /usr/share/perl5/PVE/HA/Resources/PVEVM.pm line 21.
Compilation failed in require at /usr/share/perl5/PVE/HA/Env/PVE2.pm line 23.
BEGIN failed--compilation aborted at /usr/share/perl5/PVE/HA/Env/PVE2.pm line 23.
Compilation failed in require at /usr/share/perl5/PVE/API2/Cluster.pm line 15.
BEGIN failed--compilation aborted at /usr/share/perl5/PVE/API2/Cluster.pm line 15.
Compilation failed in require at /usr/share/perl5/PVE/API2.pm line 15.
BEGIN failed--compilation aborted at /usr/share/perl5/PVE/API2.pm line 15.
Compilation failed in require at /usr/share/perl5/PVE/Service/pveproxy.pm line 13.
BEGIN failed--compilation aborted at /usr/share/perl5/PVE/Service/pveproxy.pm line 13.
Compilation failed in require at /usr/bin/pveproxy line 11.
BEGIN failed--compilation aborted at /usr/bin/pveproxy line 11.
root@pia:~#
Looking at the contents of /usr/share/perl5/PVE between the port
and port1
releases, the only differences are in ProcFSTools.pm
, in the read_cpuinfo
subroutine:
root@pia:/home/dezza# diff -u port/ProcFSTools.pm port1/ProcFSTools.pm
--- port/ProcFSTools.pm 2025-02-17 10:24:54.456375270 +0000
+++ port1/ProcFSTools.pm 2025-02-17 10:24:28.968451973 +0000
@@ -10,7 +10,8 @@
use Socket qw(PF_INET PF_INET6 SOCK_DGRAM IPPROTO_IP);
use Time::HiRes qw (gettimeofday);
-use PVE::Tools;
+use PVE::Tools qw(get_host_arch);
+use JSON;
use constant IFF_UP => 1;
use constant IFNAMSIZ => 16;
@@ -57,6 +58,21 @@
}
}
+ my $arch = get_host_arch();
+ my $hardinfo = '/run/pve/query-machine-info';
+
+ if ($arch eq 'aarch64' && $res->{model} eq 'unknown' && -e $hardinfo){
+ $hardinfo = IO::File->new ($hardinfo, "r");
+ return if !$hardinfo;
+ my $data = do { local $/; <$hardinfo> };
+ $data = decode_json($data);
+ foreach my $item (@$data) {
+ if (exists $item->{cpu}) {
+ $res->{model} = $item->{cpu};
+ }
+ }
+ $hardinfo->close;
+ }
# Hardware Virtual Machine (Intel VT / AMD-V)
$res->{hvm} = $res->{flags} =~ m/\s(vmx|svm)\s/;
I knocked together a quick perl script to copy that function and add some debug:
#!/usr/bin/perl
use Data::Dumper;
use IO::File;
use PVE::Tools qw(get_host_arch);
use JSON;
sub read_cpuinfo {
my $fn = '/proc/cpuinfo';
return $cpuinfo if $cpuinfo;
my $res = {
user_hz => $clock_ticks,
model => 'unknown',
mhz => 0,
cpus => 1,
sockets => 1,
flags => '',
};
my $fh = IO::File->new ($fn, "r");
return $res if !$fh;
my $cpuid = 0;
my $idhash = {};
my $count = 0;
while (defined(my $line = <$fh>)) {
if ($line =~ m/^processor\s*:\s*\d+\s*$/i) {
$count++;
} elsif ($line =~ m/^model\s+name\s*:\s*(.*)\s*$/i) {
$res->{model} = $1 if $res->{model} eq 'unknown';
} elsif ($line =~ m/^cpu\s+MHz\s*:\s*(\d+\.\d+)\s*$/i) {
$res->{mhz} = $1 if !$res->{mhz};
} elsif ($line =~ m/^flags\s*:\s*(.*)$/) {
$res->{flags} = $1 if !length $res->{flags};
} elsif ($line =~ m/^physical id\s*:\s*(\d+)\s*$/i) {
$cpuid = $1;
$idhash->{$1} = 1 if not defined($idhash->{$1});
} elsif ($line =~ m/^cpu cores\s*:\s*(\d+)\s*$/i) {
$idhash->{$cpuid} = $1 if defined($idhash->{$cpuid});
}
}
my $arch = get_host_arch();
my $hardinfo = '/run/pve/query-machine-info';
print("Before if statement:\n");
print(Dumper($arch, $res->{model}, (-e $hardinfo)));
if ($arch eq 'aarch64' && $res->{model} eq 'unknown' && -e $hardinfo){
$hardinfo = IO::File->new ($hardinfo, "r");
return if !$hardinfo;
my $data = do { local $/; <$hardinfo> };
print("Contents of \$hardinfo:\n");
print(Dumper($data));
$data = decode_json($data);
foreach my $item (@$data) {
if (exists $item->{cpu}) {
$res->{model} = $item->{cpu};
}
}
$hardinfo->close;
}
# Hardware Virtual Machine (Intel VT / AMD-V)
$res->{hvm} = $res->{flags} =~ m/\s(vmx|svm)\s/;
$res->{sockets} = scalar(keys %$idhash) || 1;
$res->{cores} = sum(values %$idhash) || 1;
$res->{cpus} = $count;
$fh->close;
$cpuinfo = $res;
return $res;
}
print(Dumper(read_cpuinfo()));
and get the results:
Before if statement:
$VAR1 = 'aarch64';
$VAR2 = 'unknown';
$VAR3 = 1;
Contents of $hardinfo:
$VAR1 = '';
malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "(end of string)") at test.pl line 56, <GEN1> line 1.
So it appears that the decode_json()
call doesn't like being given an empty string
Indeed, it does appear that /run/pve/query-machine-info
is empty:
# ls -l /run/pve/query-machine-info
-rw-r--r-- 1 root root 0 Feb 13 14:38 /run/pve/query-machine-info
In the new version, I use dmidecode to get hardware information. Maybe there is an error in this part on sbc. I will fix this problem in the morning of 8th East
Can you run this script? /usr/bin/query-machine-info I haven't been able to reproduce this issue on the Rockchip SBC. Have you installed dmidecode and jc?
Would yout be convenient to provide the complete output of cat /proc/cpuinfo
and lscpu
?
Can you run this script? /usr/bin/query-machine-info
It errors while running:
# /usr/bin/query-machine-info
jq: error while loading shared libraries: libm.so.6: ELF load command address/offset not page-aligned
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
Have you installed dmidecode and jc?
I've not explicitly installed them, but they are installed:
$ apt-cache policy dmidecode
dmidecode:
Installed: 3.4-1
Candidate: 3.4-1
Version table:
*** 3.4-1 500
500 http://deb.debian.org/debian bookworm/main arm64 Packages
100 /var/lib/dpkg/status
$ apt-cache policy jc
jc:
Installed: 1.22.5-1
Candidate: 1.22.5-1
Version table:
*** 1.22.5-1 500
500 http://deb.debian.org/debian bookworm/main arm64 Packages
500 http://deb.debian.org/debian bookworm/main armhf Packages
100 /var/lib/dpkg/status
Would yout be convenient to provide the complete output of cat /proc/cpuinfo and lscpu?
$ cat /proc/cpuinfo
processor : 0
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1
processor : 1
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1
processor : 2
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1
processor : 3
BogoMIPS : 108.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x4
CPU part : 0xd0b
CPU revision : 1
Revision : d04170
Serial : a1d26b9c00626123
Model : Raspberry Pi 5 Model B Rev 1.0
$ lscpu
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: ARM
Model name: Cortex-A76
Model: 1
Thread(s) per core: 1
Core(s) per cluster: 4
Socket(s): -
Cluster(s): 1
Stepping: r4p1
CPU(s) scaling MHz: 62%
CPU max MHz: 2400.0000
CPU min MHz: 1500.0000
BogoMIPS: 108.00
Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp
Caches (sum of all):
L1d: 256 KiB (4 instances)
L1i: 256 KiB (4 instances)
L2: 2 MiB (4 instances)
L3: 2 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-3
Vulnerabilities:
Gather data sampling: Not affected
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Reg file data sampling: Not affected
Retbleed: Not affected
Spec rstack overflow: Not affected
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; __user pointer sanitization
Spectre v2: Mitigation; CSV2, BHB
Srbds: Not affected
Tsx async abort: Not affected
I wonder if this is due having to specify the arch in /etc/apt/sources.list.d/pveport.list?
$ apt-cache policy jq
jq:
Installed: (none)
Candidate: 1.6-2.1
Version table:
1.6-2.1 500
500 http://deb.debian.org/debian bookworm/main arm64 Packages
$ which jq
/usr/bin/jq
$ dpkg -S /usr/bin/jq
jq:armhf: /usr/bin/jq
$ apt-cache policy jq:armhf
jq:armhf:
Installed: 1.6-2.1
Candidate: 1.6-2.1
Version table:
*** 1.6-2.1 500
500 http://deb.debian.org/debian bookworm/main armhf Packages
100 /var/lib/dpkg/status
It seems that armhf's jq uses arm64 libraries, causing incompatibility issues, not my code. But this also needs me to fix, to avoid such a situation. You can install jq:arm64 I don't understand why the Raspberry PI still uses armhf, even though it is hardware supported
Sorry for the delay - I've been away.
apt install jq:arm64
was successful, as was:
# /usr/bin/query-machine-info
# cat /run/pve/query-machine-info
[
{
"cpu": "Cortex-A76"
}
]
Installing the latest pveproxy and restarting the service is also now successful:
# apt install libpve-common-perl=8.2.9+port1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libjq1:armhf libonig5:armhf
Use 'apt autoremove' to remove them.
The following packages will be upgraded:
libpve-common-perl
1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Need to get 0 B/118 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Reading changelogs... Done
(Reading database ... 99718 files and directories currently installed.)
Preparing to unpack .../libpve-common-perl_8.2.9+port1_arm64.deb ...
Unpacking libpve-common-perl (8.2.9+port1) over (8.2.9+port) ...
Setting up libpve-common-perl (8.2.9+port1) ...
Processing triggers for pve-manager (8.3.3) ...
Processing triggers for pve-ha-manager (4.0.6) ...
# systemctl restart pveproxy
# pveproxy status
running
The perl script could be adjusted to check for an empty file and treat it the same as if the file didn't exist, and it probably should. But I guess the wider issue as around the architecture being messed up somewhere.
I believe I followed this guide that suggests doing
echo 'deb [arch=arm64] https://mirrors.apqa.cn/proxmox/debian/pve bookworm port'>/etc/apt/sources.list.d/pveport.list
, but I also recall that somewhere in the process this was modified by dpkg which then broke further updates
According to my apt logs, I ran the following to install proxmox:
Start-Date: 2025-01-23 10:47:22
Commandline: apt install proxmox-ve postfix open-iscsi
Setting up pve-manager (8.3.2+port) ...
Configuration file '/etc/apt/sources.list.d/pveport.list'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** pveport.list (Y/I/N/O/D/Z) [default=N] ? D
ESC[?1hESC=^M--- /etc/apt/sources.list.d/pveport.list 2025-01-23 10:36:16.733205714 +0000ESC[m
+++ /etc/apt/sources.list.d/pveport.list.dpkg-new 2024-12-26 21:23:21.000000000 +0000ESC[m
@@ -1 +1 @@ESC[m
-deb [arch=arm64] https://mirrors.apqa.cn/proxmox/debian/pve bookworm portESC[m
+deb https://mirrors.apqa.cn/proxmox/debian/pve bookworm portESC[m
\ No newline at end of fileESC[m
^MESC[KESC[?1lESC>
Configuration file '/etc/apt/sources.list.d/pveport.list'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** pveport.list (Y/I/N/O/D/Z) [default=N] ? I
Installing new version of config file /etc/apt/sources.list.d/pveport.list ...
update successful
I recall that the next time I tried to do an apt update, things went wrong, so I reverted back
Describe the bug
Doing an apt upgrade recently, the web UI failed to come up. Downgrading libpve-common-perl from 8.2.9+port1 to 8.2.9+port fixed the issue.
To Reproduce Steps to reproduce the behavior:
Checking the logs revealed perl compilation issues
Checking what apt had changed (/var/log/apt/history.log):
Suspecting a perl issue, I noted
libpve-common-perl:arm64 (8.2.9+port, 8.2.9+port1)
Rolling back this package
apt install libpve-common-perl=8.2.9+port
then restarting pveproxy fixed the issueExpected behavior
Web UI comes up as normal
Screenshots If applicable, add screenshots to help explain your problem.
ENV (please complete the following information):
Additional context None yet