Closed jagtonomy closed 9 months ago
I confirm this issue on the latest version 4.2.1
This issue does not exist on version 4.1.5 (will be reverting to for now).
4.2.1 crashes every 6.x minutes (can time it). The service runs without incident unless called. i.e. when jtop
is running (command line strings or GUI front), it will crash in 6 minutes.
jtop
Traceback (most recent call last):
File "/usr/local/bin/jtop", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/jtop/__main__.py", line 160, in main
loop=args.loop, seconds=LOOP_SECONDS, color_filter=color_filter)
File "/usr/lib/python3.6/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopgui.py", line 100, in __init__
self.run(loop, seconds)
File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopgui.py", line 129, in run
self.draw()
File "/usr/local/lib/python3.6/dist-packages/jtop/gui/jtopgui.py", line 143, in draw
page.draw(self.key, self.mouse)
File "/usr/local/lib/python3.6/dist-packages/jtop/gui/pall.py", line 147, in draw
line_counter += self.process_table.draw(line_counter, 0, width, height_free_area, key, mouse)
File "/usr/local/lib/python3.6/dist-packages/jtop/gui/lib/process_table.py", line 70, in draw
sorted_processes = sorted(processes, key=lambda x: x[self.line_sort], reverse=self.type_reverse)
File "/usr/local/lib/python3.6/dist-packages/jtop/gui/lib/process_table.py", line 70, in <lambda>
sorted_processes = sorted(processes, key=lambda x: x[self.line_sort], reverse=self.type_reverse)
IndexError: list index out of range
jetson_release -v Software part of jetson-stats 4.2.1 - (c) 2023, Raffaello Bonghi Model: Jetson-AGX - Jetpack 4.6 [L4T 32.6.1] NV Power Mode[0]: MAXN Hardware:
I seem to have been able to work around this issue (Note: I am using Docker). Instead of the below which worked prior to 4.2.1 (called every 5 seconds)
jetson = jtop()
jetson.start()
stats = jetson.stats
stats['time'] = stats['time'].isoformat() + 'Z'
stats['uptime'] = iso8601(stats['uptime'])
print(stats)
jetson.close()
I am now using:
with jtop() as jetson:
# jetson.ok() will provide the proper update frequency
while jetson.ok():
# Read tegra stats
print(jetson.json())
sys.stdout.flush()
The above does not seem to crash.
The images (host and Docker) have been updated to 20.04, Jetpack 5.1.1 and L4T 35.3.1
Also seeing this on 4.2.1
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 159, 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 147, in draw
line_counter += self.process_table.draw(line_counter, 0, width, height_free_area, key, mouse)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/lib/process_table.py", line 70, in draw
sorted_processes = sorted(processes, key=lambda x: x[self.line_sort], reverse=self.type_reverse)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/lib/process_table.py", line 70, in <lambda>
sorted_processes = sorted(processes, key=lambda x: x[self.line_sort], reverse=self.type_reverse)
IndexError: list index out of range
jetson_release -v
Software part of jetson-stats 4.2.1 - (c) 2023, Raffaello Bonghi
Model: NVIDIA Orin NX Developer Kit - Jetpack 5.1 [L4T 35.2.1]
NV Power Mode[0]: MAXN
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
- 699-level Part Number: 699-13767-0000-300 H.2
- P-Number: p3767-0000
- Module: NVIDIA Jetson Orin NX (16GB ram)
- 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.1
- Service: Active
Libraries:
- CUDA: 11.4.315
- cuDNN: 8.6.0.166
- TensorRT: 5.1
- VPI: 2.2.4
- Vulkan: 1.3.204
- OpenCV: 4.5.4 - with CUDA: NO
Seeing this with 4.2.3
ksaye@xavier:~$ 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 159, 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 147, in draw
line_counter += self.process_table.draw(line_counter, 0, width, height_free_area, key, mouse)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/lib/process_table.py", line 70, in draw
sorted_processes = sorted(processes, key=lambda x: x[self.line_sort], reverse=self.type_reverse)
File "/usr/local/lib/python3.8/dist-packages/jtop/gui/lib/process_table.py", line 70, in <lambda>
sorted_processes = sorted(processes, key=lambda x: x[self.line_sort], reverse=self.type_reverse)
IndexError: list index out of range
ksaye@xavier:~$ jetson_release -v
Software part of jetson-stats 4.2.3 - (c) 2023, Raffaello Bonghi
Model: Jetson-AGX - Jetpack 5.1.2 [L4T 35.4.1]
NV Power Mode[3]: MODE_30W_ALL
Serial Number: [XXX Show with: jetson_release -s XXX]
Hardware:
- 699-level Part Number: 699-82888-0004-400 L.0
- P-Number: p2888-0004
- Module: NVIDIA Jetson AGX Xavier (32 GB ram)
- SoC: tegra194
- CUDA Arch BIN: 7.2
- Codename: Galen
Platform:
- Machine: aarch64
- System: Linux
- Distribution: Ubuntu 20.04 focal
- Release: 5.10.120-tegra
- Python: 3.8.10
jtop:
- Version: 4.2.3
- Service: Active
Libraries:
- CUDA: 11.4.315
- cuDNN: 8.6.0.166
- TensorRT: 8.5.2.2
- VPI: 2.3.9
- Vulkan: 1.3.204
- OpenCV: 4.5.4 - with CUDA: NO
As a workaround, I modified line 70 in '/usr/local/lib/python3.8/dist-packages/jtop/gui/lib/process_table.py' to be:
# Sort table for selected line
try:
sorted_processes = processes
sorted_processes = sorted(processes, key=lambda x: x[self.line_sort], reverse=self.type_reverse)
except:
pass
# Draw all processes
I apologize for my really late reply, but looking at this thread, I know how to fix it! Thank you in advance for this support!
The next jtop release will fix this bug!
Thank you, @ksaye; I added your workaround on top. I'll release the new update on the next jetson-stats release
Describe the bug
jtop crashes after running for a while
To Reproduce
Runs fine for a while. Time until failure is not deterministic. It happened twice after running for just a few minutes, but it can run fine for a longer time. The Traceback is always the same. Can be restarted after the crash.
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots to help explain your problem.
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
Board
Output from
jetson_release -v
:Log from jtop.service
Attach here the output from:
journalctl -u jtop.service -n 100 --no-pager
Log from jetson-stats installation
Attach here the output from:
sudo -H pip3 install --no-cache-dir -U jetson-stats