-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
param save: Add a blocking API for param saves to be used from shell. #21737
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hey @ThomasDebrunner thanks for the PR. Would you mind fixing the style check test? |
5a417ed
to
670cf89
Compare
Fixed style |
bkueng
reviewed
Jun 20, 2023
670cf89
to
1669662
Compare
bkueng
approved these changes
Jun 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI failure is unrelated, something with the Micro-XRCE-DDS-Client update.
FAILED: src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-configure
cd /__w/PX4-Autopilot/PX4-Autopilot/build/emlid_navio2_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-build && /usr/bin/cmake -P /__w/PX4-Autopilot/PX4-Autopilot/build/emlid_navio2_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-configure-RelWithDebInfo.cmake && /usr/bin/cmake -E touch /__w/PX4-Autopilot/PX4-Autopilot/build/emlid_navio2_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-configure
CMake Error at /__w/PX4-Autopilot/PX4-Autopilot/build/emlid_navio2_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-configure-RelWithDebInfo.cmake:16 (message):
Command failed: 1
'/usr/bin/cmake' '-C/__w/PX4-Autopilot/PX4-Autopilot/build/emlid_navio2_default/src/modules/uxrce_dds_client/tmp/libmicroxrceddsclient_project-cache-RelWithDebInfo.cmake' '-GNinja' '/__w/PX4-Autopilot/PX4-Autopilot/src/modules/uxrce_dds_client/Micro-XRCE-DDS-Client'
See also
/__w/PX4-Autopilot/PX4-Autopilot/build/emlid_navio2_default/src/modules/uxrce_dds_client/src/libmicroxrceddsclient_project-stamp/libmicroxrceddsclient_project-configure-*.log
EDIT: the cmake version in the container px4io/px4-dev-armhf
is too old:
CMake Error at CMakeLists.txt:18 (cmake_minimum_required):
CMake 3.16 or higher is required. You are running version 3.13.4
This was referenced Jun 21, 2023
MaEtUgR
added a commit
that referenced
this pull request
Jun 27, 2023
This solves the CI problem related to the required cmake version described here: #21737 (review) See PX4/PX4-containers#332 for the container changes.
MaEtUgR
added a commit
that referenced
this pull request
Jun 27, 2023
This solves the CI problem related to the required cmake version described here: #21737 (review) See PX4/PX4-containers#332 for the container changes.
harrisondragoon
pushed a commit
to harrisondragoon/PX4-Autopilot
that referenced
this pull request
Jun 30, 2023
This solves the CI problem related to the required cmake version described here: PX4#21737 (review) See PX4/PX4-containers#332 for the container changes.
antbre
pushed a commit
to BioMorphic-Intelligence-Lab/PX4-Autopilot
that referenced
this pull request
Sep 14, 2023
This solves the CI problem related to the required cmake version described here: PX4#21737 (review) See PX4/PX4-containers#332 for the container changes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solved Problem
After the latest param rework, the file lock in
param_save_default
was changed to atrylock
, to prevent any blocking in the param system. This makesparam_save_default
occasionally fail, if it is called from multiple threads at the same time. This is correct, but unexpected especially when used from the shell.Solution
This changes the
param_save_default
function to have be either blocking or non-blocking.From the shell and from modules that expect a synchronous API, the blocking version is called. From the work queue, the non blocking version is called.
This also modifies the autosave worker, to re-schedule writing up to three times, in case writes fail.
Changelog Entry
For release notes:
Alternatives
As an alternative, we could disable the autosave worker in the CI tests. This would solve the error in the CI tests. But still, a user typing in
param save
could still hit it then.Test coverage