Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 703154

Summary: dev-python/psutil-5.6.7 fails test
Product: Gentoo Linux Reporter: Alexey <alexey+gentoo>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED OBSOLETE    
Severity: normal CC: eike, jstein
Priority: Normal Keywords: TESTFAILURE
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/giampaolo/psutil/issues/1635
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
build.log

Description Alexey 2019-12-16 22:15:11 UTC
======================================================================                                                                                                                                                                                                            
FAIL: psutil.tests.test_system.TestSystemAPIs.test_cpu_times_comparison                                                                                                                                                                                                           
----------------------------------------------------------------------                                                                                                                                                                                                            
Traceback (most recent call last):                                                                                                                                                                                                                                                
  File "/mnt/portagetmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_system.py", line 386, in test_cpu_times_comparison                                                                                                                      
    getattr(base, field), getattr(summed_values, field), delta=1)                                                                                                                                                                                                                 
AssertionError: 565887.21 != 565855.46 within 1 delta                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                                  
======================================================================                                                                                                                                                                                                            
FAIL: psutil.tests.test_linux.TestSystemCPUCountLogical.test_against_nproc                                                                                                                                                                                                        
----------------------------------------------------------------------                                                                                                                                                                                                            
Traceback (most recent call last):                                                                                                                                                                                                                                                
  File "/mnt/portagetmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 640, in test_against_nproc                                                                                                                              
    self.assertEqual(psutil.cpu_count(logical=True), num)                                                                                                                                                                                                                         
AssertionError: 5 != 8                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                  
======================================================================                                                                                                                                                                                                            
FAIL: psutil.tests.test_linux.TestSystemCPUCountLogical.test_against_sysdev_cpu_num                                                                                                                                                                                               
----------------------------------------------------------------------                                                                                                                                                                                                            
Traceback (most recent call last):                                                                                                                                                                                                                                                
  File "/mnt/portagetmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 635, in test_against_sysdev_cpu_num                                                                                                                     
    self.assertEqual(psutil.cpu_count(), count)                                                                                                                                                                                                                                   
AssertionError: 5 != 8                                                                                                                                                                                                                                                            
                                                                                                                                                                                                                                                                                  
======================================================================                                                                                                                                                                                                            
FAIL: psutil.tests.test_linux.TestSystemCPUCountPhysical.test_against_lscpu                                                                                                                                                                                                       
----------------------------------------------------------------------                                                                                                                                                                                                            
Traceback (most recent call last):                                                                                                                                                                                                                                                
  File "/mnt/portagetmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 693, in test_against_lscpu                                                                                                                              
    self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))                                                                                                                                                                                                              
AssertionError: 5 != 3
Comment 1 Alexey 2019-12-16 22:15:36 UTC
Created attachment 599918 [details]
emerge --info
Comment 2 Alexey 2019-12-16 22:15:59 UTC
Created attachment 599920 [details]
build.log
Comment 3 Rolf Eike Beer archtester 2019-12-18 20:13:21 UTC
Please paste the output of "lscpu", "lscpu -p", "nproc", and "cat /proc/cpuinfo", and ideally open a bug report with the relevant information also on https://github.com/giampaolo/psutil.
Comment 4 Alexey 2019-12-19 01:11:01 UTC
$ lscpu

Architecture:         x86_64
CPU op-mode(s):       32-bit, 64-bit
Byte Order:           Little Endian
Address sizes:        48 bits physical, 48 bits virtual
CPU(s):               8
On-line CPU(s) list:  0-4
Off-line CPU(s) list: 5-7
Thread(s) per core:   1
Core(s) per socket:   3
Socket(s):            1
Vendor ID:            AuthenticAMD
CPU family:           21
Model:                2
Model name:           AMD FX(tm)-8350 Eight-Core Processor
Stepping:             0
CPU MHz:              3652.770
BogoMIPS:             8668.51
Virtualization:       AMD-V
L1d cache:            16K
L1i cache:            64K
L2 cache:             2048K
L3 cache:             8192K
Flags:                fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate ssbd vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold

$ lscpu -p

# The following is the parsable format, which can be fed to other
# programs. Each different item in every column has an unique ID
# starting from zero.
# CPU,Core,Socket,Node,,L1d,L1i,L2,L3
0,0,0,,,0,0,0,0
1,0,0,,,1,0,0,0
2,1,0,,,2,1,1,0
3,1,0,,,3,1,1,0
4,2,0,,,4,2,2,0

$ nproc

5

$ cat /proc/cpuinfo

processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 2
model name	: AMD FX(tm)-8350 Eight-Core Processor
stepping	: 0
microcode	: 0x6000822
cpu MHz		: 4161.845
cache size	: 2048 KB
physical id	: 0
siblings	: 5
core id		: 0
cpu cores	: 3
apicid		: 16
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate ssbd vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
bugs		: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips	: 8668.51
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro

processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 2
model name	: AMD FX(tm)-8350 Eight-Core Processor
stepping	: 0
microcode	: 0x6000822
cpu MHz		: 3995.585
cache size	: 2048 KB
physical id	: 0
siblings	: 5
core id		: 1
cpu cores	: 3
apicid		: 17
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate ssbd vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
bugs		: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips	: 8668.51
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro

processor	: 2
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 2
model name	: AMD FX(tm)-8350 Eight-Core Processor
stepping	: 0
microcode	: 0x6000822
cpu MHz		: 3834.418
cache size	: 2048 KB
physical id	: 0
siblings	: 5
core id		: 2
cpu cores	: 3
apicid		: 18
initial apicid	: 2
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate ssbd vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
bugs		: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips	: 8668.51
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro

