Bug 103 - [ANCK 4.19] io_uring async buffered reads 特性在 epoll 等场景下存在hang的可能
Summary: [ANCK 4.19] io_uring async buffered reads 特性在 epoll 等场景下存在hang的可能
Status: RESOLVED FIXED
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: fs (show other bugs) fs
Version: 4.19-025.x
Hardware: All Linux
: P1-Urgent S2-major
Target Milestone: ---
Assignee: xiaoguangwang
QA Contact:
URL:
Whiteboard:
Keywords:
: 98 99 100 101 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-16 14:51 UTC by Joseph Qi
Modified: 2022-08-16 11:53 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Qi alibaba_cloud_group 2021-12-16 14:51:44 UTC
我们在backport async buffered reads特性时,并没有将task_work_add的调用全部转为io_req_task_work_add, 导致async buffered reads唤醒时仍然使用的是TWA_RESUME,导致处于 interruptible 状态的等待者不能及时被唤醒,从而导致应用hang。
Comment 1 Joseph Qi alibaba_cloud_group 2021-12-16 14:59:47 UTC
*** Bug 98 has been marked as a duplicate of this bug. ***
Comment 2 Joseph Qi alibaba_cloud_group 2021-12-16 15:00:23 UTC
*** Bug 99 has been marked as a duplicate of this bug. ***
Comment 3 Joseph Qi alibaba_cloud_group 2021-12-16 15:01:11 UTC
*** Bug 100 has been marked as a duplicate of this bug. ***
Comment 4 Joseph Qi alibaba_cloud_group 2021-12-16 15:01:35 UTC
*** Bug 101 has been marked as a duplicate of this bug. ***
Comment 5 maomao123 alibaba_cloud_group 2021-12-16 15:55:03 UTC
(In reply to josephqi from comment #0)
> 我们在backport async buffered
> reads特性时,并没有将task_work_add的调用全部转为io_req_task_work_add, 导致async buffered
> reads唤醒时仍然使用的是TWA_RESUME,导致处于 interruptible 状态的等待者不能及时被唤醒,从而导致应用hang。

准确来说应该是RESUME会唤醒 interruptible的线程,但是对于正运行在用户态的线程没有效果。因而可能出现后者如果不再次进入内核态,task work就不会被处理的情况。
Comment 6 Joseph Qi alibaba_cloud_group 2021-12-22 10:31:12 UTC
https://gitee.com/anolis/cloud-kernel/pulls/51