<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:06:11 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-14024] ofd_inconsistency_verification_main use after free on shutdown.</title>
                <link>https://jira.whamcloud.com/browse/LU-14024</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It seems &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12564&quot; title=&quot;ptlrpcd daemon sleeps while holding imp_lock spinlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12564&quot;&gt;&lt;del&gt;LU-12564&lt;/del&gt;&lt;/a&gt; patch is exposing a weakness in ofd_inconsistency_verification_main:&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;
        thread_set_flags(thread, SVC_STOPPED);
        wake_up_all(&amp;amp;thread-&amp;gt;t_ctl_waitq);
        spin_unlock(&amp;amp;ofd-&amp;gt;ofd_inconsistency_lock);
        lu_env_fini(&amp;amp;env);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;the spi-unlock then proceeds to crash on unmapped memory:&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;[405815.935072] BUG: unable to handle kernel paging request at ffff8802d78127f4
[405815.937427] IP: [&amp;lt;ffffffff8140a0e5&amp;gt;] do_raw_spin_unlock+0x5/0x90
[405815.953412] PGD 241c067 PUD 33e9f9067 PMD 33e93c067 PTE 80000002d7812063
[405815.955679] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
[405815.957829] Modules linked in: lustre(OE) ofd(OE) osp(OE) lod(OE) ost(OE) mdt(OE) mdd(OE) mgs(OE) osd_ldiskfs(OE) ldiskfs(OE) lquota(OE) lfsck(OE) obdecho(OE) mgc(OE) mdc(OE) lov(OE) osc(OE) lmv(OE) fid(OE) fld(OE) ptlrpc_gss(OE) ptlrpc(OE) obdclass(OE) ksocklnd(OE) lnet(OE) libcfs(OE) dm_flakey dm_mod pcc_cpufreq loop zfs(PO) zunicode(PO) zavl(PO) icp(PO) zcommon(PO) znvpair(PO) spl(O) jbd2 mbcache crc_t10dif crct10dif_generic sb_edac edac_core iosf_mbi crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd i2c_piix4 virtio_console virtio_balloon pcspkr ip_tables rpcsec_gss_krb5 ata_generic pata_acpi drm_kms_helper ttm drm ata_piix crct10dif_pclmul drm_panel_orientation_quirks crct10dif_common virtio_blk crc32c_intel libata serio_raw i2c_core floppy [last unloaded: libcfs]
[405816.028386] 
[405816.030183] CPU: 4 PID: 4908 Comm: inconsistency_v Kdump: loaded Tainted: P           OE  ------------   3.10.0-7.7-debug #1
[405816.048472] Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011
[405816.050687] task: ffff8802dc486d00 ti: ffff8802ca4f8000 task.ti: ffff8802ca4f8000
[405816.139729] RIP: 0010:[&amp;lt;ffffffff8140a0e5&amp;gt;]  [&amp;lt;ffffffff8140a0e5&amp;gt;] do_raw_spin_unlock+0x5/0x90
[405816.154191] RSP: 0018:ffff8802ca4fbd60  EFLAGS: 00010292
[405816.156260] RAX: 0000000000000000 RBX: ffff8802d78127e0 RCX: dead000000000200
[405816.166949] RDX: 0000000000000004 RSI: 0000000000000286 RDI: ffff8802d78127f0
[405816.171118] RBP: ffff8802ca4fbd68 R08: ffff8800ab47bb48 R09: ffffffff8221eb80
[405816.175495] R10: 0000000000000000 R11: 0000000000000400 R12: ffff8802d7812000
[405816.195126] R13: ffff8802d78127f0 R14: ffff8802dc486d00 R15: ffff88032514b680
[405816.204188] FS:  0000000000000000(0000) GS:ffff88033db00000(0000) knlGS:0000000000000000
[405816.209047] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[405816.218345] CR2: ffff8802d78127f4 CR3: 0000000001c10000 CR4: 00000000001607e0
[405816.234013] Call Trace:
[405816.236025]  [&amp;lt;ffffffff817d662e&amp;gt;] _raw_spin_unlock+0xe/0x20
[405816.252333]  [&amp;lt;ffffffffa0fd5472&amp;gt;] ofd_inconsistency_verification_main+0xd52/0xde0 [ofd]
[405816.259324]  [&amp;lt;ffffffff8140a129&amp;gt;] ? do_raw_spin_unlock+0x49/0x90
[405816.261588]  [&amp;lt;ffffffff810b93f0&amp;gt;] ? wake_up_atomic_t+0x30/0x30
[405816.263625]  [&amp;lt;ffffffffa0fd4720&amp;gt;] ? ofd_cb_soft_sync+0x240/0x240 [ofd]
[405816.265897]  [&amp;lt;ffffffff810b8254&amp;gt;] kthread+0xe4/0xf0
[405816.268022]  [&amp;lt;ffffffff810b8170&amp;gt;] ? kthread_create_on_node+0x140/0x140
[405816.270246]  [&amp;lt;ffffffff817e0ddd&amp;gt;] ret_from_fork_nospec_begin+0x7/0x21
[405816.272514]  [&amp;lt;ffffffff810b8170&amp;gt;] ? kthread_create_on_node+0x140/0x140
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I am not 100% sure how it unfolds but at the time of crash two other CPUs are running vfree from delayed work&lt;/p&gt;

