<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:28:22 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-2808] osp_object_assign_fid()) ASSERTION( fid_is_zero(lu_object_fid(&amp;o-&gt;opo_obj.do_lu)) ) failed:</title>
                <link>https://jira.whamcloud.com/browse/LU-2808</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Racy reproducer:&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;# llmount.sh
# cd /mnt/lustre
# while true; do lfs setstripe -c 1 f0; rm f0; done &amp;amp;
[1] 3814
# while true; do truncate --size=1 f0; done
cannot truncate `f0&apos; to length 21705: No such file or directory
cannot truncate `f0&apos; to length 17399: No such file or directory
cannot truncate `f0&apos; to length 18024: No such file or directory
cannot truncate `f0&apos; to length 25593: No such file or directory
cannot truncate `f0&apos; to length 19126: No such file or directory
cannot truncate `f0&apos; to length 29680: No such file or directory
cannot truncate `f0&apos; to length 14928: No such file or directory
cannot truncate `f0&apos; to length 23877: No such file or directory
cannot truncate `f0&apos; to length 6911: No such file or directory
cannot truncate `f0&apos; to length 868: No such file or directory
cannot truncate `f0&apos; to length 791: No such file or directory
cannot truncate `f0&apos; to length 28593: No such file or directory
cannot truncate `f0&apos; to length 7330: No such file or directory
cannot truncate `f0&apos; to length 9708: No such file or directory

Message from syslogd@m at Feb 13 10:29:39 ...
 kernel:LustreError: 3088:0:(osp_object.c:56:osp_object_assign_fid()) ASSERTION( fid_is_zero(lu_object_fid(&amp;amp;o-&amp;gt;opo_obj.do_lu)) ) failed:

Message from syslogd@m at Feb 13 10:29:39 ...
 kernel:LustreError: 3088:0:(osp_object.c:56:osp_object_assign_fid()) LBUG

Message from syslogd@m at Feb 13 10:29:39 ...
 kernel:Kernel panic - not syncing: LBUG

crash&amp;gt; bt
PID: 31940  TASK: ffff8801663b5500  CPU: 0   COMMAND: &quot;mdt00_001&quot;
 #0 [ffff8801663b78e8] machine_kexec at ffffffff81031f7b
 #1 [ffff8801663b7948] crash_kexec at ffffffff810b8c22
 #2 [ffff8801663b7a18] panic at ffffffff814eae18
 #3 [ffff8801663b7a98] lbug_with_loc at ffffffffa0ef3eeb [libcfs]
 #4 [ffff8801663b7ab8] osp_object_assign_fid at ffffffffa0b98942 [osp]
 #5 [ffff8801663b7ae8] osp_declare_attr_set at ffffffffa0b98b11 [osp]
 #6 [ffff8801663b7b38] lod_declare_attr_set at ffffffffa0b68083 [lod]
 #7 [ffff8801663b7b88] mdd_attr_set at ffffffffa051f5e9 [mdd]
 #8 [ffff8801663b7c08] mdt_attr_set at ffffffffa0a4deb8 [mdt]
 #9 [ffff8801663b7c58] mdt_reint_setattr at ffffffffa0a4e7ad [mdt]
