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

Various GUI components make blocking Admin API calls on the main thread #9637

Open
DemiMarie opened this issue Dec 10, 2024 · 3 comments
Open
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: core needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@DemiMarie
Copy link

How to file a helpful issue

Qubes OS release

R4.2

Brief summary

Various GUI components make Admin API calls on the main thread. This is a very bad idea, because this blocks the UI until qubesd responds. This takes far too long for the UI to be responsive.

Once this issue is fixed, I would like for using the Admin API on the main thread to throw an exception, to ensure that future calls to it are caught.

Steps to reproduce

Use the updater when many VMs are running.

Expected behavior

UI is constantly responsive.

Actual behavior

UI becomes unresponsive at various points.

@DemiMarie DemiMarie added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. labels Dec 10, 2024
@DemiMarie
Copy link
Author

@marmarta: I think this is the source of most “XYZ becomes temporarily unresponsive” issues.

@marmarek
Copy link
Member

Alternative solution (although probably more work) is to make core-admin-client provide async API (via asyncio), similar to its backend counterpart (core-admin). This is something I would want anyway, but what I don't know is how to make it compatible (to not break all users of core-admin-client, including 3rd-party ones). Maybe implement alternative Qubes() class (QubesAsync()?) ?

@andrewdavidwong andrewdavidwong added C: core needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. affects-4.2 This issue affects Qubes OS 4.2. labels Dec 10, 2024
@DemiMarie
Copy link
Author

QubesAsync() seems like a good option, unless there are ordering requirements that make a callback-based solution more attractive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.2 This issue affects Qubes OS 4.2. C: core needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

No branches or pull requests

3 participants