<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:33:07 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-3346] The assignment of obt_sb was removed</title>
                <link>https://jira.whamcloud.com/browse/LU-3346</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Coverity has found a strange piece of code in check_and_start_recovery_timer() function:&lt;/p&gt;

&lt;p&gt;if (!(lsi-&amp;gt;lsi_flags | LDD_F_IR_CAPABLE))&lt;br/&gt;
      service_time += 2 * (CONNECTION_SWITCH_MAX +&lt;br/&gt;
                           CONNECTION_SWITCH_INC);&lt;/p&gt;

&lt;p&gt;According to the tool, &apos;lsi-&amp;gt;lsi_flags | LDD_F_IR_CAPABLE&apos; is useless because it is always true. So it seems the developer meant to use &apos;&amp;amp;&apos; instead of &apos;|&apos;.&lt;/p&gt;

&lt;p&gt;But if we change the code accordingly, then we hit a number of issues because of unprotected access to recovery timer, as seen in &lt;a href=&quot;https://maloo.whamcloud.com/test_sessions/96125f26-bc36-11e2-b013-52540035b04c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://maloo.whamcloud.com/test_sessions/96125f26-bc36-11e2-b013-52540035b04c&lt;/a&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="19024">LU-3346</key>
            <summary>The assignment of obt_sb was removed</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</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="dmiter">Dmitry Eremin</assignee>
                                    <reporter username="sebastien.buisson">Sebastien Buisson</reporter>
                        <labels>
                            <label>build</label>
                            <label>coverity</label>
                    </labels>
                <created>Wed, 15 May 2013 14:06:33 +0000</created>
                <updated>Mon, 21 Oct 2013 19:44:46 +0000</updated>
                            <resolved>Sun, 14 Jul 2013 09:14:19 +0000</resolved>
                                    <version>Lustre 2.4.0</version>
                                    <fixVersion>Lustre 2.5.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="58569" author="dmiter" created="Wed, 15 May 2013 14:48:28 +0000"  >&lt;p&gt;The stack for crash is following:&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;05:23:08:Lustre: lustre-MDT0000: used disk, loading
