<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.openanolis.cn/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.openanolis.cn/"
          
          maintainer="service@openanolis.org"
>

    <bug>
          <bug_id>103</bug_id>
          
          <creation_ts>2021-12-16 14:51:44 +0000</creation_ts>
          <short_desc>[ANCK 4.19] io_uring async buffered reads 特性在 epoll 等场景下存在hang的可能</short_desc>
          <delta_ts>2022-08-16 11:53:07 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>5</classification_id>
          <classification>ANCK</classification>
          <product>ANCK 4.19 Dev</product>
          <component>fs</component>
          <version>4.19-025.x</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1-Urgent</priority>
          <bug_severity>S2-major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joseph Qi">joseph.qi</reporter>
          <assigned_to name="xiaoguangwang">xiaoguang.wang</assigned_to>
          <cc>haoxu</cc>
    
    
    <cc>quentin.sqm</cc>
    
    
    <cc>xiaoguang.wang</cc>
          
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>166</commentid>
    <comment_count>0</comment_count>
    <who name="Joseph Qi">joseph.qi</who>
    <bug_when>2021-12-16 14:51:44 +0000</bug_when>
    <thetext>我们在backport async buffered reads特性时，并没有将task_work_add的调用全部转为io_req_task_work_add, 导致async buffered reads唤醒时仍然使用的是TWA_RESUME，导致处于 interruptible 状态的等待者不能及时被唤醒，从而导致应用hang。</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>170</commentid>
    <comment_count>1</comment_count>
    <who name="Joseph Qi">joseph.qi</who>
    <bug_when>2021-12-16 14:59:47 +0000</bug_when>
    <thetext>*** Bug 98 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>173</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph Qi">joseph.qi</who>
    <bug_when>2021-12-16 15:00:23 +0000</bug_when>
    <thetext>*** Bug 99 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>177</commentid>
    <comment_count>3</comment_count>
    <who name="Joseph Qi">joseph.qi</who>
    <bug_when>2021-12-16 15:01:11 +0000</bug_when>
    <thetext>*** Bug 100 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179</commentid>
    <comment_count>4</comment_count>
    <who name="Joseph Qi">joseph.qi</who>
    <bug_when>2021-12-16 15:01:35 +0000</bug_when>
    <thetext>*** Bug 101 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>186</commentid>
    <comment_count>5</comment_count>
    <who name="maomao123">haoxu</who>
    <bug_when>2021-12-16 15:55:03 +0000</bug_when>
    <thetext>(In reply to josephqi from comment #0)
&gt; 我们在backport async buffered
&gt; reads特性时，并没有将task_work_add的调用全部转为io_req_task_work_add, 导致async buffered
&gt; reads唤醒时仍然使用的是TWA_RESUME，导致处于 interruptible 状态的等待者不能及时被唤醒，从而导致应用hang。

准确来说应该是RESUME会唤醒 interruptible的线程，但是对于正运行在用户态的线程没有效果。因而可能出现后者如果不再次进入内核态，task work就不会被处理的情况。</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>302</commentid>
    <comment_count>6</comment_count>
    <who name="Joseph Qi">joseph.qi</who>
    <bug_when>2021-12-22 10:31:12 +0000</bug_when>
    <thetext>https://gitee.com/anolis/cloud-kernel/pulls/51</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>