-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Bluetooth host: bt_conn_tx_processor() does not handle multiple ISO connections being ready correctly #74321
Comments
One shouldn't have to scrutinize logs to figure out if a test is PASS or FAIL. edit: re-reading my comment, that sounds a bit harsh, sorry. |
ISO connections that were in the TX queue were not getting serviced in time. This happens because `iso_data_pull()` returns `NULL` when that particular connection (`conn`) is done sending. But it doesn't trigger the TX processor again to process other channels in the queue. This patch fixes that by calling `bt_tx_irq_raise()`. We can't do this from `conn.c` as we don't know if the `NULL` returned is because the current channel is out of data or because it has data but it can't send it (e.g. the current buf is being "viewed" already). Fixes zephyrproject-rtos#74321 Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
@Tronil re: the supplied logs. Does the linked patch fix the issue? |
PR #74244 fails the bsim tests because of this; So if you are looking for a failing test case, you can use that. Note that it is of course not actually testing this part of the code directly, this issue just happens to make an existing test case fail because of this issue. |
ISO connections that were in the TX queue were not getting serviced in time. This happens because `iso_data_pull()` returns `NULL` when that particular connection (`conn`) is done sending. But it doesn't trigger the TX processor again to process other channels in the queue. This patch fixes that by calling `bt_tx_irq_raise()`. We can't do this from `conn.c` as we don't know if the `NULL` returned is because the current channel is out of data or because it has data but it can't send it (e.g. the current buf is being "viewed" already). Fixes zephyrproject-rtos#74321 Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
ISO connections that were in the TX queue were not getting serviced in time. This happens because `iso_data_pull()` returns `NULL` when that particular connection (`conn`) is done sending. But it doesn't trigger the TX processor again to process other channels in the queue. This patch fixes that by calling `bt_tx_irq_raise()`. We can't do this from `conn.c` as we don't know if the `NULL` returned is because the current channel is out of data or because it has data but it can't send it (e.g. the current buf is being "viewed" already). Fixes zephyrproject-rtos/zephyr#74321 (cherry picked from commit 8af7180) Original-Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no> GitOrigin-RevId: 8af7180 Change-Id: I104f1fd52c9b2fd8f129b4564a84af2a52a40e9e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5644690 Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com> Commit-Queue: Dawid Niedźwiecki <dawidn@google.com> Reviewed-by: Dawid Niedźwiecki <dawidn@google.com>
ISO connections that were in the TX queue were not getting serviced in time. This happens because `iso_data_pull()` returns `NULL` when that particular connection (`conn`) is done sending. But it doesn't trigger the TX processor again to process other channels in the queue. This patch fixes that by calling `bt_tx_irq_raise()`. We can't do this from `conn.c` as we don't know if the `NULL` returned is because the current channel is out of data or because it has data but it can't send it (e.g. the current buf is being "viewed" already). Fixes zephyrproject-rtos/zephyr#74321 Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no> (cherry picked from commit 8af7180)
ISO connections that were in the TX queue were not getting serviced in time. This happens because `iso_data_pull()` returns `NULL` when that particular connection (`conn`) is done sending. But it doesn't trigger the TX processor again to process other channels in the queue. This patch fixes that by calling `bt_tx_irq_raise()`. We can't do this from `conn.c` as we don't know if the `NULL` returned is because the current channel is out of data or because it has data but it can't send it (e.g. the current buf is being "viewed" already). Fixes zephyrproject-rtos/zephyr#74321 Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no> (cherry picked from commit 8af7180)
Describe the bug
When multiple ISO payloads are generated at the same time (as in some BSim tests), only one of the connections are processed by
bt_conn_tx_processor()
. The other(s) are only processed after the next call tobt_conn_data_ready()
- which is likely at the next ISO event, i.e. way too late.The issue arises because tx_data_pull (iso_data_pull in this case) eventually returns NULL after the payload(s) for a particular ISO "connection" has been handled - and this causes bt_conn_tx_processor() to stop completely instead of re-launching itself via
bt_tx_irq_raise
.This bug was introduced by PR #72090.
To Reproduce
Steps to reproduce the behavior:
Run BSim test cap_broadcast_ac_13.sh and look at the iso_data_pull trace output.
Expected behavior
All ISO payloads should get processed
Impact
Breaks multiple concurrent ISO streams (at the very least; ACL connections are probably impacted as well)
Logs and console output
Excerpt from a trace from PR #74244 (where this was found):
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: