<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:00:42 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-6492] less +F doesn&apos;t work</title>
                <link>https://jira.whamcloud.com/browse/LU-6492</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;node 1 streams data into an ever-growing file (e.g. a log file).&lt;/p&gt;

&lt;p&gt;node 2 can see the file changing with stat:&lt;/p&gt;

&lt;p&gt;$ stat logs/*.3&lt;br/&gt;
  File: `debug.o12716414.3&apos;&lt;br/&gt;
  Size: 33472307    Blocks: 65360      IO Block: 4194304 regular file&lt;br/&gt;
Device: 4a737072h/1249079410d   Inode: 144115224750877831  Links: 1&lt;br/&gt;
Access: (0664/&lt;del&gt;rw-rw-r&lt;/del&gt;-)  Uid: ( 1087/ tzuyenw)   Gid: ( 2117/teamcott)&lt;br/&gt;
Access: 2015-04-24 13:33:09.000000000 +0800&lt;br/&gt;
Modify: 2015-04-24 13:33:13.000000000 +0800&lt;br/&gt;
Change: 2015-04-24 13:33:13.000000000 +0800&lt;/p&gt;

&lt;p&gt;$ stat logs/*.3&lt;br/&gt;
  File: `debug.o12716414.3&apos;&lt;br/&gt;
  Size: 33485617    Blocks: 65360      IO Block: 4194304 regular file&lt;br/&gt;
Device: 4a737072h/1249079410d   Inode: 144115224750877831  Links: 1&lt;br/&gt;
Access: (0664/&lt;del&gt;rw-rw-r&lt;/del&gt;-)  Uid: ( 1087/ tzuyenw)   Gid: ( 2117/teamcott)&lt;br/&gt;
Access: 2015-04-24 13:33:09.000000000 +0800&lt;br/&gt;
Modify: 2015-04-24 13:33:18.000000000 +0800&lt;br/&gt;
Change: 2015-04-24 13:33:18.000000000 +0800&lt;/p&gt;

&lt;p&gt;On node 2, a tail -f (which calls fstat() to determine if the file has changed) works:&lt;/p&gt;

&lt;p&gt;13:34:45.548212 read(3, &quot;&quot;..., 8192) = 5118 &amp;lt;0.005387&amp;gt;&lt;br/&gt;
13:34:45.547101 write(1, &quot;&quot;..., 5118) = 5118 &amp;lt;0.001003&amp;gt;&lt;br/&gt;
13:34:45.555175 read(3, &quot;&quot;, 8192)       = 0 &amp;lt;0.000124&amp;gt;&lt;br/&gt;
13:34:45.555367 fstat(3, &lt;/p&gt;
{st_mode=S_IFREG|0664, st_size=33712023, ...}) = 0 &amp;lt;0.000100&amp;gt;&lt;br/&gt;
13:34:45.555566 nanosleep({1, 0}, NULL) = 0 &amp;lt;1.000124&amp;gt;&lt;br/&gt;
13:34:46.555811 fstat(3, {st_mode=S_IFREG|0664, st_size=33712023, ...}
&lt;p&gt;) = 0 &amp;lt;0.000185&amp;gt;&lt;br/&gt;
13:34:46.556136 nanosleep(&lt;/p&gt;
{1, 0}, NULL) = 0 &amp;lt;1.000118&amp;gt;&lt;br/&gt;
13:34:47.556374 fstat(3, {st_mode=S_IFREG|0664, st_size=33712023, ...}) = 0 &amp;lt;0.000175&amp;gt;&lt;br/&gt;
13:34:47.556684 nanosleep({1, 0}
&lt;p&gt;, NULL) = 0 &amp;lt;1.000134&amp;gt;&lt;br/&gt;
13:34:48.556948 fstat(3, &lt;/p&gt;
{st_mode=S_IFREG|0664, st_size=33712023, ...}) = 0 &amp;lt;0.000156&amp;gt;&lt;br/&gt;
13:34:48.557234 nanosleep({1, 0}, NULL) = 0 &amp;lt;1.000110&amp;gt;&lt;br/&gt;
13:34:49.557444 fstat(3, {st_mode=S_IFREG|0664, st_size=33712023, ...}
&lt;p&gt;) = 0 &amp;lt;0.037993&amp;gt;&lt;br/&gt;
13:34:49.595556 read(3, &quot;&quot;..., 8192) = 8192 &amp;lt;0.333306&amp;gt;&lt;br/&gt;
...&lt;br/&gt;
13:34:49.937886 read(3, &quot;&quot;, 8192)       = 0 &amp;lt;0.000126&amp;gt;&lt;br/&gt;
13:34:49.938080 fstat(3, &lt;/p&gt;
{st_mode=S_IFREG|0664, st_size=33725333, ...}
&lt;p&gt;) = 0 &amp;lt;0.000105&amp;gt;&lt;/p&gt;

&lt;p&gt;Interestingly, even though the file size didn&apos;t change (we can see the st_size there), it evidently indicated some kind of change (perhaps mtime?) because tail knew to try the read() again, and the read() succeeded. After the successful read, it did another read/fstat, and at that point the st_size was updated.&lt;/p&gt;

&lt;p&gt;However &quot;less&quot; in Follow mode (which doesn&apos;t do fstat() before read()) doesn&apos;t work:&lt;/p&gt;

&lt;p&gt;13:33:11.949002 nanosleep(&lt;/p&gt;
{1, 0}, 0x7fff832a7c30) = 0 &amp;lt;1.000156&amp;gt;&lt;br/&gt;
13:33:12.949280 read(4, &quot;&quot;, 5324)       = 0 &amp;lt;0.000028&amp;gt;&lt;br/&gt;
13:33:12.949752 nanosleep({1, 0}
&lt;p&gt;, 0x7fff832a7c30) = 0 &amp;lt;1.000155&amp;gt;&lt;br/&gt;
13:33:13.950040 read(4, &quot;&quot;, 5324)       = 0 &amp;lt;0.000031&amp;gt;&lt;br/&gt;
13:33:13.950496 nanosleep(&lt;/p&gt;
{1, 0}, 0x7fff832a7c30) = 0 &amp;lt;1.000148&amp;gt;&lt;br/&gt;
13:33:14.950767 read(4, &quot;&quot;, 5324)       = 0 &amp;lt;0.000029&amp;gt;&lt;br/&gt;
13:33:14.951249 nanosleep({1, 0}
&lt;p&gt;, 0x7fff832a7c30) = 0 &amp;lt;1.000150&amp;gt;&lt;br/&gt;
13:33:15.951520 read(4, &quot;&quot;, 5324)       = 0 &amp;lt;0.000026&amp;gt;&lt;br/&gt;
13:33:15.952015 nanosleep(&lt;/p&gt;
{1, 0}, 0x7fff832a7c30) = 0 &amp;lt;1.000147&amp;gt;&lt;br/&gt;
13:33:16.952287 read(4, &quot;&quot;, 5324)       = 0 &amp;lt;0.000029&amp;gt;&lt;br/&gt;
13:33:16.952738 nanosleep({1, 0}
&lt;p&gt;, 0x7fff832a7c30) = 0 &amp;lt;1.000148&amp;gt;&lt;br/&gt;
13:33:17.953009 read(4, &quot;&quot;, 5324)       = 0 &amp;lt;0.000026&amp;gt;&lt;br/&gt;
etc.&lt;/p&gt;

&lt;p&gt;Despite the fact that the file is growing (as seen by stat in another terminal), the read() acts like the file descriptor is still at the end of the file. The logfile grows every 10 seconds, but you can leave that less running for hours and hours, it&apos;ll never see it.&lt;/p&gt;</description>
                <environment>CentOS 6.4 x86_64</environment>
        <key id="29637">LU-6492</key>
            <summary>less +F doesn&apos;t work</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="5">Cannot Reproduce</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="nickt">Nick Tan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 24 Apr 2015 07:57:23 +0000</created>
                <updated>Sun, 10 Oct 2021 22:52:50 +0000</updated>
                            <resolved>Sun, 10 Oct 2021 22:52:50 +0000</resolved>
                                    <version>Lustre 2.5.3</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="133816" author="phils@dugeo.com" created="Wed, 18 Nov 2015 05:42:00 +0000"  >&lt;p&gt;This doesn&apos;t seem all that minor to me &amp;#8211; it&apos;s a pretty fundamental violation of the POSIX semantics on which Lustre was based, non?&lt;/p&gt;

&lt;p&gt;This bug is basically saying that if you&apos;re extending a file on one node, you can&apos;t rely on read() returning the correct result on another node.  That&apos;s &lt;b&gt;major&lt;/b&gt;!&lt;/p&gt;

&lt;p&gt;In fact, I&apos;m sure we had automated tests for cases exactly like this, back in 2005.  I&apos;m surprised a bug like this could even make it into a release.&lt;/p&gt;</comment>
                            <comment id="133853" author="rread" created="Wed, 18 Nov 2015 17:33:08 +0000"  >&lt;p&gt;Hey, Phil, nice to see you!&lt;/p&gt;

&lt;p&gt;I was curious so I tried to reproduce this on 2.7.0 and CentOS 6.7 using this:&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;[ec2-user@client00 ~]$ for i in $(seq 100); do echo &quot;$i $(date)&quot;; sleep 10; done &amp;gt; /mnt/scratch/test/watchme 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Then ran &quot;less +F&quot; on a different client, and I am seeing the updates as they are written:&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;~
~
1 Wed Nov 18 17:21:41 UTC 2015
2 Wed Nov 18 17:21:51 UTC 2015
3 Wed Nov 18 17:22:01 UTC 2015
4 Wed Nov 18 17:22:11 UTC 2015
5 Wed Nov 18 17:22:21 UTC 2015
6 Wed Nov 18 17:22:31 UTC 2015
7 Wed Nov 18 17:22:41 UTC 2015
8 Wed Nov 18 17:22:51 UTC 2015
9 Wed Nov 18 17:23:01 UTC 2015
10 Wed Nov 18 17:23:11 UTC 2015
11 Wed Nov 18 17:23:21 UTC 2015
12 Wed Nov 18 17:23:31 UTC 2015
13 Wed Nov 18 17:23:41 UTC 2015
14 Wed Nov 18 17:23:51 UTC 2015
15 Wed Nov 18 17:24:01 UTC 2015
Waiting for data... (interrupt to abort)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So either a bug crept into 2.5.3 (seems unlikely) or we&apos;ll need a more sophisticated reproducer. &lt;/p&gt;
</comment>
                            <comment id="134946" author="phils@dugeo.com" created="Wed, 2 Dec 2015 00:48:22 +0000"  >&lt;p&gt;H&#243;la, Roberto!&lt;/p&gt;

&lt;p&gt;That&apos;s... interesting.  It&apos;s 100% reproducible on my machine with a particular workload, but we&apos;ve poked around a few others and some workstations behave differently &amp;#8211; despite being (by all appearances) the same (same kernel, same version of Lustre, same mounts, same config).&lt;/p&gt;

&lt;p&gt;So it is indeed not quite so simple as it first appeared.  Fair enough.&lt;/p&gt;</comment>
                    </comments>
                    <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_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>lustre-2.5.3</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzxbhb:</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>