&lt;p&gt;It almost sounds like the parallel ofd_fini thread does the vfree that&apos;s kicked out to the delayed work that has a better chance to run than both the ofd_fini and the inconsistency threads for some reason.&lt;/p&gt;

&lt;p&gt;It seems we really should do that unlock before the wake up call though.&lt;/p&gt;</description>
                <environment></environment>
        <key id="61176">LU-14024</key>
            <summary>ofd_inconsistency_verification_main use after free on shutdown.</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="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="green">Oleg Drokin</assignee>
                                    <reporter username="green">Oleg Drokin</reporter>
                        <labels>
                    </labels>
                <created>Mon, 12 Oct 2020 05:43:42 +0000</created>
                <updated>Thu, 4 Mar 2021 15:16:47 +0000</updated>
                            <resolved>Thu, 3 Dec 2020 14:38:58 +0000</resolved>
                                                    <fixVersion>Lustre 2.14.0</fixVersion>
                    <fixVersion>Lustre 2.12.7</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="282036" author="pjones" created="Mon, 12 Oct 2020 12:27:55 +0000"  >&lt;p&gt;IIUC the &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12564&quot; title=&quot;ptlrpcd daemon sleeps while holding imp_lock spinlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12564&quot;&gt;&lt;del&gt;LU-12564&lt;/del&gt;&lt;/a&gt; patch has not landed on any branch yet. Should it have a -1 until this issue has been worked out?&lt;/p&gt;</comment>
                            <comment id="282050" author="green" created="Mon, 12 Oct 2020 13:19:13 +0000"  >&lt;p&gt;the race seems to be very narrow and only hits when you try to stop a server side. Still I guess I&apos;ll try to contain it before landing &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-12564&quot; title=&quot;ptlrpcd daemon sleeps while holding imp_lock spinlock&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-12564&quot;&gt;&lt;del&gt;LU-12564&lt;/del&gt;&lt;/a&gt; to master.&lt;/p&gt;</comment>
                            <comment id="282081" author="gerrit" created="Mon, 12 Oct 2020 20:13:50 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/40222&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/40222&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14024&quot; title=&quot;ofd_inconsistency_verification_main use after free on shutdown.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14024&quot;&gt;&lt;del&gt;LU-14024&lt;/del&gt;&lt;/a&gt; ofd: Avoid use after free in ofd_inconsistency_verification_main&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: fa95b61f9227b6bde692cfdd59541bf1c5fafbe7&lt;/p&gt;</comment>
                            <comment id="286568" author="gerrit" created="Thu, 3 Dec 2020 07:26:12 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/40222/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/40222/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14024&quot; title=&quot;ofd_inconsistency_verification_main use after free on shutdown.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14024&quot;&gt;&lt;del&gt;LU-14024&lt;/del&gt;&lt;/a&gt; ofd: Avoid use after free in ofd_inconsistency_verification_main&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 1123bbd3fc4d5abeb111ddc6bd762d1fb2c1ce82&lt;/p&gt;</comment>
                            <comment id="286595" author="pjones" created="Thu, 3 Dec 2020 14:38:58 +0000"  >&lt;p&gt;Landed for 2.14&lt;/p&gt;</comment>
                            <comment id="286826" author="gerrit" created="Sun, 6 Dec 2020 05:45:18 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/40881&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/40881&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14024&quot; title=&quot;ofd_inconsistency_verification_main use after free on shutdown.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14024&quot;&gt;&lt;del&gt;LU-14024&lt;/del&gt;&lt;/a&gt; ofd: Avoid use after free in ofd_inconsistency_verification_main&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 678cd818a1892de0df59dc1ece741a7fc27b5ab8&lt;/p&gt;</comment>
                            <comment id="293911" author="gerrit" created="Thu, 4 Mar 2021 08:35:48 +0000"  >&lt;p&gt;Oleg Drokin (green@whamcloud.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/40881/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/40881/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-14024&quot; title=&quot;ofd_inconsistency_verification_main use after free on shutdown.&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-14024&quot;&gt;&lt;del&gt;LU-14024&lt;/del&gt;&lt;/a&gt; ofd: Avoid use after free in ofd_inconsistency_verification_main&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_12&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: b1e0ba8cfc5fd1aa000841b55420e89a96d9f6bc&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="56442">LU-12564</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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|i01c5z:</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>