processor	: 3
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 2
model name	: AMD FX(tm)-8350 Eight-Core Processor
stepping	: 0
microcode	: 0x6000822
cpu MHz		: 3637.333
cache size	: 2048 KB
physical id	: 0
siblings	: 5
core id		: 3
cpu cores	: 3
apicid		: 19
initial apicid	: 3
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate ssbd vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
bugs		: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips	: 8668.51
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro

processor	: 4
vendor_id	: AuthenticAMD
cpu family	: 21
model		: 2
model name	: AMD FX(tm)-8350 Eight-Core Processor
stepping	: 0
microcode	: 0x6000822
cpu MHz		: 3569.188
cache size	: 2048 KB
physical id	: 0
siblings	: 5
core id		: 4
cpu cores	: 3
apicid		: 20
initial apicid	: 4
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 popcnt aes xsave avx f16c lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm topoext perfctr_core perfctr_nb cpb hw_pstate ssbd vmmcall bmi1 arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold
bugs		: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips	: 8668.51
TLB size	: 1536 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 48 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb eff_freq_ro
Comment 5 Rolf Eike Beer archtester 2020-04-12 17:23:09 UTC
A similar failure happens on my HP C800 (hppa):

FAIL: psutil.tests.test_linux.TestSystemCPUCountPhysical.test_against_lscpu
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 693, in test_against_lscpu
    self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))
AssertionError: 2 != 4

lscpu output:

Architecture:        parisc64
Byte Order:          Big Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  2
Socket(s):           2
CPU family:          PA-RISC 2.0
Model:               9000/785/C8000
Model name:          PA8800 (Mako)
CPU MHz:             1000.000000
BogoMIPS:            1988.60

This machine has 2 socket, both with a dual-core CPU (no hyperthreading):

chroot ~ #  cat /proc/cpuinfo 
processor       : 0
cpu family      : PA-RISC 2.0
cpu             : PA8800 (Mako)
cpu MHz         : 1000.000000
physical id     : 0
siblings        : 2
core id         : 0
capabilities    : os64 iopdir_fdc needs_equivalent_aliasing (0x35)
model           : 9000/785/C8000
model name      : Crestone Peak Fast?
hversion        : 0x000088b0
sversion        : 0x00000491
I-cache         : 32768 KB
D-cache         : 32768 KB (WB, direct mapped)
ITLB entries    : 240
DTLB entries    : 240 - shared with ITLB
bogomips        : 1988.60
software id     : 6266852346624179925

processor       : 1
cpu family      : PA-RISC 2.0
cpu             : PA8800 (Mako)
cpu MHz         : 1000.000000
physical id     : 0
siblings        : 2
core id         : 1
capabilities    : os64 iopdir_fdc needs_equivalent_aliasing (0x35)
model           : 9000/785/C8000
model name      : Crestone Peak Fast?
hversion        : 0x000088b0
sversion        : 0x00000491
I-cache         : 32768 KB
D-cache         : 32768 KB (WB, direct mapped)
ITLB entries    : 240
DTLB entries    : 240 - shared with ITLB
bogomips        : 1988.60
software id     : 6266852346624179925

processor       : 2
cpu family      : PA-RISC 2.0
cpu             : PA8800 (Mako)
cpu MHz         : 1000.000000
physical id     : 1
siblings        : 2
core id         : 0
capabilities    : os64 iopdir_fdc needs_equivalent_aliasing (0x35)
model           : 9000/785/C8000
model name      : Crestone Peak Fast?
hversion        : 0x000088b0
sversion        : 0x00000491
I-cache         : 32768 KB
D-cache         : 32768 KB (WB, direct mapped)
ITLB entries    : 240
DTLB entries    : 240 - shared with ITLB
bogomips        : 1988.60
software id     : 6266852346624179925

processor       : 3
cpu family      : PA-RISC 2.0
cpu             : PA8800 (Mako)
cpu MHz         : 1000.000000
physical id     : 1
siblings        : 2
core id         : 1
capabilities    : os64 iopdir_fdc needs_equivalent_aliasing (0x35)
model           : 9000/785/C8000
model name      : Crestone Peak Fast?
hversion        : 0x000088b0
sversion        : 0x00000491
I-cache         : 32768 KB
D-cache         : 32768 KB (WB, direct mapped)
ITLB entries    : 240
DTLB entries    : 240 - shared with ITLB
bogomips        : 1988.60
software id     : 6266852346624179925
Comment 6 Rolf Eike Beer archtester 2020-04-12 18:00:35 UTC
Fails on hppa:

FAIL: psutil.tests.test_contracts.TestAvailProcessAPIs.test_io_counters
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/psutil-5.7.0/work/psutil-5.7.0-python2_7/lib/psutil/tests/test_contracts.py", line 159, in test_io_counters
    self.assertEqual(hasit, False if MACOS or SUNOS else True)
AssertionError: False != True

======================================================================
FAIL: psutil.tests.test_contracts.TestAvailSystemAPIs.test_cpu_freq
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/psutil-5.7.0/work/psutil-5.7.0-python2_7/lib/psutil/tests/test_contracts.py", line 122, in test_cpu_freq
    linux or MACOS or WINDOWS or FREEBSD)
AssertionError: True != False

======================================================================
FAIL: psutil.tests.test_linux.TestSystemCPUCountPhysical.test_against_lscpu
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/psutil-5.7.0/work/psutil-5.7.0-python2_7/lib/psutil/tests/test_linux.py", line 694, in test_against_lscpu
    self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))
AssertionError: 2 != 4