<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:05:44 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-13968] PCC read failed for io_uring </title>
                <link>https://jira.whamcloud.com/browse/LU-13968</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;During PCC-RO testing, we found that the following io_uring fio test failed:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
lctl pcc add /mnt/lustre /mnt/pcc -p &lt;span class=&quot;code-quote&quot;&gt;&quot;projid={10001} roid=5 ropcc=1&quot;&lt;/span&gt;
mkdir /mnt/lustre/pcc
lfs project -sp 10001 /mnt/lustre/pcc
cat /proc/meminfo
fio --name=seqread --create_only=1 --create_serialize=0 --bs=128K --directory=/mnt/lustre/pcc --filename_format=seqread.$jobnum.$filenum --filesize=$1 --direct=1 --iodepth=64 --numjobs=1


cat /proc/meminfo
lfs pcc state /mnt/lustre/pcc/*
cat /proc/meminfo
echo -n &lt;span class=&quot;code-quote&quot;&gt;&quot;\nDrop caches&quot;&lt;/span&gt;
sysctl -w vm.drop_caches=3
cat /proc/meminfo
fio --name=seqread --rw=read --bs=128K --directory=/mnt/lustre/pcc --filename_format=seqread.$jobnum.$filenum --filesize=$1 --allow_file_create=0 --ioengine=io_uring --direct=1 --iodepth=4 --numjobs=1
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The test panic the kernel when filesize=1G, but can pass when filesize=1M.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The panic kdump is :&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
[ 5051.929965] LustreError: 3136:0:(vvp_io.c:878:vvp_io_read_start()) ASSERTION( vio-&amp;gt;vui_iocb-&amp;gt;ki_pos == pos ) failed:
[ 5051.930069] LustreError: 3136:0:(vvp_io.c:878:vvp_io_read_start()) LBUG
[ 5051.930960] Pid: 3136, comm: fio 5.4.0-47-&lt;span class=&quot;code-keyword&quot;&gt;generic&lt;/span&gt; #51-Ubuntu SMP Fri Sep 4 19:50:52 UTC 2020
[ 5051.930961] Call Trace TBD:
[ 5051.930962] Kernel panic - not syncing: LBUG
[ 5051.930966] CPU: 0 PID: 3136 Comm: fio Kdump: loaded Tainted: G &#160; &#160; &#160; &#160; &#160; OE &#160; &#160; 5.4.0-47-&lt;span class=&quot;code-keyword&quot;&gt;generic&lt;/span&gt; #51-Ubuntu
[ 5051.930967] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 04/13/2018
[ 5051.930968] Call Trace:
[ 5051.931020]&#160; dump_stack+0x6d/0x9a
[ 5051.931113]&#160; panic+0x101/0x2e3
[ 5051.931172]&#160; lbug_with_loc.cold+0x18/0x18 [libcfs]
[ 5051.931336]&#160; vvp_io_read_start+0x72f/0x7a0 [lustre]
[ 5051.931673]&#160; ? cl_lock_request+0x65/0x1c0 [obdclass]
[ 5051.931691]&#160; cl_io_start+0x62/0x110 [obdclass]
[ 5051.931704]&#160; cl_io_loop+0x9d/0x1f0 [obdclass]
[ 5051.931717]&#160; ll_file_io_generic+0x929/0xde0 [lustre]
[ 5051.931726]&#160; ll_file_read_iter+0x160/0x310 [lustre]
[ 5051.931729]&#160; io_read+0xe5/0x240
[ 5051.931802]&#160; ? shmem_getpage_gfp+0xef/0x940
[ 5051.931867]&#160; ? __switch_to_asm+0x34/0x70
[ 5051.931869]&#160; ? __switch_to_asm+0x34/0x70
[ 5051.931871]&#160; ? __switch_to_asm+0x40/0x70
[ 5051.931873]&#160; __io_submit_sqe+0x444/0x8e0
[ 5051.931876]&#160; ? current_time+0x43/0x80
[ 5051.931878]&#160; __io_queue_sqe+0x23/0x2a0
[ 5051.931879]&#160; io_queue_sqe+0x7a/0x90
[ 5051.931881]&#160; io_submit_sqe+0x23d/0x330
[ 5051.931882]&#160; io_ring_submit+0xca/0x200
[ 5051.931887]&#160; ? handle_mm_fault+0xca/0x200
[ 5051.931889]&#160; __x64_sys_io_uring_enter+0x1e4/0x2c0
[ 5051.931929]&#160; do_syscall_64+0x57/0x190
[ 5051.931932]&#160; entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 5051.931934] RIP: 0033:0x7f98c5ba070d
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;when test with filesize=1M, we collect the Lustre debug log, and found that it failed in __pcc_file_read_iter() with error code -11 (-EAGAIN).&lt;/p&gt;

&lt;p&gt;Dig into Ext4 -&amp;gt;read_iter, the code line returning -EAGAIN:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
{
	size_t count = iov_iter_count(iter);
	ssize_t retval = 0;

	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!count)
		&lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt; out; &lt;span class=&quot;code-comment&quot;&gt;/* skip atime */&lt;/span&gt;

	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (iocb-&amp;gt;ki_flags &amp;amp; IOCB_DIRECT) {
		struct file *file = iocb-&amp;gt;ki_filp;
		struct address_space *mapping = file-&amp;gt;f_mapping;
		struct inode *inode = mapping-&amp;gt;host;
		loff_t size;

		size = i_size_read(inode);
		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (iocb-&amp;gt;ki_flags &amp;amp; IOCB_NOWAIT) {
			&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (filemap_range_has_page(mapping, iocb-&amp;gt;ki_pos,
						   iocb-&amp;gt;ki_pos + count - 1))
				&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; -EAGAIN;
		} &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
			retval = filemap_write_and_wait_range(mapping,
						iocb-&amp;gt;ki_pos,
					        iocb-&amp;gt;ki_pos + count - 1);
			&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (retval &amp;lt; 0)
				&lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt; out;
		}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The reason is that io_uring is using direct IO mode with flag IOCB_NOWAIT, and the PCC cached file map rang has pages...&lt;/p&gt;</description>
                <environment></environment>
        <key id="60813">LU-13968</key>
            <summary>PCC read failed for io_uring </summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="qian_wc">Qian Yingjin</assignee>
                                    <reporter username="qian_wc">Qian Yingjin</reporter>
                        <labels>
                    </labels>
                <created>Wed, 16 Sep 2020 08:57:20 +0000</created>
                <updated>Fri, 5 Nov 2021 15:04:42 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="280472" author="gerrit" created="Thu, 24 Sep 2020 03:08:41 +0000"  >&lt;p&gt;Yingjin Qian (qian@ddn.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/40025&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/40025&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-13968&quot; title=&quot;PCC read failed for io_uring &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-13968&quot;&gt;LU-13968&lt;/a&gt; pcc: dnot tolerate read errors -EAGAIN/-EIOCBQUEUED&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 43ef8d983cbfcd5cfb90acd68e796b2c85b453cb&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i019zb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>