<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5639</bug_id>
          
          <creation_ts>2013-12-06 12:52:17 +0000</creation_ts>
          <short_desc>NFS: directory usr/lib contains a readdir loop</short_desc>
          <delta_ts>2014-07-28 15:34:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>connectivity</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.6</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tudor Florea">tudor.florea</reporter>
          <assigned_to name="Jason Wessel">jason.wessel</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>andrax.g.necula</cc>
    
    <cc>bluelightning</cc>
    
    <cc>cristian.iorga</cc>
    
    <cc>jason.wessel</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yi.zhao</cc>
          
          <qa_contact name="Andra Necula">andrax.g.necula</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>39271</commentid>
    <comment_count>0</comment_count>
    <who name="Tudor Florea">tudor.florea</who>
    <bug_when>2013-12-06 12:52:17 +0000</bug_when>
    <thetext>&quot;ls&quot; command on different directories with many files (e.g. /usr/lib/) produce the following output on console:

NFS: directory usr/lib contains a readdir loop.Please contact your server vendor.  The file: audit has duplicate cookie 421165640
Some files are is not listed. Some files are duplicated.


 
Reproduced on custom image based on:
Build Configuration:
BB_VERSION        = &quot;1.21.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-12.10&quot;
TARGET_SYS        = &quot;i586-poky-linux&quot;
MACHINE           = &quot;qemux86&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.5+snapshot-20131206&quot;
TUNE_FEATURES     = &quot;m32 i586&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;master:a17ffbdbb7d142a94ef842a32b749b18e2e7f0a1&quot;


runqemu-extract-sdk tmp/deploy/images/qemuppc/&lt;custom-image&gt;-qemuppc.tar.gz tmp/deploy/images/qemuppc/rootfs/
runqemu tmp/deploy/images/qemuppc/vmlinux-qemuppc.bin tmp/deploy/images/qemuppc/rootfs/

This happens on HW targets also.

This seems to be related to https://bugzilla.redhat.com/show_bug.cgi?id=739222 which was closed as duplicated of restriceted case https://bugzilla.redhat.com/show_bug.cgi?id=813070</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39327</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-12-10 23:26:21 +0000</bug_when>
    <thetext>This seems to be an issue in Dora also, this is setup from the unfs-server-native, it might even be an older problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39331</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-12-11 08:41:20 +0000</bug_when>
    <thetext>Tudor, on what arches have you tried?
I see that your conf is specifying the qemux86 but your rootfs is qemuppc.

I have tried with a qemux86-64 built image and didn&apos;t see this issue.

commit c51730aaa91066cfb51ad6ec2920fb4f9d9ea94c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39332</commentid>
    <comment_count>3</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2013-12-11 10:02:45 +0000</bug_when>
    <thetext>I also can not reproduce this issue on qemuarm, qemumips, and qemuppc with 1.6 M1 rc1 build. (git rev: master/c51730aaa91066cfb51ad6ec2920fb4f9d9ea94c)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39333</commentid>
    <comment_count>4</comment_count>
    <who name="Tudor Florea">tudor.florea</who>
    <bug_when>2013-12-11 10:05:23 +0000</bug_when>
    <thetext>Alexandru,
I don;t think the arch is relevant.
I reporduced now the issue on vanilla core-image-sato on powerpc:

bitbake core-image-sato

Build Configuration:
BB_VERSION        = &quot;1.21.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-12.10&quot;
TARGET_SYS        = &quot;powerpc-poky-linux&quot;
MACHINE           = &quot;qemuppc&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.5+snapshot-20131211&quot;
TUNE_FEATURES     = &quot;m32 fpu-hard ppc7400 altivec&quot;
TARGET_FPU        = &quot;&quot;
meta              
meta-yocto        
meta-yocto-bsp    = &quot;master:a17ffbdbb7d142a94ef842a32b749b18e2e7f0a1&quot;

bitbake meta-ide-support

runqemu-extract-sdk tmp/deploy/images/qemuppc/core-image-sato-qemuppc.tar.bz2 tmp/deploy/images/qemuppc/rootfs

runqemu tmp/deploy/images/qemuppc/vmlinux-qemuppc.bin tmp/deploy/images/qemuppc/rootfs</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39342</commentid>
    <comment_count>5</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-12-11 15:23:46 +0000</bug_when>
    <thetext>Okay, managed to reproduce:

root@qemux86-64:~/standalone-automated-MAR-4/sudoku-savant-1.3# ls /usr/lib/pkNFS: directory usr/lib contains a readdir loop.Please contact your server vendor.  The file: xml2Conf.sh has duplicate cookie 1167227051
NFS: directory usr/lib contains a readdir loop.Please contact your server vendor.  The file: xml2Conf.sh has duplicate cookie 1167227051
oNFS: directory usr/lib contains a readdir loop.Please contact your server vendor.  The file: xml2Conf.sh has duplicate cookie 1167227051
NFS: directory usr/lib contains a readdir loop.Please contact your server vendor.  The file: xml2Conf.sh has duplicate cookie 1167227051
^C
onfig/kdNFS: directory lib/pkgconfig contains a readdir loop.Please contact your server vendor.  The file: xcb-screensaver.pc has duplicate cookie 4106177285
NFS: directory lib/pkgconfig contains a readdir loop.Please contact your server vendor.  The file: xcb-screensaver.pc has duplicate cookie 4106177285

Seems that when pressing tab for autocomplete goes crazy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39344</commentid>
    <comment_count>6</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-12-11 15:51:00 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Okay, managed to reproduce:
&gt; 
&gt; root@qemux86-64:~/standalone-automated-MAR-4/sudoku-savant-1.3# ls
&gt; /usr/lib/pkNFS: directory usr/lib contains a readdir loop.Please contact
&gt; your server vendor.  The file: xml2Conf.sh has duplicate cookie 1167227051
&gt; NFS: directory usr/lib contains a readdir loop.Please contact your server
&gt; vendor.  The file: xml2Conf.sh has duplicate cookie 1167227051
&gt; oNFS: directory usr/lib contains a readdir loop.Please contact your server
&gt; vendor.  The file: xml2Conf.sh has duplicate cookie 1167227051
&gt; NFS: directory usr/lib contains a readdir loop.Please contact your server
&gt; vendor.  The file: xml2Conf.sh has duplicate cookie 1167227051
&gt; ^C
&gt; onfig/kdNFS: directory lib/pkgconfig contains a readdir loop.Please contact
&gt; your server vendor.  The file: xcb-screensaver.pc has duplicate cookie
&gt; 4106177285
&gt; NFS: directory lib/pkgconfig contains a readdir loop.Please contact your
&gt; server vendor.  The file: xcb-screensaver.pc has duplicate cookie 4106177285
&gt; 
&gt; Seems that when pressing tab for autocomplete goes crazy.

Testing the two versions (for qemux86 and qemux86-64) got me to paste the log from qemux86-64 in this qemux86 machine. I can confirm that the same type of issue happens on both arches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39347</commentid>
    <comment_count>7</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-12-11 15:52:31 +0000</bug_when>
    <thetext>*** Bug 5638 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39349</commentid>
    <comment_count>8</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-12-11 15:54:19 +0000</bug_when>
    <thetext>*** Bug 5637 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39351</commentid>
    <comment_count>9</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-12-11 16:20:52 +0000</bug_when>
    <thetext>Yi, what is your host machine OS and which image did you test with?  Please 
test with -sato or -sato-sdk, I wonder if it&apos;s image size dependant.

Alex: What host OSes did you test with?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39354</commentid>
    <comment_count>10</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-12-11 16:47:01 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; Yi, what is your host machine OS and which image did you test with?  Please 
&gt; test with -sato or -sato-sdk, I wonder if it&apos;s image size dependant.
&gt; 
&gt; Alex: What host OSes did you test with?

Ubuntu 13.10 64bit.

I will try now with f19 64bit to see if this happens there too. I tested with sato-sdk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39355</commentid>
    <comment_count>11</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-12-11 17:15:52 +0000</bug_when>
    <thetext>The bug reproduces in FC19 64bit as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39356</commentid>
    <comment_count>12</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-12-11 17:17:35 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; I also can not reproduce this issue on qemuarm, qemumips, and qemuppc with
&gt; 1.6 M1 rc1 build. (git rev: master/c51730aaa91066cfb51ad6ec2920fb4f9d9ea94c)

Yi, try to reproduce it by booting up the qemu with serial. The error should show in the serial console!

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39357</commentid>
    <comment_count>13</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2013-12-11 17:25:50 +0000</bug_when>
    <thetext>Saul,
this happens for Sato only image as well!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39358</commentid>
    <comment_count>14</comment_count>
    <who name="Tudor Florea">tudor.florea</who>
    <bug_when>2013-12-11 17:30:00 +0000</bug_when>
    <thetext>Reproduced the bug on qemux86, core-image-sato as well.
The issue has to do with the number of file is one directory exported rather than the size of the image:
root@qemux86:/tmp1# ls -1 | wc -l
79
root@qemux86:/tmp1# touch 80
root@qemux86:/tmp1# ls -1 | wc -l
80
root@qemux86:/tmp1# touch 81
root@qemux86:/tmp1# ls -1 | wc -l
203</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39359</commentid>
    <comment_count>15</comment_count>
    <who name="Tudor Florea">tudor.florea</who>
    <bug_when>2013-12-11 17:31:39 +0000</bug_when>
    <thetext>the error pops up on the console only.
However one may see the issue using dmesg</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39381</commentid>
    <comment_count>16</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-12-12 21:56:12 +0000</bug_when>
    <thetext>This is clearly related to our unfs_server, which is quite old and this problem 
may have been around for a while and we just have not hit it directly like 
this.  It seems to be a know issue, there are a couple of other userspace nfs 
servers around that I am looking at as alternatives.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39383</commentid>
    <comment_count>17</comment_count>
    <who name="Jason Wessel">jason.wessel</who>
    <bug_when>2013-12-12 22:42:34 +0000</bug_when>
    <thetext>In case you are actually curious what causes this problem it has to do with the 64 bit ext3 / ext4 fs&apos;s.  Modern kernels use a 64 bit hash for readdir / telldir, and nfsv2 cannot support this, becuase the inode hash is 32 bit.  The directory loops and such are a direct product of the hash being the same for two different directories. 

The solution used in Wind River Linux was to use unfs3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40748</commentid>
    <comment_count>18</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-02-27 15:41:21 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=162dd389301ce238b5003d6b4f6031256532508b

Addition of UNFS3 and supporting changes to qemu resolves this issue</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44758</commentid>
    <comment_count>19</comment_count>
    <who name="Andra Necula">andrax.g.necula</who>
    <bug_when>2014-07-28 15:34:26 +0000</bug_when>
    <thetext>Verified on branch &apos;origin/master&apos; commit addeef1dc91306175824b1f5587e40a22773cff4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>