Skip to content

Prevent long-running threads from deadlocking the program with only 1 CPU#11155

Merged
droidmonkey merged 1 commit intodevelopfrom
fix/one-cpu-deadlock
Aug 12, 2024
Merged

Prevent long-running threads from deadlocking the program with only 1 CPU#11155
droidmonkey merged 1 commit intodevelopfrom
fix/one-cpu-deadlock

Conversation

@droidmonkey
Copy link
Copy Markdown
Member

@droidmonkey droidmonkey commented Aug 11, 2024

NOTE: This fix is temporary until we can figure out with the code located here doesn't exit/complete properly

void handleUsbEvents(libusb_context* ctx, QAtomicInt* completed)
{
while (!*completed) {
libusb_handle_events_completed(ctx, reinterpret_cast<int*>(completed));
Tools::sleep(100);
}
}

Testing strategy

Tested in virtual linux box with 1 CPU.

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.01%. Comparing base (b3bec8b) to head (cc5baa8).
Report is 43 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #11155      +/-   ##
===========================================
- Coverage    63.04%   63.01%   -0.03%     
===========================================
  Files          362      362              
  Lines        37735    37735              
===========================================
- Hits         23788    23778      -10     
- Misses       13947    13957      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@droidmonkey droidmonkey merged commit 6a9ed21 into develop Aug 12, 2024
@droidmonkey droidmonkey deleted the fix/one-cpu-deadlock branch August 12, 2024 10:16
@droidmonkey droidmonkey added the pr: backported Pull request backported to previous release label Aug 14, 2024
@phoerious phoerious added pr: bugfix Pull request fixes a bug and removed bug labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

high priority 🚨 pr: backported Pull request backported to previous release pr: bugfix Pull request fixes a bug regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2.7.7 - Database unlock hangs in virtual machine with 1 CPU

2 participants