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

Crash if dpkg is missing #521

Open
evildeeds opened this issue May 15, 2024 · 1 comment
Open

Crash if dpkg is missing #521

evildeeds opened this issue May 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@evildeeds
Copy link

evildeeds commented May 15, 2024

Describe the bug

If dpkg is missing, for example if the system is a custom built yocto with meta-tegra then the following line will cuse an exception

dpkg = Command(['dpkg', '--get-selections'])
on line 204

To Reproduce

  1. Install jetson_stats on a system without dpkg; or forcefully unistall dpkg; or change line 203 to an invalid command
  2. Remove or rename /etc/nv_tegra_release if it exists
  3. (re-)start the jtop service
  4. See error in service log

Expected behavior

Looking at the function get_nvidia_l4t the intended behavior I would expect is to fail the version detection and return an empty string instead of crashing.

Perhaps check that dpkg exist first and if not then return false from check_dpkg_nvidia_l4t_core.

Board

  • jetson-stats version: 4.2.7
  • Jetpack: 5.1.3
  • L4T: 35.5.0
@evildeeds evildeeds added the bug Something isn't working label May 15, 2024
@evildeeds
Copy link
Author

My solution will be to populate my image with /etc/nv_tegra_release

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

1 participant