<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:50:12 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-5290] Oops in cl_req_completion()</title>
                <link>https://jira.whamcloud.com/browse/LU-5290</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In cl_req_alloc() if we cannot allocate req-&amp;gt;crq_o then we pass an unitialized request to cl_req_completion().&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;struct cl_req *cl_req_alloc(&lt;span class=&quot;code-keyword&quot;&gt;const&lt;/span&gt; struct lu_env *env, struct cl_page *page,
                            &lt;span class=&quot;code-keyword&quot;&gt;enum&lt;/span&gt; cl_req_type crt, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; nr_objects)
{
        struct cl_req *req;

        LINVRNT(nr_objects &amp;gt; 0);
        ENTRY;

        OBD_ALLOC_PTR(req);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (req != NULL) {
                &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; result;

                OBD_ALLOC(req-&amp;gt;crq_o, nr_objects * sizeof req-&amp;gt;crq_o[0]);
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (req-&amp;gt;crq_o != NULL) {
                        req-&amp;gt;crq_nrobjs = nr_objects;
                        req-&amp;gt;crq_type = crt;
                        CFS_INIT_LIST_HEAD(&amp;amp;req-&amp;gt;crq_pages);
                        CFS_INIT_LIST_HEAD(&amp;amp;req-&amp;gt;crq_layers);
                        result = cl_req_init(env, req, page);
                } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
                        result = -ENOMEM;
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (result != 0) {
                        cl_req_completion(env, req, result);
                        req = ERR_PTR(result);
                }
        } &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt;
                req = ERR_PTR(-ENOMEM);
        RETURN(req);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;In cl_req_completion() this will Oops when we try to walk crq_layers().&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;[ 3063.937684] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 3063.938591] IP: [&amp;lt;ffffffffa046dd46&amp;gt;] cl_req_completion+0x46/0x4a0 [obdclass]
