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

cabana: avoid dead locks and improve responsiveness #32740

Merged

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Jun 13, 2024

This PR addresses potential deadlocks and enhances the overall responsiveness.

Main Changes:

  1. Enhanced the handling of thread states to prevent deadlocks, especially during the seeking.Introduced more granular locks and condition variable notifications to ensure smooth transitions between different states (e.g., seeking, pausing, merging and resuming).
  2. Improved the mechanism for updating events and seeking within the timeline to make the UI more responsive to user inputs.
  3. Optimized the event processing loop to avoid recursive calls, reducing latency and ensuring timely updates.
  4. Introduced mechanisms to detect and handle incorrect timestamps, preventing hangs caused by erroneous timestamps and ensuring smooth playback.
  5. fix race conditions in replay::buildTimeline.

@github-actions github-actions bot added the tools label Jun 13, 2024
Copy link
Contributor

github-actions bot commented Jun 13, 2024

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

@deanlee deanlee force-pushed the cabana_improve_avoid_dead_locks branch 9 times, most recently from 61eb4df to c42cb28 Compare June 16, 2024 15:10
@deanlee deanlee marked this pull request as draft June 16, 2024 15:23
@deanlee deanlee marked this pull request as ready for review June 16, 2024 15:36
@deanlee deanlee force-pushed the cabana_improve_avoid_dead_locks branch from c42cb28 to f310221 Compare June 16, 2024 17:22
@adeebshihadeh adeebshihadeh merged commit 865b98a into commaai:master Jun 16, 2024
15 checks passed
@deanlee deanlee deleted the cabana_improve_avoid_dead_locks branch June 17, 2024 03:47
Edison-CBS pushed a commit to Edison-CBS/openpilot that referenced this pull request Sep 15, 2024
avoid dead locks and improve responsive
old-commit-hash: 865b98a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants