-
Notifications
You must be signed in to change notification settings - Fork 664
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
UHD >= 4.0.0.0 crashes when neither $HOME nor $XDG_CONFIG_HOME are set #713
Comments
thanks for the report! It's maybe worth to note that this is a regression over uhd < 4.0.0.0 where the lack of said environment variables was non-fatal. So basically users of osmo-trx-uhd will upgrade their UHD version (e.g. as part of OS upgrade) and suddenly end up having non-working cellular base stations. |
Hey guys, thanks for reporting this. We have a fix rolling through CI pipelines and review etc. As @marcusmueller writes, the intention was not to require people to specify these vars (although until our patch goes live, that's unfortunately required). The assumption that we could always find a One more detail in case someone reads this at a later time (not directly related to this bug, but about finding images in general): The Bugzilla page is closed, or I would have commented on there, but there is one thing that I would like to point out: @marcusmueller writes that specifically setting a images dir is a good idea, and I would like to add an explanation why. @laf0rge you point out that UHD should simply default to So, production or not, UHD will do its best to find the images (when its not stumbling over bugs introduced by the developers, ahem) but there's no guarantee it can always do that, because between OSes/distros/archs/personal preferences, they could be in all sorts of places. Again, this is unrelated to this bug, and specifying the images dir would not have helped in this case because UHD would still have choked trying to find a HOME directory in case there's a config file. I'm just expanding on @marcusmueller's comment. OK, I need to go back to |
Issue Description
https://osmocom.org/issues/6269
Basically, due to 1383fde , running an UHD-consuming application in an environment where there's no
$HOME
nor$XDG_CONFIG_HOME
fatally errors out.Setup Details
My repro: UHD4.4.0.0 on Fedora38;
unset XDG_RUNTIME_DIR HOME uhd_usrp_probe
yields
Expected Behavior
Running; not being able to find a config file is not fatal!
Also, the actual behaviour runs afoul of documentation:
Actual Behaviour
[INFO] [UHD] linux; GNU C++ version 13.0.1 20230127 (Red Hat 13.0.1-0); Boost_107800; UHD_4.4.0.0
[INFO] [B200] Loading firmware image: /usr/share/uhd/images/usrp_b200_fw.hex...
Error: RuntimeError: get_xdg_config_home(): Unable to find $HOME or $XDG_CONFIG_HOME.
Steps to reproduce the problem
unset XDG_RUNTIME_DIR HOME
uhd_usrp_probe
Additional Information
Issue arises when UHD-consuming Osmocom software is launched via systemd service.
The text was updated successfully, but these errors were encountered: