Upgrade PMG from 6 to 7

pmguser

New Member
Mar 21, 2022
5
0
1
34
Hello,

we have finished the upgrade from PMG (6-to-7) like the documentation.

Now on the dashboard (and the cluster view) on both nodes of the (2 node) cluster we get the following error:
Code:
500 Illegal division by zero at /usr/share/perl5/PVE/ProcFSTools.pm line 221

The error looks like an error while reading CPU data.
If we reboot the nodes the data is shown correctly, then the error occurs some minutes later.
The cluster features (like adding domains etc) are allready working as expected.
 
Hi,
could you share the output of
Code:
lscpu
cat /proc/stat
perl -e 'use POSIX; print POSIX::sysconf(&POSIX::_SC_CLK_TCK)."\n";'
and the output of
Code:
for i in {1..10}; do sleep 0.$i; head -n 1 /proc/stat; done
once the issue appears?
 
Hello Fabian,

the output from both machines:

Code:
###########################################################master########################################

root@server1 ~ # lscpu

Architecture:        x86_64

CPU op-mode(s):      32-bit, 64-bit

Byte Order:          Little Endian

Address sizes:       46 bits physical, 48 bits virtual

CPU(s):              8

On-line CPU(s) list: 0-7

Thread(s) per core:  1

Core(s) per socket:  4

Socket(s):           2

Vendor ID:           GenuineIntel

CPU family:          6

Model:               45

Model name:          Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz

Stepping:            7

CPU MHz:             2191.192

BogoMIPS:            3799.74

Virtualization:      VT-x

Hypervisor vendor:   Parallels

Virtualization type: container

L1d cache:           256 KiB

L1i cache:           256 KiB

L2 cache:            2 MiB

L3 cache:            30 MiB

Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx f

                     xsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_

                     good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx sm

                     x est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsa

                     ve avx lahf_lm ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida

                     arat pln pts md_clear spec_ctrl intel_stibp flush_l1d


root@server1 ~ # cat /proc/stat

cpu  1939 0 856 171257 0 0 0 0

cpu0 294 0 89 21371 0 0 0 0

cpu1 346 0 142 21266 0 0 0 0

cpu2 122 0 67 21575 0 0 0 0

cpu3 330 0 144 21307 0 0 0 0

cpu4 197 0 61 21482 0 0 0 0

cpu5 290 0 124 21339 0 0 0 0

cpu6 112 0 67 21558 0 0 0 0

cpu7 245 0 159 21354 0 0 0 0

intr 0

swap 0 0


ctxt 56672

btime 1649060139

processes 2814

procs_running 1

procs_blocked 0


root@server1 ~ # perl -e 'use POSIX; print POSIX::sysconf(&POSIX::_SC_CLK_TCK)."\n";'

100


root@server1 ~ # for i in {1..10}; do sleep 0.$i; head -n 1 /proc/stat; done

cpu  1945 0 859 204995 0 0 0 0

cpu  1945 0 859 205157 0 0 0 0

cpu  1945 0 860 205400 0 0 0 0

cpu  1945 0 860 205722 0 0 0 0

cpu  1945 0 860 206125 0 0 0 0

cpu  1946 0 861 206607 0 0 0 0

cpu  1946 0 861 207170 0 0 0 0

cpu  1946 0 861 207812 0 0 0 0

cpu  1946 0 861 208534 0 0 0 0

cpu  1946 0 862 208617 0 0 0 0


#########################################NODE###########################################################

root@server2 ~ # lscpu

Architecture:        x86_64

CPU op-mode(s):      32-bit, 64-bit

Byte Order:          Little Endian

Address sizes:       46 bits physical, 48 bits virtual

CPU(s):              8

On-line CPU(s) list: 0-7

Thread(s) per core:  1

Core(s) per socket:  4

Socket(s):           2

Vendor ID:           GenuineIntel

CPU family:          6

Model:               45

Model name:          Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz

Stepping:            7

CPU MHz:             2199.890

BogoMIPS:            3799.74

Virtualization:      VT-x

Hypervisor vendor:   Parallels

Virtualization type: container

L1d cache:           256 KiB

L1i cache:           256 KiB

L2 cache:            2 MiB

L3 cache:            30 MiB

Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx f

                     xsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_

                     good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx sm

                     x est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsa

                     ve avx lahf_lm ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida

                     arat pln pts md_clear spec_ctrl intel_stibp flush_l1d


root@server2 ~ # cat /proc/stat

cpu  1892 0 844 227948 0 0 0 0

cpu0 72 0 73 28685 0 0 0 0

cpu1 351 0 155 28349 0 0 0 0

cpu2 129 0 53 28638 0 0 0 0

cpu3 408 0 154 28287 0 0 0 0

cpu4 187 0 54 28585 0 0 0 0

cpu5 204 0 119 28506 0 0 0 0

cpu6 132 0 75 28619 0 0 0 0

cpu7 406 0 157 28275 0 0 0 0

intr 0

swap 0 0


ctxt 58052

btime 1649060160

processes 2817

