Conversation
This commit is preparation for adding more logic to the existing actions in the udev rule. There's no need to create a separate script, we can simply fold everything into the ioc-start.sh script.
89b9cc0 to
85e8a3b
Compare
henriquesimoes
approved these changes
Feb 4, 2026
Contributor
henriquesimoes
left a comment
There was a problem hiding this comment.
LGTM. As I mentioned in person, it would be nice to have the (yet-to-be-sent) e-mail reporting this kernel bug upstream linked here for future reference if possible.
Startup issues were observed when running these IOCs on certain CPUs (e.g. the Intel Xeon E-2276ML CPUs we recently acquired as spare parts). Despite the udev rule being triggered, some/all of the resource files hadn't been created yet when the chmod command was run. Therefore, the correct permissions weren't applied to the resource files, so the IOC running as the iocs user couldn't open them. When none of the files were available, it would lead to a bad glob expansion as an additional error. This issue hasn't been observed on the Intel Xeon E3-1505L CPUs we are currently using in production, even though both platforms are running the same distribution (Debian 12) and using the same kernel version (6.1.99). It also happens on kernel 6.12.57. This commit fixes these issues by waiting for all the resource files before running chmod. udev itself used to support similar functionality, but it was removed because such delays are kernel bugs which they don't want to paper over [1]. We have also reported the bug [2]. We check for all known resource files, including resource2_wc, even though the underlying uhal library also supports non-write-combining BAR2, because we want to be sure we are launching the IOCs in a consistent environment. And, since we now have a list of all needed resource files, we can simply pass that list to chmod, instead of using a glob. In order to avoid an eternal loop, we wait for up to 1s (in 10 0.1s increments) for the files to be available. Testing shows the files take around 0.07s to be available. [1] systemd/systemd@f2b8052 [2] https://bugzilla.kernel.org/show_bug.cgi?id=221049
85e8a3b to
1b8c02d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.