Skip to content

udev-settle: obey udev buffer size and handle possible tracebacks #778

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yarda
Copy link
Contributor

@yarda yarda commented May 20, 2025

Resolves: RHEL-92637

@yarda yarda requested a review from zacikpa May 20, 2025 19:39
@yarda
Copy link
Contributor Author

yarda commented May 20, 2025

Rawhide failure is unrelated.

@yarda
Copy link
Contributor Author

yarda commented May 21, 2025

It now uses default TuneD 1MB udev events buffer instead of the 8 kB default udev buffer. The buffer size is configurable in the tuned-main.conf. This should prevent filling of the buffer even in case of a storm of udev events. It also contains workaround for the pyudev bug:
pyudev/pyudev#194
Even if the buffer is filled now, the udev queue is no more stuck and error is logged.

@yarda yarda force-pushed the udev-settle-set-udev-queue-size branch from 7365557 to 0e6406a Compare May 21, 2025 07:25
@yarda
Copy link
Contributor Author

yarda commented May 21, 2025

Rebased.

It now uses TuneD udev events buffer size which is by default 1 MB
instead of the 8 kB default udev buffer size. The buffer size is
configurable in the tuned-main.conf. This should prevent filling
of the buffer even in case of a storm of udev events. It also
contains workaround for the pyudev bug:
pyudev/pyudev#194

Even if the buffer is filled now, the udev queue is no more stuck
and error is logged.

Resolves: RHEL-92637

Signed-off-by: Jaroslav Škarvada <[email protected]>
@yarda yarda force-pushed the udev-settle-set-udev-queue-size branch from 0e6406a to d88f53a Compare May 21, 2025 07:29
Copy link
Contributor

@zacikpa zacikpa left a comment

Choose a reason for hiding this comment

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

Right, so whenever the polling fails due to the udev socket filling up, we essentially abort the wait and behave as if it timeouted. That makes sense given that there is nothing else to do in such cases.

@yarda
Copy link
Contributor Author

yarda commented May 21, 2025

Right, so whenever the polling fails due to the udev socket filling up, we essentially abort the wait and behave as if it timeouted. That makes sense given that there is nothing else to do in such cases.

I could drop the context (because without the pyudev bug fix it cannot be reused and it isn't receiving any more events) and restart the wait, but I wouldn't complicate it.

@zacikpa
Copy link
Contributor

zacikpa commented May 21, 2025

Yes, let's keep it like this, there is no guarantee that a restart would not lead to another exception.

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.

2 participants