[ 3063.940089] PGD 1e25ae067 PUD 1db4a0067 PMD 0
[ 3063.940089] Oops: 0000 [#1] SMP
[ 3063.940089] last sysfs file: /sys/devices/system/cpu/online
[ 3063.940089] CPU 5
[ 3063.940089] Modules linked in: lustre(U) ofd(U) osp(U) lod(U) ost(U) mdt(U) mdd(U) mgs\
(U) nodemap(U) osd_ldiskfs(U) ldiskfs(U) exportfs lquota(U) lfsck(U) jbd obdecho(U) mgc(U\
) lov(U) osc(U) mdc(U) lmv(U) fid(U) fld(U) ptlrpc(U) obdclass(U) ksocklnd(U) lnet(U) sha\
512_generic sha256_generic libcfs(U) autofs4 nfs lockd fscache auth_rpcgss nfs_acl sunrpc\
 ipv6 microcode virtio_balloon virtio_net i2c_piix4 i2c_core ext4 jbd2 mbcache virtio_blk\
 virtio_pci virtio_ring virtio pata_acpi ata_generic ata_piix dm_mirror dm_region_hash dm\
_log dm_mod [last unloaded: speedstep_lib]
[ 3063.949064]
[ 3063.949064] Pid: 2419, comm: ldlm_bl_01 Not tainted 2.6.32-431.5.1.el6.lustre.x86_64 #\
1 Bochs Bochs
[ 3063.949064] RIP: 0010:[&amp;lt;ffffffffa046dd46&amp;gt;]  [&amp;lt;ffffffffa046dd46&amp;gt;] cl_req_completion+0x4\
6/0x4a0 [obdclass]
[ 3063.949064] RSP: 0018:ffff8802183937c0  EFLAGS: 00010286
[ 3063.949064] RAX: 0000000000000000 RBX: ffff8801da8afa88 RCX: 0000000000000000
[ 3063.949064] RDX: 00000000fffffff4 RSI: fffffffffffffff0 RDI: ffff880215b18390
[ 3063.949064] RBP: ffff8802183937e0 R08: 0000000000000000 R09: ffff8801de50e420
[ 3063.949064] R10: 09f911029d74e35b R11: 00000000000000c8 R12: ffff880215b18390
[ 3063.949064] R13: 00000000fffffff4 R14: ffff8801da8afab8 R15: ffff880206ab2de0
[ 3063.949064] FS:  0000000000000000(0000) GS:ffff880030200000(0000) knlGS:00000000000000\
00
[ 3063.949064] CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
[ 3063.949064] CR2: 0000000000000000 CR3: 00000001e20bf000 CR4: 00000000000006e0
[ 3063.949064] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 3063.949064] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 3063.949064] Process ldlm_bl_01 (pid: 2419, threadinfo ffff880218392000, task ffff88021\
80605c0)
[ 3063.949064] Stack:
[ 3063.949064]  ffff8801da8afa88 ffff880215b18390 fffffffffffffff4 0000000000000001
[ 3063.949064] &amp;lt;d&amp;gt; ffff880218393830 ffffffffa046e537 0000000000000001 00000001de9fb988
[ 3063.949064] &amp;lt;d&amp;gt; ffff8801f15fdb48 0000000000000000 ffff880206ab2de0 ffff8802183938e0
[ 3063.949064] Call Trace:
[ 3063.949064]  [&amp;lt;ffffffffa046e537&amp;gt;] cl_req_alloc+0x397/0x470 [obdclass]
[ 3063.949064]  [&amp;lt;ffffffffa0949c41&amp;gt;] osc_build_rpc+0x3e1/0x1750 [osc]
[ 3063.949064]  [&amp;lt;ffffffffa0962dad&amp;gt;] ? osc_extent_make_ready+0x70d/0xbf0 [osc]
[ 3063.949064]  [&amp;lt;ffffffff8105a1c2&amp;gt;] ? __wake_up+0x32/0x70
[ 3063.949064]  [&amp;lt;ffffffffa0966b08&amp;gt;] osc_io_unplug0+0x1528/0x1f20 [osc]
[ 3063.949064]  [&amp;lt;ffffffff812aa82d&amp;gt;] ? pointer+0x8d/0x830
[ 3063.949064]  [&amp;lt;ffffffff812a961c&amp;gt;] ? put_dec+0x10c/0x110
[ 3063.949064]  [&amp;lt;ffffffff812a990e&amp;gt;] ? number+0x2ee/0x320
[ 3063.949064]  [&amp;lt;ffffffff812aa82d&amp;gt;] ? pointer+0x8d/0x830
[ 3063.949064]  [&amp;lt;ffffffffa0969601&amp;gt;] osc_io_unplug+0x11/0x20 [osc]
[ 3063.949064]  [&amp;lt;ffffffffa096b466&amp;gt;] osc_cache_writeback_range+0xc76/0xfb0 [osc]
[ 3063.949064]  [&amp;lt;ffffffffa02d5c2d&amp;gt;] ? cfs_hash_rw_lock+0x1d/0x30 [libcfs]
[ 3063.949064]  [&amp;lt;ffffffffa02d5c2d&amp;gt;] ? cfs_hash_rw_lock+0x1d/0x30 [libcfs]
[ 3063.949064]  [&amp;lt;ffffffffa0467a55&amp;gt;] ? cl_lock_mutex_get+0x85/0xe0 [obdclass]
[ 3063.949064]  [&amp;lt;ffffffffa09568a4&amp;gt;] osc_lock_flush+0x84/0x280 [osc]
[ 3063.949064]  [&amp;lt;ffffffffa0467a55&amp;gt;] ? cl_lock_mutex_get+0x85/0xe0 [obdclass]
[ 3063.949064]  [&amp;lt;ffffffffa0956b86&amp;gt;] osc_lock_cancel+0xe6/0x1c0 [osc]
[ 3063.949064]  [&amp;lt;ffffffffa0465ed5&amp;gt;] cl_lock_cancel0+0x75/0x160 [obdclass]
[ 3063.949064]  [&amp;lt;ffffffffa0466afb&amp;gt;] cl_lock_cancel+0x13b/0x140 [obdclass]
[ 3063.949064]  [&amp;lt;ffffffffa095817a&amp;gt;] osc_ldlm_blocking_ast+0x13a/0x350 [osc]
[ 3063.949064]  [&amp;lt;ffffffffa0666150&amp;gt;] ldlm_handle_bl_callback+0x130/0x400 [ptlrpc]
[ 3063.949064]  [&amp;lt;ffffffffa0668251&amp;gt;] ldlm_bl_thread_main+0x281/0x400 [ptlrpc]
[ 3063.949064]  [&amp;lt;ffffffff81067bc0&amp;gt;] ? default_wake_function+0x0/0x20
[ 3063.949064]  [&amp;lt;ffffffffa0667fd0&amp;gt;] ? ldlm_bl_thread_main+0x0/0x400 [ptlrpc]
[ 3063.949064]  [&amp;lt;ffffffff8109eab6&amp;gt;] kthread+0x96/0xa0
[ 3063.949064]  [&amp;lt;ffffffff8100c30a&amp;gt;] child_rip+0xa/0x20
[ 3063.949064]  [&amp;lt;ffffffff81554710&amp;gt;] ? _spin_unlock_irq+0x30/0x40
[ 3063.949064]  [&amp;lt;ffffffff8100bb10&amp;gt;] ? restore_args+0x0/0x30
[ 3063.949064]  [&amp;lt;ffffffff8109ea20&amp;gt;] ? kthread+0x0/0xa0
[ 3063.949064]  [&amp;lt;ffffffff8100c300&amp;gt;] ? child_rip+0x0/0x20
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This was found using fault injection.&lt;/p&gt;</description>
                <environment></environment>
        <key id="25416">LU-5290</key>
            <summary>Oops in cl_req_completion()</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="1">Fixed</resolution>
                                        <assignee username="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>clio</label>
                            <label>malloc</label>
                            <label>osc</label>
                            <label>patch</label>
                    </labels>
                <created>Wed, 2 Jul 2014 22:32:02 +0000</created>
                <updated>Thu, 14 Jun 2018 21:41:36 +0000</updated>
                            <resolved>Mon, 27 Apr 2015 20:25:18 +0000</resolved>
                                    <version>Lustre 2.6.0</version>
                                    <fixVersion>Lustre 2.7.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="88440" author="jhammond" created="Tue, 8 Jul 2014 16:00:41 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/11009&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/11009&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="88461" author="jay" created="Tue, 8 Jul 2014 17:18:08 +0000"  >&lt;p&gt;I have a patch to get rid of cl_req entirely but it can only be landed after cl_lock simplification patch is landed. Based on the likelihood of this issue in real production, I would suggest we revisit this ticket and apply my patch later after patch 10858 is landed.&lt;/p&gt;</comment>
                            <comment id="88527" author="jhammond" created="Tue, 8 Jul 2014 20:42:04 +0000"  >&lt;p&gt;OK I have reworked the patch so that it fixed the oops and is nearly trivial. Please inspect.&lt;/p&gt;

&lt;p&gt;I know that this allocation is unlikely to fail in production. But the overall hardening of Lustre against errors like this is valuable and memory allocation fault injection gives us an easy was to force the error path. So I believe we should test and fix all allocations no matter how small.&lt;/p&gt;</comment>
                            <comment id="90043" author="jhammond" created="Fri, 25 Jul 2014 14:26:06 +0000"  >&lt;p&gt;Patch landed to master.&lt;/p&gt;</comment>
                            <comment id="92031" author="jlevi" created="Wed, 20 Aug 2014 12:50:30 +0000"  >&lt;p&gt;Reopening to add label&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </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|hzwqhz:</customfieldvalue>

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