05:23:08:LustreError: 11-0: lustre-MDT0000-lwp-MDT0000: Communicating with 0@lo, operation mds_connect failed with -11.
05:23:08:Lustre: DEBUG MARKER: PATH=/usr/lib64/lustre/tests:/usr/lib/lustre/tests:/usr/lib64/lustre/tests:/opt/iozone/bin:/opt/iozone/bin:/usr/lib64/lustre/tests/mpi:/usr/lib64/lustre/tests/racer:/usr/lib64/lustre/../lustre-iokit/sgpdd-survey:/usr/lib64/lustre/tests:/usr/lib64/lustre/u
05:23:08:LNet: 11898:0:(debug.c:324:libcfs_debug_str2mask()) You are trying to use a numerical value for the mask - this will be deprecated in a future release.
05:23:08:LNet: 11898:0:(debug.c:324:libcfs_debug_str2mask()) Skipped 1 previous similar message
05:23:08:Lustre: DEBUG MARKER: e2label /dev/lvm-MDS/P1 2&amp;gt;/dev/null
05:23:08:Lustre: DEBUG MARKER: lctl set_param fail_loc=0x194
05:23:08:Lustre: lustre-MDT0000: Will be in recovery for at least 1:00, or until 2 clients reconnect
05:23:08:BUG: unable to handle kernel NULL pointer dereference at 0000000000000290
05:23:08:IP: [&amp;lt;ffffffffa074059f&amp;gt;] target_handle_connect+0x249f/0x2d00 [ptlrpc]
05:23:08:PGD 0 
05:23:08:Oops: 0000 [#1] SMP 
05:23:08:last sysfs file: /sys/devices/system/cpu/possible
05:23:08:CPU 0 
05:23:08:Modules linked in: osp(U) lod(U) mdt(U) mgs(U) mgc(U) fsfilt_ldiskfs(U) osd_ldiskfs(U) lquota(U) mdd(U) lustre(U) lov(U) osc(U) mdc(U) fid(U) fld(U) ksocklnd(U) ptlrpc(U) obdclass(U) lnet(U) lvfs(U) sha512_generic sha256_generic libcfs(U) ldiskfs(U) jbd2 nfsd exportfs autofs4 nfs lockd fscache auth_rpcgss nfs_acl sunrpc ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_addr ipv6 ib_sa ib_mad ib_core microcode virtio_balloon 8139too 8139cp mii i2c_piix4 i2c_core ext3 jbd 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]
05:23:08:
05:23:08:Pid: 11705, comm: mdt00_002 Not tainted 2.6.32-358.6.1.el6_lustre.g309e05a.x86_64 #1 Red Hat KVM
05:23:08:RIP: 0010:[&amp;lt;ffffffffa074059f&amp;gt;]  [&amp;lt;ffffffffa074059f&amp;gt;] target_handle_connect+0x249f/0x2d00 [ptlrpc]
05:23:08:RSP: 0018:ffff880056b9fb70  EFLAGS: 00010246
05:23:08:RAX: 0000000000000000 RBX: ffff88006481e278 RCX: 0000000000000014
05:23:08:RDX: 0000000000000005 RSI: 0000000000000010 RDI: 0000000000000010
05:23:08:RBP: ffff880056b9fd10 R08: ffffffff81c07720 R09: 0000000000000000
05:23:08:R10: ffff8800667f42d1 R11: 0000000000010000 R12: ffff88007bcf4c00
05:23:08:R13: 0000000000000001 R14: ffff88006481e278 R15: ffff88007bcf4fa0
05:23:08:FS:  00007f06d06ba700(0000) GS:ffff880002200000(0000) knlGS:0000000000000000
05:23:08:CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
05:23:08:CR2: 0000000000000290 CR3: 0000000037446000 CR4: 00000000000006f0
05:23:08:DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
05:23:08:DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
05:23:08:Process mdt00_002 (pid: 11705, threadinfo ffff880056b9e000, task ffff880065172ae0)
05:23:08:Stack:
05:23:08: ffffffffa07e1bac ffffffffa07e1b9f 000000005190db27 000000005190db26
05:23:08:&amp;lt;d&amp;gt; 0000000200000000 0000000affffffff ffffffffffffffff ffff88006578a800
05:23:08:&amp;lt;d&amp;gt; ffff88006578a800 000000005190db27 ffffffffa07e1ba0 0000000200000001
05:23:08:Call Trace:
05:23:08: [&amp;lt;ffffffffa0dd745a&amp;gt;] mdt_connect+0x3a/0x4e0 [mdt]
05:23:08: [&amp;lt;ffffffffa0dc8df8&amp;gt;] mdt_handle_common+0x648/0x1660 [mdt]
05:23:08: [&amp;lt;ffffffffa0e058c5&amp;gt;] mds_regular_handle+0x15/0x20 [mdt]
05:23:08: [&amp;lt;ffffffffa078b3a8&amp;gt;] ptlrpc_server_handle_request+0x398/0xc60 [ptlrpc]
05:23:08: [&amp;lt;ffffffffa04795de&amp;gt;] ? cfs_timer_arm+0xe/0x10 [libcfs]
05:23:08: [&amp;lt;ffffffffa048ad8f&amp;gt;] ? lc_watchdog_touch+0x6f/0x170 [libcfs]
05:23:08: [&amp;lt;ffffffffa0782709&amp;gt;] ? ptlrpc_wait_event+0xa9/0x290 [ptlrpc]
05:23:08: [&amp;lt;ffffffff81055ab3&amp;gt;] ? __wake_up+0x53/0x70
05:23:08: [&amp;lt;ffffffffa078c73e&amp;gt;] ptlrpc_main+0xace/0x1700 [ptlrpc]
05:23:08: [&amp;lt;ffffffffa078bc70&amp;gt;] ? ptlrpc_main+0x0/0x1700 [ptlrpc]
05:23:08: [&amp;lt;ffffffff8100c0ca&amp;gt;] child_rip+0xa/0x20
05:23:08: [&amp;lt;ffffffffa078bc70&amp;gt;] ? ptlrpc_main+0x0/0x1700 [ptlrpc]
05:23:08: [&amp;lt;ffffffffa078bc70&amp;gt;] ? ptlrpc_main+0x0/0x1700 [ptlrpc]
05:23:08: [&amp;lt;ffffffff8100c0c0&amp;gt;] ? child_rip+0x0/0x20
05:23:08:Code: 00 00 00 31 d2 89 c8 f7 f6 ba 05 00 00 00 44 89 ef 83 f8 05 0f 42 c2 c1 ef 02 41 8d 44 45 05 8d 3c 38 48 8b 83 10 05 00 00 89 fe &amp;lt;48&amp;gt; 8b 80 90 02 00 00 8b 00 f6 c4 20 75 15 83 f9 05 b8 32 00 00 
05:23:08:RIP  [&amp;lt;ffffffffa074059f&amp;gt;] target_handle_connect+0x249f/0x2d00 [ptlrpc]
05:23:08: RSP &amp;lt;ffff880056b9fb70&amp;gt;
05:23:08:CR2: 0000000000000290
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&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;static void
check_and_start_recovery_timer(struct obd_device *obd,
                               struct ptlrpc_request *req,
                               int new_client)
{
        int service_time = lustre_msg_get_service_time(req-&amp;gt;rq_reqmsg);
        struct obd_device_target *obt = &amp;amp;obd-&amp;gt;u.obt;
        struct lustre_sb_info *lsi;

        if (!new_client &amp;amp;&amp;amp; service_time)
                /* Teach server about old server&apos;s estimates, as first guess
                 * at how long new requests will take. */
		at_measured(&amp;amp;req-&amp;gt;rq_rqbd-&amp;gt;rqbd_svcpt-&amp;gt;scp_at_estimate,
                            service_time);

        target_start_recovery_timer(obd);

	/* Convert the service time to RPC timeout,
	 * and reuse service_time to limit stack usage. */
	service_time = at_est2timeout(service_time);

	/* We expect other clients to timeout within service_time, then try
	 * to reconnect, then try the failover server.  The max delay between
	 * connect attempts is SWITCH_MAX + SWITCH_INC + INITIAL. */
        service_time += 2 * INITIAL_CONNECT_TIMEOUT;

        LASSERT(obt-&amp;gt;obt_magic == OBT_MAGIC);
        lsi = s2lsi(obt-&amp;gt;obt_sb);                &amp;lt;== obt-&amp;gt;obt_sb is NULL here!!!
	if (!(lsi-&amp;gt;lsi_flags &amp;amp; LDD_F_IR_CAPABLE))
                service_time += 2 * (CONNECTION_SWITCH_MAX +
                                     CONNECTION_SWITCH_INC);
        if (service_time &amp;gt; obd-&amp;gt;obd_recovery_timeout &amp;amp;&amp;amp; !new_client)
                extend_recovery_timer(obd, service_time, false);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="58643" author="dmiter" created="Thu, 16 May 2013 09:07:27 +0000"  >&lt;p&gt;The assignment of obt-&amp;gt;obt_sb was removed in a recent project. The peace of code with obt-&amp;gt;obt_sb usage from this function has never executed because of smart compiler remove it. This BUG was not discovered because we have IR so that even the timeout is much short it can still survive.&lt;/p&gt;</comment>
                            <comment id="58830" author="dmiter" created="Sat, 18 May 2013 09:54:04 +0000"  >&lt;p&gt;Patch set: &lt;a href=&quot;http://review.whamcloud.com/6357&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/6357&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="62251" author="dmiter" created="Sun, 14 Jul 2013 09:14:19 +0000"  >&lt;p&gt;It was covered by &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1330&quot; title=&quot;split/cleanup for obdclass/fid/fld modules&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1330&quot;&gt;&lt;del&gt;LU-1330&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="17451">LU-2753</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14032">LU-1330</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|hzvr27:</customfieldvalue>

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