<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:28:33 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-16616] crash in osc_brw_prep_request() ASSERTION( page_count == 1 || (ergo(i == 0, poff + pg-&gt;count == PAGE_SIZE) ...</title>
                <link>https://jira.whamcloud.com/browse/LU-16616</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;An assertion in the Lustre client is triggered by the following calls, which leads to a kernel crash during executing the write syscall shown below:&lt;br/&gt;
&#160;&lt;br/&gt;
&#160;// Strace&lt;br/&gt;
open(&quot;./file1&quot;, O_RDWR|O_CREAT|O_EXCL|O_TRUNC|O_DIRECT|O_LARGEFILE|O_NOFOLLOW, 000) = 3&lt;br/&gt;
write(3, &quot;#! ./file1\n}!F\270\v\21k;{\310T+z\311-\311@:\312\27S&quot;..., 3595&lt;/p&gt;</description>
                <environment>Three server nodes and one client. Kernel version: Ubuntu-5.4.0-90.101&lt;br/&gt;
&lt;br/&gt;
# MGS&lt;br/&gt;
mkfs.lustre --fsname=lustre --mgs /dev/vda&lt;br/&gt;
mount -t lustre /dev/vda /root/lustre-server&lt;br/&gt;
&lt;br/&gt;
# MDS&lt;br/&gt;
mkfs.lustre --fsname=lustre --index=0 --mgsnode=$&lt;a href=&apos;mailto:start_ip@tcp0&apos;&gt;start_ip@tcp0&lt;/a&gt; --mdt /dev/vda&lt;br/&gt;
mount -t lustre /dev/vda /root/lustre-server&lt;br/&gt;
&lt;br/&gt;
# OSS&lt;br/&gt;
mkfs.lustre --ost --fsname=lustre --index=1 --reformat --mgsnode=$&lt;a href=&apos;mailto:start_ip@tcp0&apos;&gt;start_ip@tcp0&lt;/a&gt; /dev/vda&lt;br/&gt;
mount -t lustre /dev/vda /root/lustre-server&lt;br/&gt;
&lt;br/&gt;
# Client&lt;br/&gt;
mount -t lustre $&lt;a href=&apos;mailto:start_ip@tcp0&apos;&gt;start_ip@tcp0&lt;/a&gt;:/lustre /root/lustre-client</environment>
        <key id="74932">LU-16616</key>
            <summary>crash in osc_brw_prep_request() ASSERTION( page_count == 1 || (ergo(i == 0, poff + pg-&gt;count == PAGE_SIZE) ...</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="wc-triage">WC Triage</assignee>
                                    <reporter username="tao.lyu">Tao Lyu</reporter>
                        <labels>
                            <label>client</label>
                    </labels>
                <created>Fri, 3 Mar 2023 13:13:35 +0000</created>
                <updated>Sat, 15 Apr 2023 00:12:44 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="366150" author="paf0186" created="Thu, 16 Mar 2023 17:02:46 +0000"  >&lt;p&gt;Tao,&lt;/p&gt;

&lt;p&gt;Can you please share the crash messages as well?&#160; Specifically the stack trace and LBUG.&#160; Also, what Lustre version are you running?&#160; (The poc is appreciated, but we need some more general info.)&lt;/p&gt;</comment>
                            <comment id="366164" author="JIRAUSER18484" created="Thu, 16 Mar 2023 18:37:00 +0000"  >&lt;p&gt;Sure.&lt;/p&gt;

&lt;p&gt;Lustre commit: 9ddcdee2c8b9ec14986b93cf3180d946cd4869f7 &lt;/p&gt;

&lt;p&gt;The stack trace:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;root@dfs:~# [  154.265547] LustreError: 298:0:(osc_request.c:1819:osc_brw_prep_request()) ASSERTION( page_count == 1 || (ergo(i == 0, poff + pg-&amp;gt;count == PAGE_SIZE) &amp;amp;&amp;amp; ergo(i &amp;gt; 0 &amp;amp;&amp;amp; i &amp;lt; page_count - 1, poff == 0 &amp;amp;&amp;amp; pg-&amp;gt;count == PAGE_SIZE) &amp;amp;&amp;amp; ergo(i == page_count - 1, poff == 0)) ) failed: i: 0/2 pg: 000000005a02f487 off: 0, count: 3595
[  154.268801] LustreError: 298:0:(osc_request.c:1819:osc_brw_prep_request()) LBUG
[  154.269714] Kernel panic - not syncing: LBUG
[  154.270224] CPU: 3 PID: 298 Comm: ptlrpcd_00_00 Tainted: G           O      5.4.148+ #7
[  154.271135] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014
[  154.272152] Call Trace:
[  154.272455]  dump_stack+0x50/0x63
[  154.272875]  panic+0xfb/0x2bc
[  154.274264]  lbug_with_loc.cold+0x2c/0x2c [libcfs]
[  154.275445]  osc_brw_prep_request+0x5214/0x6d20 [osc]
[  154.280285]  osc_build_rpc+0x1487/0x3770 [osc]
[  154.281284]  osc_io_unplug0+0x2f0d/0x5110 [osc]
[  154.286077]  brw_queue_work+0xbe/0x220 [osc]
[  154.287007]  work_interpreter+0xb3/0x340 [ptlrpc]
[  154.287904]  ptlrpc_check_set+0x1244/0x7a90 [ptlrpc]
[  154.291430]  ptlrpcd+0x1296/0x23c0 [ptlrpc]
[  154.298351]  kthread+0xfb/0x130
[  154.299703]  ret_from_fork+0x1f/0x40
[  154.300279] Kernel Offset: 0xa400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[  154.301513] ---[ end Kernel panic - not syncing: LBUG ]---
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="366170" author="paf0186" created="Thu, 16 Mar 2023 18:54:46 +0000"  >&lt;p&gt;Tao,&lt;/p&gt;

&lt;p&gt;Why are you running based on 9ddcdee2c8b9ec14986b93cf3180d946cd4869f7 ?&#160; Are you intending to test an unreleased version?&#160; That&apos;s a recent-ish pull of our development branch.&#160; We appreciate if people want to test it, but we don&apos;t recommend it for production.&#160; Our current public maintenance release is b2_15.&lt;/p&gt;</comment>
                            <comment id="366172" author="paf0186" created="Thu, 16 Mar 2023 19:00:59 +0000"  >&lt;p&gt;Tao,&lt;/p&gt;

&lt;p&gt;With the poc - it looks like maybe you converted that directly from the strace using some tool?&#160; It&apos;s very odd to see &quot;syscall(__NR_mmap, ... )&quot; rather than mmap().&#160; Are you able to replace any part of the oic with text and/or symbolic representations instead of all those hex values?&#160; For example, it creates a file called &apos;tmpfile&apos;, but that string appears nowhere in poc.c, so I assume it must be encoded in there.&lt;/p&gt;</comment>
                            <comment id="366184" author="JIRAUSER18484" created="Thu, 16 Mar 2023 19:42:47 +0000"  >&lt;p&gt;Hi, Patrick,&lt;/p&gt;

&lt;p&gt;We are developing a bug-finding tool for distributed systems. In order to detect the newest bugs, we run the latest developing version.&lt;/p&gt;

&lt;p&gt;Yes, this is generated by our tool. It&apos;s for directly call syscalls instead of going to libc.&lt;br/&gt;
Here is the strace results (I also posted in above description part):&lt;br/&gt;
 // Strace&lt;br/&gt;
open(&quot;./file1&quot;, O_RDWR|O_CREAT|O_EXCL|O_TRUNC|O_DIRECT|O_LARGEFILE|O_NOFOLLOW, 000) = 3&lt;br/&gt;
write(3, &quot;#! ./file1\n}!F\270\v\21k;{\310T+z\311-\311@:\312\27S&quot;..., 3595&lt;/p&gt;</comment>
                            <comment id="366213" author="paf0186" created="Fri, 17 Mar 2023 03:43:34 +0000"  >&lt;p&gt;Tao,&lt;/p&gt;

&lt;p&gt;Ahh, thank you for explaining.&#160; OK - I&apos;ll have to set up an Ubuntu VM on my end, the poc works fine on my RHEL kernel based system.&#160; It is probably a difference in kernel versions.&lt;/p&gt;

&lt;p&gt;Is it practical for you to collect debug logs from the client if I give you instructions?&#160; It&apos;s not particularly difficult.&lt;/p&gt;</comment>
                            <comment id="366221" author="JIRAUSER18484" created="Fri, 17 Mar 2023 07:24:35 +0000"  >&lt;p&gt;Sure, glad to help collect the debug logs.&lt;/p&gt;</comment>
                            <comment id="369020" author="JIRAUSER18484" created="Tue, 11 Apr 2023 10:11:57 +0000"  >&lt;p&gt;Hi Patrick,&lt;/p&gt;

&lt;p&gt;Would you mind debugging and fixing this bug?&lt;br/&gt;
Thanks!&lt;/p&gt;

&lt;p&gt;Best,&lt;br/&gt;
Tao&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="74934">LU-16617</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="75016">LU-16634</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="48340" name="poc.c" size="16953" author="tao.lyu" created="Fri, 3 Mar 2023 13:09:02 +0000"/>
                    </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|i03flz:</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>