Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] ZeroDivisionError: integer division or modulo by zero #492

Open
spacepirate0001 opened this issue Feb 15, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@spacepirate0001
Copy link

Describe the bug

After install latest jetson_stats v4.2.6 jtop command comes back with the following error:

sudo jtop
Traceback (most recent call last):
  File "/usr/local/bin/jtop", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/jtop/__main__.py", line 160, in main
    curses.wrapper(JTOPGUI, jetson, pages, init_page=args.page,
  File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 100, in __init__
    self.run(loop, seconds)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 129, in run
    self.draw()
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/jtopgui.py", line 143, in draw
    page.draw(self.key, self.mouse)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/pall.py", line 190, in draw
    func(self.stdscr, pos_y_mini_menu, column_width * nline, column_width, column_height, self.jetson)
  File "/usr/local/lib/python3.8/dist-packages/jtop/gui/pengine.py", line 115, in compact_engines
    size_eng = size_table // len(row) - 1
ZeroDivisionError: integer division or modulo by zero

To Reproduce

Install jetson_stats: sudo pip3 install -U jetson-stats
Run jetson_stats: sudo jtop
Error: ZeroDivisionError: integer division or modulo by zero

Expected behavior

jtop runs jetson_stats program

Additional context

Installed an older version sudo pip3 install -U jetson-stats==4.2.0
This works but Jetpack info seems missing
2023-11-20_19-42-33

apt-cache show nvidia-jetpack
Package: nvidia-jetpack
Status: install ok installed
Priority: standard
Section: metapackages
Installed-Size: 194
Maintainer: NVIDIA Corporation
Architecture: arm64
Version: 5.1.1-b56
Depends: nvidia-jetpack-runtime (= 5.1.1-b56), nvidia-jetpack-dev (= 5.1.1-b56)
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8
Homepage: http://developer.nvidia.com/jetson
sudo apt show nvidia-jetpack -a
Package: nvidia-jetpack
Version: 5.1.1-b56
Status: install ok installed
Priority: standard
Section: metapackages
Maintainer: NVIDIA Corporation
Installed-Size: 199 kB
Depends: nvidia-jetpack-runtime (= 5.1.1-b56), nvidia-jetpack-dev (= 5.1.1-b56)
Homepage: http://developer.nvidia.com/jetson
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: NVIDIA Jetpack Meta Package
dpkg-query --show nvidia-l4t-core
nvidia-l4t-core 35.3.1-20230319081403

Board

Output from jetson_release -v:

jetson_release -v
Software part of jetson-stats 4.2.0 - (c) 2023, Raffaello Bonghi
Jetpack missing!
 - Model: NVIDIA Orin NX Developer Kit
 - L4T: 35.3.1
NV Power Mode[0]: MAXN
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
 - Module: Check with sudo
 - SoC: tegra23x
 - CUDA Arch BIN: 8.7
 - Codename: P3768
Platform:
 - Machine: aarch64
 - System: Linux
 - Distribution: Ubuntu 20.04 focal
 - Release: 5.10.104-tegra
 - Python: 3.8.10
jtop:
 - Version: 4.2.0
 - Service: Active
Libraries:
 - CUDA: 11.4.315
 - cuDNN: 8.6.0.166
 - TensorRT: 5.1.1
 - VPI: 2.2.7
 - Vulkan: 1.3.204
 - OpenCV: 4.5.4 - with CUDA: NO

Log from jtop.service

Attach here the output from: journalctl -u jtop.service -n 100 --no-pager

journalctl -u jtop.service -n 100 --no-pager
-- Logs begin at Fri 2024-02-16 02:08:44 CST, end at Fri 2024-02-16 03:17:04 CST. --
Feb 16 02:08:50 HOSTNAME systemd[1]: Started jtop service.
Feb 16 02:08:50 HOSTNAME jtop[2089]: [INFO] jtop.service - jetson_stats 4.2.0 - server loaded
Feb 16 02:08:50 HOSTNAME jtop[2089]: [INFO] jtop.core.hardware - Hardware detected aarch64
Feb 16 02:08:50 HOSTNAME jtop[2089]: [INFO] jtop.core.hardware - NVIDIA Jetson detected L4T=35.3.1
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.service - Running on Python: 3.8.10
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.cpu - Found 6 CPU
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.gpu - GPU "ga10b" status in /sys/devices/platform/17000000.ga10b
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.gpu - GPU "ga10b" frq in /sys/devices/platform/17000000.ga10b/devfreq/17000000.ga10b
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.processes - Process service started
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.memory - Found EMC!
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.memory - Memory service started
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.engine - Special Engine group found: [pvaX]
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.engine - Engines found: [APE DLA NVDEC NVENC NVJPG PVA0 SE VIC]
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.temperature - Found thermal "CV0" in thermal_zone2
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.temperature - Found thermal "CPU" in thermal_zone0
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.temperature - Found thermal "SOC2" in thermal_zone7
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.temperature - Found thermal "SOC0" in thermal_zone5
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.temperature - Found thermal "CV1" in thermal_zone3
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.temperature - Found thermal "GPU" in thermal_zone1
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.temperature - Found thermal "tj" in thermal_zone8
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.temperature - Found thermal "SOC1" in thermal_zone6
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.temperature - Found thermal "CV2" in thermal_zone4
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.power - Alarms VDD_IN - {'crit_alarm': 0, 'max_alarm': 0}
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.power - Alarms VDD_CPU_GPU_CV - {'crit_alarm': 0, 'max_alarm': 0}
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.power - Alarms VDD_SOC - {'crit_alarm': 0, 'max_alarm': 0}
Feb 16 02:08:51 HOSTNAME jtop[2089]: [WARNING] jtop.core.power - Skipped "sum of shunt voltages" /sys/bus/i2c/devices/1-0040/hwmon/hwmon4/in7_label
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.power - Found I2C power monitor
Feb 16 02:08:51 HOSTNAME jtop[2089]: [WARNING] jtop.core.power - Skipped usb-charger type=USB in=usb-charger
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.fan - Fan pwmfan(1) found in /sys/class/hwmon/hwmon3
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.fan - RPM pwm_tach found in /sys/class/hwmon/hwmon0
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.fan - Found nvfancontrol.service
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.jetson_clocks - jetson_clocks found in /usr/bin/jetson_clocks
Feb 16 02:08:51 HOSTNAME jtop[2089]: [INFO] jtop.core.nvpmodel - nvpmodel running in [0]MAXN - Default: 2
Feb 16 02:08:51 HOSTNAME jtop[2163]: [INFO] jtop.service - Initialization service
Feb 16 02:08:51 HOSTNAME jtop[2163]: [INFO] jtop.service - service ready
Feb 16 02:12:16 HOSTNAME jtop[2163]: [INFO] jtop.service - jtop timer thread started 1000ms
Feb 16 02:58:49 HOSTNAME jtop[2163]: [INFO] jtop.service - jtop timer thread close

Log from jetson-stats installation

Attach here the output from: sudo -H pip3 install --no-cache-dir -v -U jetson-stats

Collecting jetson-stats
  Downloading jetson-stats-4.2.6.tar.gz (116 kB)
     |████████████████████████████████| 116 kB 11.5 MB/s

Requirement already satisfied, skipping upgrade: distro in /usr/lib/python3/dist-packages (from jetson-stats) (1.4.0)
Collecting smbus2
  Downloading smbus2-0.4.3-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: jetson-stats
  Building wheel for jetson-stats (setup.py) ... done
  Created wheel for jetson-stats: filename=jetson_stats-4.2.6-py3-none-any.whl size=155129 sha256=3470d944ded55871220431834445069228fbf8f885aa297ab9e2f0103f14044d
  Stored in directory: /root/.cache/pip/wheels/6d/f5/9f/9d6cc7cd24ee2a2c5028fec90ee5bb8e3df0b4eef2436a73a4
Successfully built jetson-stats
Installing collected packages: smbus2, jetson-stats
Successfully installed jetson-stats-4.2.6 smbus2-0.4.3
The jtop.service is not active. Please run:
sudo systemctl restart jtop.service
 sudo pip3 install -U jetson-stats==4.2.0
Collecting jetson-stats==4.2.0
  Downloading jetson-stats-4.2.0.tar.gz (115 kB)
     |████████████████████████████████| 115 kB 12.1 MB/s
Requirement already satisfied, skipping upgrade: distro in /usr/lib/python3/dist-packages (from jetson-stats==4.2.0) (1.4.0)
Requirement already satisfied, skipping upgrade: smbus2 in /usr/local/lib/python3.8/dist-packages (from jetson-stats==4.2.0) (0.4.3)
Building wheels for collected packages: jetson-stats
  Building wheel for jetson-stats (setup.py) ... done
  Created wheel for jetson-stats: filename=jetson_stats-4.2.0-py3-none-any.whl size=154192 sha256=a9275f9187c12ed632f81e0ea121dc51fc0096daaa51c2fcb535b3877588a56b
  Stored in directory: /root/.cache/pip/wheels/9e/1d/20/a0d165ed68c327921af68b3a4cf0de91a79c37d78fad8c2d14
Successfully built jetson-stats
Installing collected packages: jetson-stats
Successfully installed jetson-stats-4.2.0

RAW Data

File from jtop --error-log attached

cat jtop-error.log
--------------------- PLATFORM -------------------------
Machine: aarch64
System: Linux
Distribution: Ubuntu 20.04 focal
Release: 5.10.104-tegra
Python: 3.8.10
-------------------- RAW OUTPUT ------------------------
------------------
/etc/nv_tegra_release:
# R35 (release), REVISION: 3.1, GCID: 32827747, BOARD: t186ref, EABI: aarch64, DATE: Sun Mar 19 15:19:21 UTC 2023
------------------
/sys/firmware/devicetree/base/model:
NVIDIA Orin NX Developer Kit
------------------
/proc/device-tree/nvidia,boardids:
No such file or directory
------------------
/proc/device-tree/compatible:
nvidia,p3768-0000+p3767-0001nvidia,p3767-0001nvidia,tegra234nvidia,tegra23x
------------------
/proc/device-tree/nvidia,dtsfilename:
/media/gary/D/git_project/build-l4t-src/kernel_src/kernel/kernel-5.10/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t23x/p3768/kernel-dts/tegra234-p3767-0001-p3768-0000-a0.dts
------------------
I2C-0:
FAIL
------------------
I2C-1:
FAIL
------------------
I2C-2:
FAIL
------------------
I2C-7:
FAIL

Log from jtop 4.2.0
@spacepirate0001 spacepirate0001 added the bug Something isn't working label Feb 15, 2024
@rbonghi
Copy link
Owner

rbonghi commented Jul 25, 2024

I think this may be related to this old PRs merged in develop and never published: #519 and #523
I'm still working on releasing a new jtop version that fixes all these bugs. otherwise let me know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants