Executor callbacks are no longer in a predictable order
Les mainteneurs répondent en général sous 1 jour
@wjwwood y travaille déjà.
Depuis le 16/5/2024.
Évaluation
Cette issue n'a pas encore été évaluée.
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 20.04
- Installation type:
- Source
- Version or commit hash:
- DDS implementation:
- Fast-RTPS
- Client library (if applicable):
- rclcpp
Steps to reproduce issue
- Build the https://github.com/boschresearch/ros2_response_time_analysis project against ROS2 Jazzy (note that some minimal changes are required).
- Observe that the results of running the test show that the callbacks are executed in an arbitrary order as compared to the previous ordering which was with respect to the order in which the subscriptions/services were added to the node.
Expected behavior
With ROS2 Eloquent through Iron, the callbacks all executed in the following order, where the ordering was defined by the order in which the subscriptions/services were added to the node.
Actual behavior
With ROS2 Jazzy, the ordering is now arbitrary and not related to the order in which messages were received or the order in which subscriptions were added to the node. The execution order of timers also appears to be affected.
NOTE: While the low, medium, and high subscriptions are processed in the same order that they are transmitted, I believe this to be a fluke as the service and timer callbacks are not processed in the order they were registered or sent. For reference, the callbacks are registered in the following order:
- high
- medium
- low
- srv_high
- srv_medium
- srv_low
- timers (as directed by the test)
And the topics/services are sent in the following order:
- low
- medium
- high
- srv_high
- srv_low
- low
- medium
- high
- srv_high
- srv_low
- srv_medium
- srv_medium
- high
With timers set to expire at 200, 200, 2300, and 2300 milliseconds into the test.
Additional information
I believe this change is a result of #2142 due to the EntityCollection class being based on std::unordered_map where the key is the handle returned by rcl for the timer/subscription/etc. The entities are then added to the wait set in whatever order they are iterated through by the std::unordered_map and thus processed in that order. I haven't had the opportunity to test it, but I believe the ordering could be different from system to system or even run to run as the rcl handle values change.
The default AllocatorMemoryStrategy used in previous versions of rclcpp utilized std:vector for storing rcl handles, which maintained the order in which they were added to the node.
- Langage dominant
- C++
- Étoiles
- 829
- Forks
- 587
- Merge moyen
- 4 j 6 h
- PR mergées (30 j)
- 30
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ros2/rclcpp
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
Les mainteneurs répondent en général sous 1 jour
-
Memory grows per callback group created and destroyed on long lived nodesPeut-être pris @jwallace42 l’a pris il y a 1 jour. Ouvertebug
Difficulté 4/5 3-5 jours Accessibilité débutants 28/100
ros2/rclcpp#3428 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
removing and immediately re-adding a node to the EventsCBGExecutor leaves its entities unregisteredPeut-être pris @skyegalaxy l’a pris il y a 10 jours. Ouvertebug
ros2/rclcpp#3418 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
[Humble] Removing a node with more than one auto-added callback group leaves a dangling guard condition in the executorPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
ros2/rclcpp#3410 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de ros2/rclcpp
Issues similaires
-
arch-based bug niri
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
noctalia-dev/noctalia#5552 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 1/5 1-3 heures Accessibilité débutants 82/100
EchoTools/nevr-runtime#2912 ·
Les mainteneurs répondent en général sous 1 jour
-
area/docdb kind/failing-test priority/medium status/awaiting-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
yugabyte/yugabyte-db#39462 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
meshtastic/firmware#12519 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 79/100
Les mainteneurs répondent en général sous 1 jour