<div dir="ltr"><div dir="ltr">Acked-by: Kamal Mostafa <<a href="mailto:kamal@canonical.com">kamal@canonical.com</a>><br><div><br></div><div>LGTM.</div><div><br></div><div> -Kamal</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 23, 2022 at 9:50 AM Thadeu Lima de Souza Cascardo <<a href="mailto:cascardo@canonical.com">cascardo@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">[Impact]<br>
Multiple users and partners have reported containerd/k8s/runc failures.<br>
These manifest as containers being in the unknown state and failures<br>
to communicate with containerd (response timeouts).<br>
<br>
[Fixes]<br>
Some reports attribute the failure to epoll, in particular commit a16ceb139610.<br>
Others have attribute containerd failures to splice commit 97ef77c52b78.<br>
<br>
The epoll commit was applied upstream after many other fixes were applied to<br>
epoll. Those other fixes prevent race conditions between epoll_pwait timing out<br>
and wakeups being missed. a16ceb139610 upstream would make such races produce<br>
extra events, not miss events. But on current 5.4 kernel, specially without<br>
commit 289caf5d8f6c, this would result in events more likely being missed.<br>
<br>
Some tests have shown that when applying 65759097d804 and 289caf5d8f6c and not<br>
reverting a16ceb139610, the number of responses timeouts compared to either<br>
Ubuntu-5.4.0-131 (without a16ceb139610) and 5.4.0-132 (with a16ceb139610) go<br>
down.<br>
<br>
Also, 5.15 carry some epoll kselftests and at least epoll61 test passes once<br>
those fixes are applied, and no other regressions in that test suite are found.<br>
That particular test is demonstrating the described race condition from commit<br>
289caf5d8f6c.<br>
<br>
97ef77c52b78, on the other hand, has also been reverted on upstream 5.4.y as it<br>
depended on a lot of other changes that have not been backported or targeted to<br>
5.4. In particular, the reasoning upstream was NFS regressions.<br>
<br>
In light of all this, even though these fixes may not be necessary to fix the<br>
reported containerd bugs, they should go into all 5.4 kernels anyway as they<br>
fix other real bugs.<br>
<br>
[URGENCY]<br>
Applying these fixes as soon as possible is in line with a strategy of getting<br>
fixes out so they can be tested and verified, particularly for those users who<br>
require offical Ubuntu builds. In case these cause more harm or do not fix the<br>
regressions, they can be reverted and better fixes applied instead.<br>
<br>
<br>
Roman Penyaev (1):<br>
epoll: call final ep_events_available() check under the lock<br>
<br>
Sasha Levin (1):<br>
Revert "fs: check FMODE_LSEEK to control internal pipe splicing"<br>
<br>
Soheil Hassas Yeganeh (1):<br>
epoll: check for events when removing a timed out thread from the wait<br>
queue<br>
<br>
fs/eventpoll.c | 69 ++++++++++++++++++++++++++++++--------------------<br>
fs/splice.c | 10 +++++---<br>
2 files changed, 48 insertions(+), 31 deletions(-)<br>
<br>
-- <br>
2.34.1<br>
<br>
<br>
-- <br>
kernel-team mailing list<br>
<a href="mailto:kernel-team@lists.ubuntu.com" target="_blank">kernel-team@lists.ubuntu.com</a><br>
<a href="https://lists.ubuntu.com/mailman/listinfo/kernel-team" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/kernel-team</a><br>
</blockquote></div></div>