Commit 89b9cc0
committed
service: fix startup issues affecting some CPUs.
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.0-23).
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 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@f2b80521 parent c78b549 commit 89b9cc0
1 file changed
+23
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
9 | 31 | | |
10 | 32 | | |
11 | 33 | | |
| |||
0 commit comments