procs_running 1

procs_blocked 0


root@server2 ~ # perl -e 'use POSIX; print POSIX::sysconf(&POSIX::_SC_CLK_TCK)."\n";'

100


root@server2 ~ # for i in {1..10}; do sleep 0.$i; head -n 1 /proc/stat; done

cpu  1899 0 851 242564 0 0 0 0

cpu  1899 0 851 242727 0 0 0 0

cpu  1899 0 852 242969 0 0 0 0

cpu  1899 0 852 243292 0 0 0 0

cpu  1899 0 852 243695 0 0 0 0

cpu  1899 0 853 244177 0 0 0 0

cpu  1899 0 853 244740 0 0 0 0

cpu  1899 0 853 245382 0 0 0 0

cpu  1900 0 854 246103 0 0 0 0

cpu  1900 0 854 246186 0 0 0 0
 
Are there really only 8 numbers after cpu in /proc/stat or was the output cut off? Our code expects 10 so that might be causing issues. Could you also post the ouput of pmgversion -v?
 
There are only 8 digits after
Code:
cpu
in
Code:
/proc/stat
.

the Output from
Code:
pmgversion -v
is:
Code:
proxmox-mailgateway: 7.1-1 (API: 7.1-2/75d043b3, running kernel: 5.10.0)
pmg-api: 7.1-2
pmg-gui: 3.1-2
pve-kernel-helper: 7.1-13
pve-kernel-5.13: 7.1-9
pve-kernel-5.4: 6.4-15
pve-kernel-5.13.19-6-pve: 5.13.19-14
pve-kernel-5.4.174-2-pve: 5.4.174-2
pve-kernel-5.4.162-1-pve: 5.4.162-2
clamav-daemon: 0.103.5+dfsg-0+deb11u1
ifupdown: 0.8.36
libarchive-perl: 3.4.0-1
libjs-extjs: 7.0.0-1
libjs-framework7: 4.4.7-1
libproxmox-acme-perl: 1.4.1
libproxmox-acme-plugins: 1.4.1
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.1-3
libpve-http-server-perl: 4.1-1
libxdgmime-perl: 1.0-1
lvm2: not correctly installed
pmg-docs: 7.1-2
pmg-i18n: 2.6-2
pmg-log-tracker: 2.3.1-1
postgresql-13: 13.5-0+deb11u1
proxmox-mini-journalreader: 1.3-1
proxmox-spamassassin: 3.4.6-4
proxmox-widget-toolkit: 3.4-7
pve-firmware: 3.3-6
pve-xtermjs: 4.16.0-1
 
There are only 8 digits after
Code:
cpu
in
Code:
/proc/stat
.

the Output from
Code:
pmgversion -v
is:

Code:
proxmox-mailgateway: 7.1-1 (API: 7.1-2/75d043b3, running kernel: 5.10.0)
That's not one of the kernels listed below. Could you also post the output of uname -a? Is the mail gateway running as a container?
Code:
pmg-api: 7.1-2
pmg-gui: 3.1-2
pve-kernel-helper: 7.1-13
pve-kernel-5.13: 7.1-9
pve-kernel-5.4: 6.4-15
pve-kernel-5.13.19-6-pve: 5.13.19-14
pve-kernel-5.4.174-2-pve: 5.4.174-2
pve-kernel-5.4.162-1-pve: 5.4.162-2
clamav-daemon: 0.103.5+dfsg-0+deb11u1
ifupdown: 0.8.36
libarchive-perl: 3.4.0-1
libjs-extjs: 7.0.0-1
libjs-framework7: 4.4.7-1
libproxmox-acme-perl: 1.4.1
libproxmox-acme-plugins: 1.4.1
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.1-3
libpve-http-server-perl: 4.1-1
libxdgmime-perl: 1.0-1
lvm2: not correctly installed
pmg-docs: 7.1-2
pmg-i18n: 2.6-2
pmg-log-tracker: 2.3.1-1
postgresql-13: 13.5-0+deb11u1
proxmox-mini-journalreader: 1.3-1
proxmox-spamassassin: 3.4.6-4
proxmox-widget-toolkit: 3.4-7
pve-firmware: 3.3-6
pve-xtermjs: 4.16.0-1
 
Hello Fabian,

Code:
 uname -a
Code:
 Linux pmg-servername 5.10.0 #1 SMP Thu Sep 23 18:26:47 MSK 2021 x86_64 GNU/Linux

The PMG is running as a container - correct.
 
Since lscpu mentions "Parallels", how exactly do you run the container? Is the kernel running below the container really a proper Linux kernel (those should have all ten values since version 2.6.33)?

I sent a patch for discussion to the mailing list, but it still would be nice to know why exactly the values are missing.
 
  • Like
Reactions: Stoiko Ivanov
The kernel running below the Container is using Virtuozzo 7 with Kernel 3.10.0.
On the Hostnode all 10 Digits are reachable. Only in the Container they are missing.
The Patch you have sent to the mailing list is working. Now the error doesn't occurs any more.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!