#10 [ffff8801663b7cc8] mdt_reint_rec at ffffffffa0a486b1 [mdt]
#11 [ffff8801663b7ce8] mdt_reint_internal at ffffffffa0a41d13 [mdt]
#12 [ffff8801663b7d28] mdt_reint at ffffffffa0a42044 [mdt]
#13 [ffff8801663b7d48] mdt_handle_common at ffffffffa0a32fb8 [mdt]
#14 [ffff8801663b7d98] mds_regular_handle at ffffffffa0a6a5c5 [mdt]
#15 [ffff8801663b7da8] ptlrpc_server_handle_request at ffffffffa062c00c [ptlrpc]
#16 [ffff8801663b7ea8] ptlrpc_main at ffffffffa062d556 [ptlrpc]
#17 [ffff8801663b7f48] kernel_thread at ffffffff8100c0ca
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A deterministic reproducer is attached. It does&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;fd1 = open(&quot;f0&quot;, O_RDWR|O_CREAT|O_LOV_DELAY_CREATE, 0666);
fd2 = open(&quot;f0&quot;, O_RDWR|O_CREAT, 0666);
ftruncate(fd2, 1);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This seems to be independent from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2523&quot; title=&quot;ll_update_inode()) ASSERTION( lu_fid_eq(&amp;amp;lli-&amp;gt;lli_fid, &amp;amp;body-&amp;gt;fid1) ) failed: Trying to change FID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2523&quot;&gt;&lt;del&gt;LU-2523&lt;/del&gt;&lt;/a&gt;. I tried this with and without the patch from &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2523&quot; title=&quot;ll_update_inode()) ASSERTION( lu_fid_eq(&amp;amp;lli-&amp;gt;lli_fid, &amp;amp;body-&amp;gt;fid1) ) failed: Trying to change FID&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2523&quot;&gt;&lt;del&gt;LU-2523&lt;/del&gt;&lt;/a&gt; and got the same result.&lt;/p&gt;

&lt;p&gt;Note that in the call to ftruncate() if fd1 is used instead of fd2 or if a zero length is used then there is no LBUG. If truncate(&quot;f0&quot;, 1) is used then there is also no LBUG.&lt;/p&gt;

