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
udev event storm - s390x #961
Comments
Good catch! Seems like we should differentiate readonly scenarios for |
Thanks! I do think it would be healthy for libblockdev to differentiate the read-only and read-write use cases, to reduce spurious watch events. Short term, do you believe that disabling this code block is safe? Some info would be lost - part_type potentially for the non-ID_PART_TABLE_TYPE case if that part_type is gpt or msdos, but I think it would cut off the loop for now. |
It was added recently for this UDF+VFAT corner case: storaged-project/udisks#1110. It was expected that the udev attributes are present in most cases. You can remove temporarily on your side without any significant impact. We'll fix the libblockdev side anyway. |
We don't need to open the device read-write for functions like bd_part_get_disk_spec. Fixes: storaged-project#961
Filing as a distinct issue - storaged-project/udisks#1192 and related appear to be different problems.
I have observed a udev event storm on s390x, tested with Ubuntu Mantic (23.10), and diagnosed as follows:
a read-write open is performed
udisks_linux_partition_table_update()
can callbd_part_get_disk_spec()
which is configured to do a read-write context open in thefdisk_assign_device()
call. That open triggers udev watch rules, which cause a new udev event, which may trigger the aboveudisks_linux_partition_table_update()
again.The scenario for that to happen would be
https://github.com/storaged-project/udisks/blob/c7027d888c00381851d918f33a13102e7b86e188/src/udiskslinuxpartitiontable.c#L147-L157
The return value of spec doesn't seem to matter much, as the next time the loop comes around, if we still have partitions but not ID_PART_TABLE_TYPE,
bd_part_get_disk_spec()
will be called again.The text was updated successfully, but these errors were encountered: