<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:08:17 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-7368] e2fsck unsafe to interrupt with quota enabled</title>
                <link>https://jira.whamcloud.com/browse/LU-7368</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;It looks there is a bug in how e2fsck handles being interrupted by CTRL-C.  If CTRL-C is pressed to kill e2fsck rather than e.g. &lt;tt&gt;kill -9&lt;/tt&gt;, then the interrupt handler sets E2F_FLAG_CANCEL in the context but doesn&apos;t actually kill the process.  Instead, e2fsck_pass1() checks this flag before processing the next inode.&lt;/p&gt;

&lt;p&gt;If a filesystem is running in fix mode (&lt;tt&gt;e2fsck -fy&lt;/tt&gt;) is interrupted, and the quota feature is enabled, then the quota file will still be written to disk even though the inode scan was not complete and the quota information is totally inaccurate.  Even worse, if the Pass 1 inode and block scan was not finished, then the in-memory block bitmaps (which are used for block allocation during e2fsck) are also invalid, so any blocks allocated to the quota files may corrupt other files if those blocks were actually used.&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;      e2fsck 1.42.13.wc3 (28-Aug-2015)
      Pass 1: Checking inodes, blocks, and sizes
      ^C[QUOTA WARNING] Usage inconsistent for ID 0:
          actual (6455296, 168) != expected (8568832, 231)
      [QUOTA WARNING] Usage inconsistent for ID 695:
          actual (614932320256, 63981) != expected (2102405386240, 176432)
      Update quota info for quota type 0? yes
    
      [QUOTA WARNING] Usage inconsistent for ID 0:
          actual (6455296, 168) != expected (8568832, 231)
      [QUOTA WARNING] Usage inconsistent for ID 538:
          actual (614932320256, 63981) != expected (2102405386240, 176432)
      Update quota info for quota type 1? yes
    
      myth-OST0001: e2fsck canceled.
      myth-OST0001: ***** FILE SYSTEM WAS MODIFIED *****
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It also looks like the journal may also be recreated after e2fsck is interrupted, if it was deleted during pass 1 because of corruption.&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;&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; void signal_cancel(&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; sig EXT2FS_ATTR((unused)))
{
       e2fsck_t ctx = e2fsck_global_ctx;

       &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!ctx)
               exit(FSCK_CANCELED);

       ctx-&amp;gt;flags |= E2F_FLAG_CANCEL;
}

&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; main()
{
        :
	sa.sa_handler = signal_cancel;
	sigaction(SIGINT, &amp;amp;sa, 0);
	sigaction(SIGTERM, &amp;amp;sa, 0);
	:
	:
       run_result = e2fsck_run(ctx);
       e2fsck_clear_progbar(ctx);

       &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!ctx-&amp;gt;invalid_bitmaps &amp;amp;&amp;amp;
           (ctx-&amp;gt;flags &amp;amp; E2F_FLAG_JOURNAL_INODE)) {
		&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (fix_problem(ctx, PR_6_RECREATE_JOURNAL, &amp;amp;pctx)) {
			:
			:
			retval = ext2fs_add_journal_inode(fs, journal_size, 0);
		}
	}

no_journal:
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (ctx-&amp;gt;qctx) {
		&lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (i = 0; i &amp;lt; MAXQUOTAS; i++) {
			retval = quota_compare_and_update(ctx-&amp;gt;qctx, i, &amp;amp;needs_writeout);
		}
	}

	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (run_result &amp;amp; E2F_FLAG_ABORT)
		fatal_error(ctx, _(&lt;span class=&quot;code-quote&quot;&gt;&quot;aborted&quot;&lt;/span&gt;));
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;This should have a cancel check right after the return from e2fsck_run() rather than trying to recover the journal and quota files? I can imagine that there is a desire to flush out modified inodes and such that have been repaired, so that restarting an interrupted e2fsck will make progress, but the quota file update is plain wrong unless at least pass1 has finished, and the journal recreation is also dangerous if the block bitmaps have not been fully updated.&lt;/p&gt;

&lt;p&gt;The quota problem was hit in on a system, but the journal problem is only a theory at this point.  I&apos;m working on a patch but wanted to solicit input in case there is something that I&apos;m missing.&lt;/p&gt;</description>
                <environment></environment>
        <key id="32950">LU-7368</key>
            <summary>e2fsck unsafe to interrupt with quota enabled</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="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="niu">Niu Yawei</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                    </labels>
                <created>Mon, 2 Nov 2015 08:45:42 +0000</created>
                <updated>Thu, 13 Oct 2016 18:27:35 +0000</updated>
                            <resolved>Fri, 11 Dec 2015 21:07:37 +0000</resolved>
                                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>9</watches>
                                                                            <comments>
                            <comment id="132314" author="gerrit" created="Mon, 2 Nov 2015 09:01:06 +0000"  >&lt;p&gt;Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/17012&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/17012&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7368&quot; title=&quot;e2fsck unsafe to interrupt with quota enabled&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7368&quot;&gt;&lt;del&gt;LU-7368&lt;/del&gt;&lt;/a&gt; e2fsck: skip quota update when interrupted&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: d0a356e7eb376dcce3b0088ecea40c44987b8d2b&lt;/p&gt;</comment>
                            <comment id="132518" author="jgmitter" created="Tue, 3 Nov 2015 18:23:01 +0000"  >&lt;p&gt;Hi Niu,&lt;br/&gt;
Can you take a look at the patch?&lt;br/&gt;
Thanks.&lt;br/&gt;
Joe&lt;/p&gt;</comment>
                            <comment id="133431" author="gerrit" created="Fri, 13 Nov 2015 11:04:52 +0000"  >&lt;p&gt;Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/17150&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/17150&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7368&quot; title=&quot;e2fsck unsafe to interrupt with quota enabled&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7368&quot;&gt;&lt;del&gt;LU-7368&lt;/del&gt;&lt;/a&gt; e2fsck: skip quota update when interrupted&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 5ec2d95a9789cc48af2a439c133f711f1d956349&lt;/p&gt;</comment>
                            <comment id="135076" author="adilger" created="Thu, 3 Dec 2015 13:15:22 +0000"  >&lt;p&gt;Patch has been accepted into upstream e2fsprogs.  Working on a -wc4 release for this as well.&lt;/p&gt;</comment>
                            <comment id="135276" author="adilger" created="Fri, 4 Dec 2015 19:44:31 +0000"  >&lt;p&gt;Niu, the conf-sanity test_84 subtest is failing 100% with &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7428&quot; title=&quot;conf-sanity test_84, replay-dual 0a: /dev/lvm-Role_MDS/P1 failed to initialize!&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7428&quot;&gt;&lt;del&gt;LU-7428&lt;/del&gt;&lt;/a&gt; for all new patches pushed to e2fsprogs:&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;CMD: shadow-21vm12 e2label /dev/lvm-Role_MDS/P1 				2&amp;gt;/dev/null | grep -E &apos;:[a-zA-Z]{3}[0-9]{4}&apos;
Update not seen after 90s: wanted &apos;&apos; got &apos;lustre:MDT0000&apos;
 conf-sanity test_84: @@@@@@ FAIL: /dev/lvm-Role_MDS/P1 failed to initialize!
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;What this means is that the e2label command run from mount_utils_ldiskfs.c to set the label is being lost.  I don&apos;t know if the problem is due to the test itself, or due to e2fsprogs changes, or both, but the patches can&apos;t land as-is or they will break all testing.&lt;/p&gt;

&lt;p&gt;Could you please investigate.&lt;/p&gt;</comment>
                            <comment id="135370" author="niu" created="Mon, 7 Dec 2015 09:04:01 +0000"  >&lt;p&gt;Ok, I was trying to reproduce it locally, but failed. Will continue to investigate it further.&lt;/p&gt;</comment>
                            <comment id="135702" author="gerrit" created="Wed, 9 Dec 2015 19:51:20 +0000"  >&lt;p&gt;Andreas Dilger (andreas.dilger@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/17150/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/17150/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-7368&quot; title=&quot;e2fsck unsafe to interrupt with quota enabled&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-7368&quot;&gt;&lt;del&gt;LU-7368&lt;/del&gt;&lt;/a&gt; e2fsck: skip quota update when interrupted&lt;br/&gt;
Project: tools/e2fsprogs&lt;br/&gt;
Branch: master-lustre&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 18b6aca349550ca6f2cf65462c575f9b502670cc&lt;/p&gt;</comment>
                            <comment id="136104" author="adilger" created="Fri, 11 Dec 2015 21:07:37 +0000"  >&lt;p&gt;Patch landed for e2fsprogs 1.42.13.wc4 release.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="32992">LU-7381</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="33136">LU-7428</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="40586">LU-8706</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|hzxryv:</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>