&lt;p&gt;Interestingly, if MOUNT_2=yes is used and the first open is of &quot;/mnt/lustre/f0&quot; and the second of &quot;/mnt/lustre2/f0&quot; then there is no LBUG. However while the setstripe ioctl() will appear to succeed, in fact the default striping will be applied to the file.&lt;/p&gt;</description>
                <environment></environment>
        <key id="17558">LU-2808</key>
            <summary>osp_object_assign_fid()) ASSERTION( fid_is_zero(lu_object_fid(&amp;o-&gt;opo_obj.do_lu)) ) failed:</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="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>osp</label>
                    </labels>
                <created>Wed, 13 Feb 2013 14:04:04 +0000</created>
                <updated>Wed, 23 Jun 2021 23:01:36 +0000</updated>
                            <resolved>Wed, 23 Jun 2021 23:01:32 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="52398" author="bzzz" created="Thu, 14 Feb 2013 13:57:32 +0000"  >&lt;p&gt;we discussed few times that it&apos;d be better for truncate to create striping if it doesn&apos;t exist yet. this would help to reduce number of cases to handle (to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2794&quot; title=&quot;lu_object_assign_fid()) ASSERTION( shadow == ((void *)0) ) failed: &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2794&quot;&gt;&lt;del&gt;LU-2794&lt;/del&gt;&lt;/a&gt;, i think) and fix one outstanding issue.&lt;/p&gt;</comment>
                            <comment id="52471" author="adilger" created="Fri, 15 Feb 2013 14:31:06 +0000"  >&lt;p&gt;Alex, I agree.  Not a critical issue, but it would be nice to get this fixed for the final 2.4 release.&lt;/p&gt;</comment>
                            <comment id="52708" author="jhammond" created="Tue, 19 Feb 2013 15:33:38 +0000"  >&lt;p&gt;In this case the striping has already been created (by the second open()) when ftruncate() is called.  The problem seems to be that the lsm is not returned to the client after the second open() or the client ignores it.  Then in ftruncate() the client does not have lsm for the file so it sends setattr with the new size to the MDS.  So you have the MDS setting the size of an already striped file which triggers the LASSERT() in ops_declare_attr_set()/osp_object_assign_fid().  It seems like the easiest fix here would be to check for an already assigned fid:&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;@@ -53,7 +53,9 @@ static void osp_object_assign_fid(const struct lu_env *env,
 {
        struct osp_thread_info *osi = osp_env_info(env);
 
-       LASSERT(fid_is_zero(lu_object_fid(&amp;amp;o-&amp;gt;opo_obj.do_lu)));
+       if (!fid_is_zero(lu_object_fid(&amp;amp;o-&amp;gt;opo_obj.do_lu)))
+               return;
+
        LASSERT(o-&amp;gt;opo_reserved);
        o-&amp;gt;opo_reserved = 0;

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Please correct me if I&apos;m wrong.&lt;/p&gt;</comment>
                            <comment id="52720" author="jhammond" created="Tue, 19 Feb 2013 18:27:43 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/5473&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/5473&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="52722" author="adilger" created="Tue, 19 Feb 2013 18:57:00 +0000"  >&lt;p&gt;I agree that fixing the LASSERT() is the first priority.  I don&apos;t think this is such a critical problem that is going to be hit by normal usage. &lt;/p&gt;

&lt;p&gt;However, if the truncate is sent to the MDS, but is then ignored, the client cannot send the RPC to the OSTs. Either the MDS needs to proxy the RPC for the client, or return some error code to the client (-EAGAIN?) so that it will get the layout and send the RPC on to the OSTs. &lt;/p&gt;</comment>
                            <comment id="52723" author="jhammond" created="Tue, 19 Feb 2013 19:10:58 +0000"  >&lt;p&gt;I admit that reproducer seems pretty unlikely.  To me the upshot of fixing this is that truncate()/ftruncate() could probably be added to racer.sh.  It won&apos;t hurt my feelings if this gets dropped from the blocker list.&lt;/p&gt;</comment>
                            <comment id="52730" author="bzzz" created="Wed, 20 Feb 2013 00:54:36 +0000"  >&lt;p&gt;frankly, this doesn&apos;t look like a solution. &lt;/p&gt;</comment>
                            <comment id="52734" author="bzzz" created="Wed, 20 Feb 2013 04:16:31 +0000"  >&lt;p&gt;I think few paths (including open/w, setattr) should be checking whether the striping has been already created, if not create it holding an exclusive lock.&lt;br/&gt;
later we&apos;ll wrap all this with appropriate layout lock.&lt;/p&gt;</comment>
                            <comment id="53352" author="adilger" created="Tue, 5 Mar 2013 13:49:21 +0000"  >&lt;p&gt;John, are you going to rework your patch based on Alex&apos;s comment, or does Alex need to work on that?&lt;/p&gt;</comment>
                            <comment id="53355" author="jhammond" created="Tue, 5 Mar 2013 14:10:55 +0000"  >&lt;p&gt;Sure, I&apos;ll give it a shot. I had stopped work on this after Alex&apos;s comment, which I may have misunderstood. Is disabling the assertion the correct band-aid here?&lt;/p&gt;</comment>
                            <comment id="53419" author="bzzz" created="Wed, 6 Mar 2013 03:38:39 +0000"  >&lt;p&gt;I tend to think that removing the assertion will just remove the only one symptom and hide all subsequent troubles we may get into.&lt;br/&gt;
there are number of issues in this area and I hope they will be solved almost automatically once we start to take locks around transactions.&lt;br/&gt;
as a temporary solution we could recognize the striping has been already created, return -EEXSIT and handle it in the caller ?&lt;/p&gt;</comment>
                            <comment id="53487" author="jay" created="Wed, 6 Mar 2013 20:06:49 +0000"  >&lt;p&gt;I did similar thing in patch 5291 to support sending size info to MDT in truncate RPC.&lt;/p&gt;</comment>
                            <comment id="54518" author="jhammond" created="Wed, 20 Mar 2013 22:27:58 +0000"  >&lt;p&gt;Jinshan&apos;s #5291 has resolved the LBUG().  There remains the issue of creating objects on truncate discussed at &lt;a href=&quot;http://review.whamcloud.com/5473&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/5473&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="68984" author="adilger" created="Tue, 15 Oct 2013 15:15:23 +0000"  >&lt;p&gt;Creating objects on truncate is what &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2808&quot; title=&quot;osp_object_assign_fid()) ASSERTION( fid_is_zero(lu_object_fid(&amp;amp;o-&amp;gt;opo_obj.do_lu)) ) failed:&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2808&quot;&gt;&lt;del&gt;LU-2808&lt;/del&gt;&lt;/a&gt; is all about.  Closing this bug, and assigning that one to John.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="10188">LU-2399</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="17020">LU-2523</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="12253" name="sys_o_delay_open_ftruncate.c" size="1513" author="jhammond" created="Wed, 13 Feb 2013 14:04:04 +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|hzvj33:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6797</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>