<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:42: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-4380] data corruption when copy a file to a new directory (sles11sp2 only)</title>
                <link>https://jira.whamcloud.com/browse/LU-4380</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Users reported a data corruption problem. We have a test script to reproduce the problem.&lt;/p&gt;

&lt;p&gt;When run in a Lustre file system with a sles11sp2 host as the remote host, the script fails (sum reports 00000).  It works if the remote host is running sles11sp1 or CentOS.&lt;/p&gt;

&lt;p&gt;&amp;#8212; cut here for test5.sh &amp;#8212;&lt;br/&gt;
#!/bin/sh&lt;/p&gt;

&lt;p&gt;host=${1:-endeavour2}&lt;br/&gt;
rm -fr zz hosts&lt;br/&gt;
cp /etc/hosts hosts&lt;br/&gt;
#fsync hosts&lt;br/&gt;
ssh $host &quot;cd $PWD &amp;amp;&amp;amp; mkdir -p zz &amp;amp;&amp;amp; cp hosts zz/&quot;&lt;br/&gt;
sum hosts zz/hosts&lt;br/&gt;
&amp;#8212; cut here &amp;#8212;&lt;/p&gt;

&lt;p&gt;Good result:&lt;br/&gt;
./test5.sh r301i0n0&lt;br/&gt;
61609    41 hosts&lt;br/&gt;
61609    41 zz/hosts&lt;/p&gt;

&lt;p&gt;Bad result:&lt;br/&gt;
./test5.sh r401i0n2&lt;br/&gt;
61609    41 hosts&lt;br/&gt;
00000    41 zz/hosts&lt;/p&gt;

&lt;p&gt;Notes:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;If the copied file is small enough (e.g., /etc/motd), the script succeeds.&lt;/li&gt;
	&lt;li&gt;If you uncomment the fsync, the script succeeds.&lt;/li&gt;
	&lt;li&gt;When it fails, stat reports no blocks have been allocated to the zz/hosts file:&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;$ stat zz/hosts&lt;br/&gt;
  File: `zz/hosts&apos;&lt;br/&gt;
  Size: 41820           Blocks: 0          IO Block: 2097152 regular file&lt;br/&gt;
Device: 914ef3a8h/2437870504d   Inode: 163153538715835056  Links: 1&lt;br/&gt;
Access: (0644/&lt;del&gt;rw-r&lt;/del&gt;&lt;del&gt;r&lt;/del&gt;-)  Uid: (10491/dtalcott)   Gid: ( 1179/  cstaff)&lt;br/&gt;
Access: 2013-12-12 09:24:46.000000000 -0800&lt;br/&gt;
Modify: 2013-12-12 09:24:46.000000000 -0800&lt;br/&gt;
Change: 2013-12-12 09:24:46.000000000 -0800&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;If you run in an NFS file system, the script usually succeeds, but sometimes reports a no such file error on the sum of zz/hosts.  After a few seconds, though, the file appears, with the correct sum.  (Typical NFS behavior.)&lt;/li&gt;
	&lt;li&gt;Acts the same on nbp7 and nbp8.&lt;/li&gt;
&lt;/ul&gt;


</description>
                <environment>server: centos 2.1.5 server OR centos 2.4.1 server&lt;br/&gt;
client: sles11sp2 2.4.1 client&lt;br/&gt;
&lt;br/&gt;
Source can be found at github.com/jlan/lustre-nas. The tag for the client is 2.4.1-1nasC.</environment>
        <key id="22447">LU-4380</key>
            <summary>data corruption when copy a file to a new directory (sles11sp2 only)</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="5">Cannot Reproduce</resolution>
                                        <assignee username="bogl">Bob Glossman</assignee>
                                    <reporter username="jaylan">Jay Lan</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Dec 2013 19:24:19 +0000</created>
                <updated>Thu, 13 Feb 2014 18:35:04 +0000</updated>
                            <resolved>Tue, 14 Jan 2014 23:12:15 +0000</resolved>
                                    <version>Lustre 2.4.1</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="73401" author="jaylan" created="Thu, 12 Dec 2013 19:45:30 +0000"  >&lt;p&gt;More date point. These client worked correctly:&lt;br/&gt;
centos: 2.4.0-3nasC tag.&lt;br/&gt;
sles11sp1: 2.1.5-1nasC tag.&lt;/p&gt;
</comment>
                            <comment id="73404" author="pjones" created="Thu, 12 Dec 2013 20:07:27 +0000"  >&lt;p&gt;Bob&lt;/p&gt;

&lt;p&gt;Could you please try and reproduce this issue?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="73537" author="adilger" created="Sat, 14 Dec 2013 10:48:56 +0000"  >&lt;p&gt;Is the &quot;cp&quot; on SLES11SP2 using the FIEMAP ioctl to determine if the file has data in it?  This sounds like an old bug (&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2580&quot; title=&quot;cp with FIEMAP support creates completely sparse file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2580&quot;&gt;&lt;del&gt;LU-2580&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3219&quot; title=&quot;FIEMAP does not sync data or return cached pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3219&quot;&gt;&lt;del&gt;LU-3219&lt;/del&gt;&lt;/a&gt;) that was already fixed. Is &lt;a href=&quot;http://review.whamcloud.com/6585&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/6585&lt;/a&gt; included on this client?&lt;/p&gt;</comment>
                            <comment id="73617" author="bogl" created="Mon, 16 Dec 2013 20:36:10 +0000"  >&lt;p&gt;Looking at the tagged version source 2.4.1-1nasC from github.com/jlan/lustre-nas mentioned it appears the fix for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3219&quot; title=&quot;FIEMAP does not sync data or return cached pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3219&quot;&gt;&lt;del&gt;LU-3219&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;http://review.whamcloud.com/6377&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/6377&lt;/a&gt;, is present in the client version being used.&lt;/p&gt;

&lt;p&gt;So far I haven&apos;t been able to reproduce this in a small test environment.  I suspect the /etc/hosts file I have isn&apos;t nearly big enough to show the problem.  I think I will need a bigger test file.&lt;/p&gt;

&lt;p&gt;It seems to me a text file like /etc/hosts should be really full of continuous text and wouldn&apos;t trigger problems of FIEMAP related to sparse files.   Wouldn&apos;t expect such a file to be sparse.&lt;/p&gt;</comment>
                            <comment id="73620" author="bogl" created="Mon, 16 Dec 2013 21:49:42 +0000"  >&lt;p&gt;went to a 2.4.1 client, still can&apos;t reproduce the problem.&lt;/p&gt;

&lt;p&gt;You specify the remote client, the one your script ssh&apos;s to, is sles11sp2.  You never mention what version of lustre or kernel the local client, the one your script starts out on and does local cp&apos;s on, is.&lt;/p&gt;</comment>
                            <comment id="73634" author="jaylan" created="Tue, 17 Dec 2013 00:06:11 +0000"  >&lt;p&gt;Hi Bob,&lt;/p&gt;

&lt;p&gt;Here is more input from our admin who came up with the reproducer. In the following&lt;br/&gt;
testing he used an adjacent sles11sp2 as local node and remote node.&lt;/p&gt;

&lt;p&gt;== quote on ==&lt;br/&gt;
I&apos;m not surprised they could not reproduce.&lt;/p&gt;

&lt;p&gt;I used various hosts as local or remote targets.  It always failed when the remote host was sles11sp2 and succeeded in other cases.&lt;/p&gt;

&lt;p&gt;I have one additional failure variant:&lt;/p&gt;

&lt;p&gt;$ ssh r401i0n0 &quot;cd $PWD &amp;amp;&amp;amp; ./test5.sh&quot; r401i0n1&lt;br/&gt;
61393  1670 hosts&lt;br/&gt;
48836  1670 zz/hosts&lt;/p&gt;

&lt;p&gt;$ cmp -l hosts zz/hosts | head&lt;br/&gt;
1048577 151   0&lt;br/&gt;
1048578  61   0&lt;br/&gt;
1048579 156   0&lt;br/&gt;
1048580  66   0&lt;br/&gt;
1048581  55   0&lt;br/&gt;
1048582 151   0&lt;br/&gt;
1048583 142   0&lt;br/&gt;
1048584  60   0&lt;br/&gt;
1048585  40   0&lt;br/&gt;
1048586 162   0&lt;/p&gt;

&lt;p&gt;Here, the local and remote hosts are adjacent sles11sp2 nodes.  Instead of the second copy of the file being completely empty, the missing blocks start after exactly 1 MiB.  I tried tweaking the stripe sizes of the source and destination directories, but the result was the same.&lt;/p&gt;

&lt;p&gt;I then used a bigger file.  The result is that all 1 MiB chunks but the last, partial one get copied okay.  But, remember that if the source file is very small, it gets copied completely okay also.&lt;br/&gt;
== quote off ==&lt;/p&gt;</comment>
                            <comment id="73771" author="adilger" created="Wed, 18 Dec 2013 18:19:41 +0000"  >&lt;p&gt;Jay, could you please run strace as part of your reproducer and attach the output from a failed run, to see whether the cp is using FIEMAP, and what results it gets back.  It may be that cp is not even trying to copy the data if it gets back a result that indicates the file is sparse or something.&lt;/p&gt;</comment>
                            <comment id="73779" author="bogl" created="Wed, 18 Dec 2013 18:44:33 +0000"  >&lt;p&gt;Continued efforts to reproduce the problem locally haven&apos;t panned out.  went to bigger test file, went to 2.4.1 clients, went to launching from one sles11sp2 client onto another as described.  all cases succeeded, no failures seen.  I must be doing something significantly different, but not sure what.&lt;/p&gt;</comment>
                            <comment id="73788" author="jaylan" created="Wed, 18 Dec 2013 20:00:06 +0000"  >&lt;p&gt;I passed along Andreas&apos; request to the tester.&lt;/p&gt;</comment>
                            <comment id="73793" author="jaylan" created="Wed, 18 Dec 2013 20:26:04 +0000"  >&lt;p&gt;Data from our admin:&lt;/p&gt;

&lt;p&gt;== quote on ==&lt;br/&gt;
This gets very interesting.  Here is the good stuff from the strace from the cp that happens on the remote host:&lt;/p&gt;

&lt;p&gt;stat(&quot;zz/&quot;, &lt;/p&gt;
{st_dev=makedev(3827, 595112), st_ino=163703357997847957, st_mode=S_
IFDIR|0755, st_nlink=2, st_uid=10491, st_gid=1179, st_blksize=4096, st_blocks=8, st_size=4096, st_atime=2013/12/18-11:30:20, st_mtime=2013/12/18-11:30:20, st_ctime=2013/12/18-11:30:20}
&lt;p&gt;) = 0&lt;br/&gt;
stat(&quot;hosts&quot;, &lt;/p&gt;
{st_dev=makedev(3827, 595112), st_ino=163571199807331126, st_mode=S_IFREG|0644, st_nlink=1, st_uid=10491, st_gid=1179, st_blksize=4194304, st_blocks=14336, st_size=8037670, st_atime=2013/12/18-11:30:20, st_mtime=2013/12/18-11:30:20, st_ctime=2013/12/18-11:30:20}
&lt;p&gt;) = 0&lt;br/&gt;
stat(&quot;zz/hosts&quot;, 0x7fffffffe6c0)        = -1 ENOENT (No such file or directory)&lt;br/&gt;
open(&quot;hosts&quot;, O_RDONLY)                 = 3&lt;br/&gt;
fstat(3, &lt;/p&gt;
{st_dev=makedev(3827, 595112), st_ino=163571199807331126, st_mode=S_IFREG|0644, st_nlink=1, st_uid=10491, st_gid=1179, st_blksize=4194304, st_blocks=14336, st_size=8037670, st_atime=2013/12/18-11:30:20, st_mtime=2013/12/18-11:30:20, st_ctime=2013/12/18-11:30:20}
&lt;p&gt;) = 0&lt;br/&gt;
open(&quot;zz/hosts&quot;, O_WRONLY|O_CREAT|O_EXCL, 0644) = 4&lt;br/&gt;
fstat(4, &lt;/p&gt;
{st_dev=makedev(3827, 595112), st_ino=163703357997847959, st_mode=S_IFREG|0644, st_nlink=1, st_uid=10491, st_gid=1179, st_blksize=4194304, st_blocks=0, st_size=0, st_atime=2013/12/18-11:30:20, st_mtime=2013/12/18-11:30:20, st_ctime=2013/12/18-11:30:20}
&lt;p&gt;) = 0&lt;br/&gt;
mmap(NULL, 4202496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fffec518000&lt;br/&gt;
ioctl(3, 0xc020660b, 0x7fffffffd390)    = 0&lt;br/&gt;
read(3, &quot;\37\213\10\0\373\353\202R\2\3\324&amp;lt;\375W\333\306\262\375\25\375\25\33!\32p\20\376H \201\3249&quot;..., 4194304) = 4194304&lt;br/&gt;
write(4, &quot;\37\213\10\0\373\353\202R\2\3\324&amp;lt;\375W\333\306\262\375\25\375\25\33!\32p\20\376H \201\3249&quot;..., 4194304) = 4194304&lt;br/&gt;
read(3, &quot;r\342B\316~\206g\324\35dn\263P\324.\302QAn\205\352\267\3640\370G\205L\222\17\242\327&quot;..., 3145728) = 3145728&lt;br/&gt;
write(4, &quot;r\342B\316~\206g\324\35dn\263P\324.\302QAn\205\352\267\3640\370G\205L\222\17\242\327&quot;..., 3145728) = 3145728&lt;br/&gt;
ftruncate(4, 8037670)                   = 0&lt;br/&gt;
close(4)                                = 0&lt;br/&gt;
close(3)                                = 0&lt;/p&gt;

&lt;p&gt;Now, if you study this, you see that cp did a read/write of 4 MiB and then a read/wrete of 3 MiB, and then uses ftruncate to set the size of the destination file to the st_size reported by the fstat(3, ...) call.  Where did cp come up with 7 MiB as the amount to copy?  From the st_blocks field in the fstat call.  Apparently, the sles11sp2 cp has been &quot;upgraded&quot; to pay attention to st_blocks, rather than just do the copy.&lt;/p&gt;

&lt;p&gt;== quote off ==&lt;/p&gt;
</comment>
                            <comment id="73797" author="bogl" created="Wed, 18 Dec 2013 20:46:00 +0000"  >&lt;p&gt;What is your specific kernel version in your sles11sp2?  I ask because over time there have been several.  Wondering if maybe different vfs level changes in the version you are using could explain why I&apos;m not seeing the problem reproducing.&lt;/p&gt;</comment>
                            <comment id="73799" author="jaylan" created="Wed, 18 Dec 2013 20:59:19 +0000"  >&lt;p&gt;The sles11sp2 version we are running in production is  3.0.74-0.6.6.2.&lt;/p&gt;
</comment>
                            <comment id="73802" author="bogl" created="Wed, 18 Dec 2013 21:10:17 +0000"  >&lt;p&gt;I believe the ioctl(3, 0xc020660b, 0x7fffffffd390) shown in the strace output is a FS_IOC_FIEMAP ioctl.  suspect that is where cp is getting the sizes to read/write.  interesting that it matches the file allocation size of 512b blocks reported in the st_blocks of the stat call and is smaller than the st_size reported in the stat call.&lt;/p&gt;</comment>
                            <comment id="73804" author="bogl" created="Wed, 18 Dec 2013 21:15:00 +0000"  >&lt;p&gt;all the sles versions I&apos;m testing with are newer than that.  I have some 3.0.93-0.5, the most recent version of sles11sp2 we build and ship on, and some 3.0.101-05, the most recent kernel update version for sles11sp2.&lt;/p&gt;</comment>
                            <comment id="73807" author="bogl" created="Wed, 18 Dec 2013 21:26:21 +0000"  >&lt;p&gt;just to collect some additional data could you please add the --sparse=never option to your cp commands, see if that avoids failures, and again get straces on the cp.&lt;/p&gt;</comment>
                            <comment id="73811" author="jaylan" created="Wed, 18 Dec 2013 21:37:11 +0000"  >&lt;p&gt;Here is the second part of Dale&apos;s reply in response to Andreas&apos; strace request. I did not include the second part in first attemp. He actually did try with --sparse=never.&lt;/p&gt;

&lt;p&gt;== quote on ==&lt;br/&gt;
So, there are two bugs here.  First, Lustre did not update st_blocks for the source file soon enough.  Second, sles11sp2&apos;s cp is too &quot;smart&quot; for its own good.&lt;/p&gt;

&lt;p&gt;FWIW:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;I used the sles11sp1 version of cp under sles11sp2 and it produced a correct copy, in spite of the bad st_blocks value.&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;I tried adding the --sparse=never option to cp to see if I could get it to ignore st_blocks.  That made it even stupider: It copied the 7 MiB as before, then explicitly filled the rest of st_size with zeros.&lt;br/&gt;
== quote off ==&lt;/li&gt;
&lt;/ul&gt;

</comment>
                            <comment id="73820" author="jaylan" created="Thu, 19 Dec 2013 01:23:17 +0000"  >&lt;p&gt;Hi Bob,&lt;/p&gt;

&lt;p&gt;&apos;/bin/cp&apos; command is packaged in coreutils in sles11sp2.&lt;br/&gt;
My version is coreutils-8.12-6.23.1. What version is yours?&lt;/p&gt;</comment>
                            <comment id="73826" author="niu" created="Thu, 19 Dec 2013 05:21:07 +0000"  >&lt;p&gt;This looks like the same problem as &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2580&quot; title=&quot;cp with FIEMAP support creates completely sparse file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2580&quot;&gt;&lt;del&gt;LU-2580&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Some data of the source file &apos;host&apos; is still cached on client but not flushed back to OST, so the st_blocks reproted by stat is less than actual file size, &apos;cp&apos; then think that is a sparse file and tries to copy only the extents get by fiemap ioctl.&lt;/p&gt;

&lt;p&gt;So what we need to figure out is: If the &apos;cp&apos; in sles11sp2 calls fiemap with FIEMAP_FLAG_SYNC flag to make sure all the cached data flush back before getting extents?&lt;/p&gt;</comment>
                            <comment id="73829" author="niu" created="Thu, 19 Dec 2013 07:07:28 +0000"  >&lt;p&gt;I checked the source code of coreutils-8.12 from gnu.org, looks FIEMAP_FLAG_SYNC is always set for reading extent, not sure if there is any difference with the copy on sles11sp2. (not sure where to get the source code of coreutils for sles11sp2)&lt;/p&gt;

&lt;p&gt;Bob, I guess your coreutils version isn&apos;t same as Jay&apos;s, that&apos;s why you can&apos;t reproduce the problem. Could you try coreutils-8.12-6.23.1?&lt;/p&gt;</comment>
                            <comment id="73849" author="bogl" created="Thu, 19 Dec 2013 15:47:16 +0000"  >&lt;p&gt;I have coreutils-8.12-6.25.29.1 on sles11sp2.&lt;/p&gt;</comment>
                            <comment id="73857" author="bogl" created="Thu, 19 Dec 2013 16:06:04 +0000"  >&lt;p&gt;Tried backing down to the -6.23.1 coreutils version. Still couldn&apos;t make the problem happen.  Looks like the binary cp is identical between the 2 versions anyway, I checked.&lt;br/&gt;
Package diffs must be elsewhere.&lt;/p&gt;</comment>
                            <comment id="73874" author="jaylan" created="Thu, 19 Dec 2013 18:52:50 +0000"  >&lt;p&gt;Niu, &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2580&quot; title=&quot;cp with FIEMAP support creates completely sparse file&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2580&quot;&gt;&lt;del&gt;LU-2580&lt;/del&gt;&lt;/a&gt; refered to fixes to &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2267&quot; title=&quot;sanity.sh test_52a test_52b: chattr, lsattr do not work for ZFS&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2267&quot;&gt;&lt;del&gt;LU-2267&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-2286&quot; title=&quot;Test failure on test suite parallel-scale, subtest test_write_append_truncate&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-2286&quot;&gt;&lt;del&gt;LU-2286&lt;/del&gt;&lt;/a&gt;. We have both patches in our 2.4.1 branch.&lt;/p&gt;
</comment>
                            <comment id="74055" author="niu" created="Tue, 24 Dec 2013 02:10:59 +0000"  >&lt;p&gt;Jay, could you try to reproduce with D_TRACE log enabled, let&apos;s try to see if sync flag is specified in fiemap call from the lustre log?&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;echo +trace &amp;gt; /proc/sys/lnet/debug&lt;/li&gt;
	&lt;li&gt;lctl debug_daemon start $tmpfile 300&lt;/li&gt;
	&lt;li&gt;lctl mark &quot;=== cp test ===&quot;&lt;/li&gt;
	&lt;li&gt;cp test&lt;/li&gt;
	&lt;li&gt;lctl mark &quot;=== cp test end ===&quot;&lt;/li&gt;
	&lt;li&gt;lctl debug_daemon stop&lt;/li&gt;
	&lt;li&gt;lctl debug_file $tmpfile $logfile&lt;/li&gt;
	&lt;li&gt;attach the $logfile in this ticket.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="74056" author="niu" created="Tue, 24 Dec 2013 02:32:00 +0000"  >&lt;p&gt;It&apos;s better to have this patch applied when collecting debug logs.&lt;/p&gt;</comment>
                            <comment id="74072" author="jaylan" created="Tue, 24 Dec 2013 21:03:44 +0000"  >&lt;p&gt;Attached is the debug output Niu requested. I did not run the test with Niu&apos;s patch though since I need to get authorization to put in new binary into production system.&lt;/p&gt;</comment>
                            <comment id="74073" author="jaylan" created="Tue, 24 Dec 2013 21:05:14 +0000"  >&lt;p&gt;I was asked to check with you guys if &quot;to have Lustre not implement the FIEMAP ioctl&quot; can be a good quick workaround?&lt;/p&gt;

&lt;p&gt;Note that in our case, the writer is on one host and the reader is on a different one. Is  this why FIEMAP_FLAG_SYNC has no effect: The _SYNC flag is on the reader host, but the cached data are on the writer host?&lt;/p&gt;</comment>
                            <comment id="74075" author="niu" created="Wed, 25 Dec 2013 02:50:20 +0000"  >&lt;blockquote&gt;&lt;p&gt;&lt;br/&gt;
Note that in our case, the writer is on one host and the reader is on a different one. Is this why FIEMAP_FLAG_SYNC has no effect: The _SYNC flag is on the reader host, but the cached data are on the writer host?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Ah, I was thinking it&apos;s on same client, but fix of &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3219&quot; title=&quot;FIEMAP does not sync data or return cached pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3219&quot;&gt;&lt;del&gt;LU-3219&lt;/del&gt;&lt;/a&gt; would force the writer to do flush before the reader calls fiemap. (Andreas &amp;amp; Bob mentioned it above)&lt;br/&gt;
Then we may need logs on both clients and ost, could you rerun the test and collect logs on two clients and the osts (with the objects stripped on)? and please enable D_TRACE, D_DLMTRACE and D_CACHE this time.&lt;/p&gt;</comment>
                            <comment id="74173" author="jaylan" created="Mon, 30 Dec 2013 20:33:39 +0000"  >&lt;p&gt;The tar gz file contains&lt;br/&gt;
    LU4380.dbg.rd.20131230&lt;br/&gt;
    LU4380.dbg.wr.20131230&lt;br/&gt;
Hmm, hope I did not get it wrong. The rd file is the local file where command was executed and the wr file was meant to be the remote file where file was created.&lt;/p&gt;

&lt;p&gt;I did not include a debug trace for the OSS. The &apos;lfs getstripe zz/hosts&apos; showed:&lt;br/&gt;
zz/hosts&lt;br/&gt;
lmm_magic:          0x0BD10BD0&lt;br/&gt;
lmm_seq:            0x247f48d69&lt;br/&gt;
lmm_object_id:      0x69e&lt;br/&gt;
lmm_stripe_count:   1&lt;br/&gt;
lmm_stripe_size:    1048576&lt;br/&gt;
lmm_stripe_pattern: 1&lt;br/&gt;
lmm_layout_gen:     0&lt;br/&gt;
lmm_stripe_offset:  80&lt;br/&gt;
	obdidx		 objid		 objid		 group&lt;br/&gt;
	    80	       3494638	     0x3552ee	             0&lt;/p&gt;

&lt;p&gt;and there are 26 OSTs on that fs. So, does it fall on oss3, if it starts from oss1?&lt;/p&gt;

&lt;p&gt;Do I have to turn on +trace +dlmtrace +cache on the complete oss?&lt;/p&gt;</comment>
                            <comment id="74175" author="jaylan" created="Mon, 30 Dec 2013 21:35:11 +0000"  >&lt;p&gt;I tried to run the test again, with debugging on OSS. The debug output did not contain lctl marks. The 300M specified in debug_daemon was not big enough.&lt;/p&gt;</comment>
                            <comment id="74178" author="jaylan" created="Mon, 30 Dec 2013 23:16:41 +0000"  >&lt;p&gt;I tried to run the test on an lustre filesystem that use older hardware but much less activities. I set debug file size to 2G.&lt;/p&gt;

&lt;p&gt;The problem was that &quot;lctl debug_daemon stop&quot; hanged until the 2G ran out. The debug file missed most part of the test. Same thing when I specified 1G&lt;/p&gt;</comment>
                            <comment id="74184" author="niu" created="Tue, 31 Dec 2013 02:37:27 +0000"  >&lt;p&gt;Thank you Jay.&lt;/p&gt;

&lt;p&gt;I guess wr is the client which execute the test script (which cp hosts file from /etc/hosts)? because I see the blocking ast from wr log:&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;00010000:00000001:28.0F:1388433400.002345:0:95598:0:(ldlm_lockd.c:1694:ldlm_handle_bl_callback()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000100:00000001:22.0:1388433400.002345:0:4805:0:(events.c:407:reply_out_callback()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving
00000100:00000001:29.0:1388433400.002346:0:54104:0:(service.c:1571:ptlrpc_server_hpreq_fini()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000100:00000001:29.0:1388433400.002346:0:54104:0:(service.c:1582:ptlrpc_server_hpreq_fini()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving
00000100:00000001:29.0:1388433400.002347:0:54104:0:(service.c:2078:ptlrpc_server_handle_request()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=1 : 1 : 1)
00000400:00000001:29.0:1388433400.002348:0:54104:0:(watchdog.c:448:lc_watchdog_disable()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00010000:00010000:28.0:1388433400.002348:0:95598:0:(ldlm_lockd.c:1696:ldlm_handle_bl_callback()) ### client blocking AST callback handler ns: nbp8-OST0050-osc-ffff8807e657ec00 lock: ffff880aa9efb480/0x11c2317b4b200a63 lrc: 3/0,0 mode: PW/PW res: [0x3552ee:0x0:0x0].0 rrc: 1 type: EXT [0-&amp;gt;18446744073709551615] (req 40960-&amp;gt;18446744073709551615) flags: 0x420000000000 nid: local remote: 0x42e20173aa80c345 expref: -99 pid: 63286 timeout: 0 lvb_type: 1
00000400:00000001:29.0:1388433400.002349:0:54104:0:(watchdog.c:456:lc_watchdog_disable()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving
00010000:00010000:28.0:1388433400.002354:0:95598:0:(ldlm_lockd.c:1709:ldlm_handle_bl_callback()) Lock ffff880aa9efb480 already unused, calling callback (ffffffffa08f79e0)
00000020:00000001:28.0:1388433400.002372:0:95598:0:(cl_lock.c:357:cl_lock_get_trust()) acquiring trusted reference: 0 ffff88089dfea238 18446744072108337004
00000020:00000001:28.0:1388433400.002374:0:95598:0:(cl_lock.c:150:cl_lock_trace0()) got mutex: ffff88089dfea238@(1 ffff880f181f8340 1 5 0 0 0 0)(ffff880404adca70/1/1) at cl_lock_mutex_tail():668
00000020:00000001:28.0:1388433400.002377:0:95598:0:(cl_lock.c:1839:cl_lock_cancel()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000020:00010000:28.0:1388433400.002378:0:95598:0:(cl_lock.c:150:cl_lock_trace0()) cancel lock: ffff88089dfea238@(1 ffff880f181f8340 1 5 0 0 0 0)(ffff880404adca70/1/1) at cl_lock_cancel():1840
00000020:00000001:28.0:1388433400.002381:0:95598:0:(cl_lock.c:804:cl_lock_cancel0()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000001:28.0:1388433400.002382:0:95598:0:(osc_lock.c:1305:osc_lock_flush()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000001:28.0:1388433400.002383:0:95598:0:(osc_cache.c:2827:osc_cache_writeback_range()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000001:28.0:1388433400.002386:0:95598:0:(osc_cache.c:2770:osc_cache_wait_range()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; entered
00000008:00000020:28.0:1388433400.002387:0:95598:0:(osc_cache.c:2807:osc_cache_wait_range()) obj ffff88105cc78408 ready 0|-|- wr 0|-|- rd 0|- sync file range.
00000008:00000001:28.0:1388433400.002388:0:95598:0:(osc_cache.c:2808:osc_cache_wait_range()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=0 : 0 : 0)
00000008:00000020:28.0:1388433400.002389:0:95598:0:(osc_cache.c:2923:osc_cache_writeback_range()) obj ffff88105cc78408 ready 0|-|- wr 0|-|- rd 0|- pageout [0, 18446744073709551615], 0.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think obj ffff88105cc78408 should be the source hosts on lustre, and when remote client try to cp it to zz directory, blocking ast should be sent to local client.&lt;/p&gt;

&lt;p&gt;The interesting thing is that I didn&apos;t see fiemap calls on remote client (&apos;rd&apos; client), maybe it did the copy by normal read. Anyway, I didn&apos;t see anything wrong from the log, did the test success or not?&lt;/p&gt;

&lt;p&gt;Since the remote client didn&apos;t call fiemap, we don&apos;t need ost log for now, thank you.&lt;/p&gt;</comment>
                            <comment id="74194" author="jaylan" created="Tue, 31 Dec 2013 18:33:17 +0000"  >&lt;p&gt;Please discard LU4380.dbg.20121230.tgz. The two files contained in the tarball had confusing names. (besides it should be 2013 &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.whamcloud.com/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; ) Here is the new tarball: LU4380.dbg.20131230.resend.tgz. Same two files with new names:&lt;br/&gt;
    LU4380.dbg.local.20131230&lt;br/&gt;
    LU4380.dbg.remote.20131230&lt;/p&gt;

&lt;p&gt;The fiemap was actually happened at the remote client, the one which actually did file creation and contents copying.&lt;/p&gt;

&lt;p&gt;I had a problem that I was not able to stop debug_daemon until good data were flushed out of the debug file at the OST side.  You need to tell me how to address that problem so that I can produce OST log for you.&lt;/p&gt;</comment>
                            <comment id="74225" author="niu" created="Thu, 2 Jan 2014 02:50:53 +0000"  >&lt;blockquote&gt;
&lt;p&gt;I had a problem that I was not able to stop debug_daemon until good data were flushed out of the debug file at the OST side. You need to tell me how to address that problem so that I can produce OST log for you.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;You can try to execute &apos;lctl clear&apos; on OSS to clear the debug buffer before testing. &lt;/p&gt;</comment>
                            <comment id="74524" author="jaylan" created="Tue, 7 Jan 2014 23:45:01 +0000"  >&lt;p&gt;I was wrong in saying that the reproducer can be run against 2.4.1 centos server. It actually was 2.4.0 server with patches. The branch was nas-2.4.0-1 and tag was 2.4.0-3nasS.&lt;/p&gt;

&lt;p&gt;We recently updated the 2.4.0 mds (for testing &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4403&quot; title=&quot;ASSERTION( lock-&amp;gt;l_readers &amp;gt; 0 )&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4403&quot;&gt;&lt;del&gt;LU-4403&lt;/del&gt;&lt;/a&gt;). Well, I am not able to reproduce the problem any more. The patches I picked up were:&lt;br/&gt;
&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4179&quot; title=&quot;LBUG ASSERTION( !lustre_handle_is_used(&amp;amp;lhc-&amp;gt;mlh_reg_lh) ) failed:&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4179&quot;&gt;&lt;del&gt;LU-4179&lt;/del&gt;&lt;/a&gt; mdt: skip open lock enqueue during resent&lt;br/&gt;
&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3992&quot; title=&quot;Fix NUMA emulated mode&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3992&quot;&gt;&lt;del&gt;LU-3992&lt;/del&gt;&lt;/a&gt; libcfs: Fix NUMA emulated mode&lt;br/&gt;
&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4139&quot; title=&quot;Significant perforamce issue when user over soft quota limit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4139&quot;&gt;&lt;del&gt;LU-4139&lt;/del&gt;&lt;/a&gt; quota: improve write performance when over softlimit&lt;br/&gt;
&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4336&quot; title=&quot;Client LBUG ASSERTION( id == qid[type] &quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4336&quot;&gt;&lt;del&gt;LU-4336&lt;/del&gt;&lt;/a&gt; quota: improper assert in osc_quota_chkdq()&lt;br/&gt;
&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4403&quot; title=&quot;ASSERTION( lock-&amp;gt;l_readers &amp;gt; 0 )&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4403&quot;&gt;&lt;del&gt;LU-4403&lt;/del&gt;&lt;/a&gt; mds: extra lock during resend lock lookup&lt;br/&gt;
&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4028&quot; title=&quot;lfs quota option to print allocated blocks and inode inaddtion to used&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4028&quot;&gt;&lt;del&gt;LU-4028&lt;/del&gt;&lt;/a&gt; quota: improve lfs quota output&lt;/p&gt;

&lt;p&gt;Which of the above could have changed the outcome?&lt;/p&gt;

&lt;p&gt;Also, do you expect it to work correctly when running 2.4.1 client against 2.1.5 server? I am still able to reproduce against 2.1.5 server.&lt;/p&gt;</comment>
                            <comment id="74538" author="niu" created="Wed, 8 Jan 2014 02:07:18 +0000"  >&lt;blockquote&gt;
&lt;p&gt;Which of the above could have changed the outcome?&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;All the patches seems not related to this problem, and I don&apos;t see why mds upgrading can change the outcome (I think this is a problem related only to client and OST). Could you verify the clients and OSS version? Do they all have the patch 58444c4e9bc58e192f0bc0c163a5d51d42ba4255 (&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3219&quot; title=&quot;FIEMAP does not sync data or return cached pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3219&quot;&gt;&lt;del&gt;LU-3219&lt;/del&gt;&lt;/a&gt;)?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Also, do you expect it to work correctly when running 2.4.1 client against 2.1.5 server? I am still able to reproduce against 2.1.5 server.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Does the 2.1.5 server have the patch 58444c4e9bc58e192f0bc0c163a5d51d42ba4255 applied?&lt;/p&gt;</comment>
                            <comment id="74740" author="mhanafi" created="Fri, 10 Jan 2014 17:53:09 +0000"  >&lt;p&gt;I have gathered clean debug logs from localclient, remoteclient and oss. The files are to large to attach here. I have uploaded it to your ftp site &apos;ftp://ftp.whamcloud.com/uploads&apos;&lt;/p&gt;

&lt;p&gt;The filename is &quot;LU_4380.debug.tgz&quot;&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;$ tar tzvf LU_4380.debug.tgz&lt;br/&gt;
&lt;del&gt;rw-r&lt;/del&gt;&lt;del&gt;r&lt;/del&gt;- root/root 215807901 2014-01-10 09:45 lu-4380.out.LOCALHOST&lt;br/&gt;
&lt;del&gt;rw-r&lt;/del&gt;&lt;del&gt;r&lt;/del&gt;- root/root   1198791 2014-01-10 09:45 lu-4380.out.OSS&lt;br/&gt;
&lt;del&gt;rw-r&lt;/del&gt;&lt;del&gt;r&lt;/del&gt;- root/root 135327548 2014-01-10 09:45 lu-4380.out.REMOTEHOST&lt;/p&gt;
&lt;hr /&gt;

</comment>
                            <comment id="74808" author="niu" created="Mon, 13 Jan 2014 04:37:58 +0000"  >&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;00000010:00000001:0.0:1389375898.914586:0:15540:0:(ost_handler.c:1261:ost_get_info()) &lt;span class=&quot;code-object&quot;&gt;Process&lt;/span&gt; leaving (rc=0 : 0 : 0)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Mahmoud, looks your OST is running on 2.1.5 and it doesn&apos;t have the patch 58444c4e9bc58e192f0bc0c163a5d51d42ba4255 (&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3219&quot; title=&quot;FIEMAP does not sync data or return cached pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3219&quot;&gt;&lt;del&gt;LU-3219&lt;/del&gt;&lt;/a&gt;) applied, so data corruption is expected.&lt;/p&gt;</comment>
                            <comment id="74971" author="jaylan" created="Tue, 14 Jan 2014 23:09:07 +0000"  >&lt;p&gt;We tested the 2.1.5 server with &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3219&quot; title=&quot;FIEMAP does not sync data or return cached pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3219&quot;&gt;&lt;del&gt;LU-3219&lt;/del&gt;&lt;/a&gt; patch and the problem went away.&lt;/p&gt;

&lt;p&gt;Since somehow we are no longer able to reproduce the problem with our 2.4.0&lt;br/&gt;
server (yes, &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-3219&quot; title=&quot;FIEMAP does not sync data or return cached pages&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-3219&quot;&gt;&lt;del&gt;LU-3219&lt;/del&gt;&lt;/a&gt; was included in 2.4.0 release), we can close this ticket. Thanks for your help!&lt;/p&gt;</comment>
                            <comment id="74972" author="pjones" created="Tue, 14 Jan 2014 23:12:15 +0000"  >&lt;p&gt;ok - thanks Jay!&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="18519">LU-3219</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="13948" name="LU-4380-debug.patch" size="526" author="niu" created="Tue, 24 Dec 2013 02:32:00 +0000"/>
                            <attachment id="13953" name="LU4380.dbg.20121230.resend.tgz" size="2278499" author="jaylan" created="Tue, 31 Dec 2013 18:33:17 +0000"/>
                            <attachment id="13952" name="LU4380.dbg.20121230.tgz" size="2278495" author="jaylan" created="Mon, 30 Dec 2013 20:33:39 +0000"/>
                            <attachment id="13949" name="LU4380.dbg.20131224" size="2890774" author="jaylan" created="Tue, 24 Dec 2013 21:03:44 +0000"/>
                    </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|hzwban:</customfieldvalue>

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