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

Ensure that the sync and both queue threads are closed before the corresponding QThread instances are destroyed #1518

Conversation

gonzalo-bulnes
Copy link
Contributor

@gonzalo-bulnes gonzalo-bulnes commented Jun 13, 2022

Description

🔮 Reviewers rebase this PR after #1512 is merged. Only the last commit needs review 💚

Follows up on #1512 fixing the remaining instances of QThread that were destroyed before the corresponding threads were exited.

Fixes #1510 for good. (See #1510 (comment)!)

Test Plan

  • Confirm that the Buster build is green 🍏
  • Confirm that the Bullseye build is green 🍏 (example build but local testing is desirable)
  • Confirm that the application sync works as usual
  • Confirm that messages are downloaded as usual
  • Confirm that files can be downloaded as usual

Checklist

If these changes modify code paths involving cryptography, the opening of files in VMs or network (via the RPC service) traffic, Qubes testing in the staging environment is required. For fine tuning of the graphical user interface, testing in any environment in Qubes is required. Please check as applicable:

  • I have tested these changes in the appropriate Qubes environment
  • I do not have an appropriate Qubes OS workstation set up (the reviewer will need to test these changes)
  • These changes should not need testing in Qubes

If these changes add or remove files other than client code, the AppArmor profile may need to be updated. Please check as applicable:

  • I have updated the AppArmor profile
  • No update to the AppArmor profile is required for these changes
  • I don't know and would appreciate guidance

If these changes modify the database schema, you should include a database migration. Please check as applicable:

  • I have written a migration and upgraded a test database based on main and confirmed that the migration applies cleanly
  • I have written a migration but have not upgraded a test database based on main and would like the reviewer to do so
  • I need help writing a database migration
  • No database schema changes are needed

@gonzalo-bulnes gonzalo-bulnes marked this pull request as ready for review June 13, 2022 21:54
@gonzalo-bulnes gonzalo-bulnes requested a review from a team as a code owner June 13, 2022 21:54
@gonzalo-bulnes gonzalo-bulnes changed the title Ensure that the export and API threads are closed before the corresponding QThread instances are destroyed (Part 2) Ensure that the sync and both queue threads are closed before the corresponding QThread instances are destroyed Jun 13, 2022
@gonzalo-bulnes gonzalo-bulnes changed the base branch from ensure-threads-are-exited-before-qthread-instances-are-destroyed to main June 14, 2022 04:10
@gonzalo-bulnes gonzalo-bulnes force-pushed the ensure-threads-are-exited-before-qthread-instances-are-destroyed-2 branch from 7d66bf1 to a8756b9 Compare June 22, 2022 01:21
@gonzalo-bulnes
Copy link
Contributor Author

(rebased)

Copy link
Contributor

@sssoleileraaa sssoleileraaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -337,6 +337,9 @@ def __init__( # type: ignore [no-untyped-def]
proxy: bool = True,
qubes: bool = True,
export_thread: Optional[QThread] = None,
sync_thread: Optional[QThread] = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plan is to no longer have default once all tests are fixed up

@sssoleileraaa sssoleileraaa merged commit a578678 into main Jun 22, 2022
@sssoleileraaa sssoleileraaa deleted the ensure-threads-are-exited-before-qthread-instances-are-destroyed-2 branch June 22, 2022 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QThread instances are removed before the thread is stopped
2 participants