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

Udisks2 main process waits for a long time #871

Closed
HeroesLoveToRoujiamo opened this issue Mar 31, 2021 · 1 comment · Fixed by #949
Closed

Udisks2 main process waits for a long time #871

HeroesLoveToRoujiamo opened this issue Mar 31, 2021 · 1 comment · Fixed by #949

Comments

@HeroesLoveToRoujiamo
Copy link

HeroesLoveToRoujiamo commented Mar 31, 2021

Two U disks, numbered A and B. Format U Disk A into the EXT3 file system (this process takes a long time). When formatting U Disk A, mount or unmount U Disk B. At this time, the udisks2 main process will update the utab information (utab_changed_event), thereby calling the udisks_linux_filesystem_update() function, and will update the size information of U Disk A. Because U Disk A is being formatted, the main process of udisks2 will freeze (g_spawn_sync) until U Disk A is formatted. The stack when udisks2 freezes is as follows:
Stack

When formatting U Disk A, U Disk A has been uninstalled. At this time, can I not update its utab information?

@tbzatek
Copy link
Member

tbzatek commented Mar 31, 2021

The freeze you're talking about is caused by the actual command being frozen, i.e. dumpe2fs in this case. I agree it is rather intrusive.

What we can do here is to try calling the udisks_linux_block_object_try_lock_for_cleanup() that was originally intended to prevent the cleanup thread performing any action on a particular block object while any operation is in progress. This might however work only in the case formatting is done through UDisks.

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 a pull request may close this issue.

2 participants