nordlow / compiler-benchmark

Benchmarks compilation speeds of different combinations of languages and compilers.
MIT License
138 stars 18 forks source link

./benchmark --languages=C++ fails: `AttributeError: 'Process' object has no attribute '_cache'` #10

Closed timotheecour closed 10 months ago

timotheecour commented 3 years ago

pip3 install psutil Collecting psutil Downloading psutil-5.8.0-cp39-cp39-macosx_10_9_x86_64.whl (236 kB) |████████████████████████████████| 236 kB 1.6 MB/s Installing collected packages: psutil Successfully installed psutil-5.8.0

python3 --version Python 3.9.4

./benchmark --languages=C++
# Code-generation:
- Generating generated/c++/main.c++ took 0.135 seconds (C++)
- Generating generated/c++/main_t.c++ took 0.135 seconds (C++)

# Benchmark:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/psutil/_common.py", line 447, in wrapper
    ret = self._cache[fun]
AttributeError: 'Process' object has no attribute '_cache'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/psutil/_common.py", line 447, in wrapper
    ret = self._cache[fun]
AttributeError: _cache

During handling of the above exception, another exception occurred:
ringabout commented 3 years ago

a similar issue https://github.com/giampaolo/psutil/issues/1765

And https://github.com/giampaolo/psutil/issues/1826

It seems that psutils doesn't have full features on Macos.

Gerardwx commented 2 years ago

I received this once on Linux.Python 3.9.5 (default, Nov 23 2021, 15:27:38) . It originated from the _logger.debug line below.

```

for p in psutil.process_iter(attrs=('pid', 'ppid', 'exe', 'cmdline')): if 'ssh' == p.name(): _logger.debug(f"{p.pid} {p.ppid()} {p.exe()} {p.cmdline()}")


uname -a
Linux vncbridge.usnan.org 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu-Server 20.04.3 LTS amd64 customized using Cubic on 2021-10-21 16:47"

[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.__version__
'5.9.2'
nordlow commented 2 years ago

I unfortunately not have resources to test on more than recent stable Ubuntu. PRs are always welcome.

nordlow commented 10 months ago

I'm closing this for now.