`<div dir="ltr">I spent a bit of time yesterday using dtrace and looking at the source. I believe I found why the system is falsely reporting that the current directory does not exist and have created a simple program to reproduce the problem. The problem seems to be related to when v_path in the vnode struct goes above a certain number of characters. This will only break on LOFS if inside the LX zone. Every time a program performs a chdir('..') and up to another dir the system stored working directory is falsely growing.<div><br></div><div>Here are the steps to reproduce.</div><div><br></div><div><div>1. Mount a ZFS dataset via LOFS for your LX zone.</div><div>2. Create a directory in the dataset called test</div><div>3. In the test directory create another directory called 'Chdir Test'</div><div>4. Run the program below. All this is doing is going up a directory and dropping down a directory. We want to fill up v_path.</div><div>5. The program will bomb before iteration 1000. Really there should be no limit.</div></div><div><br></div><div><br></div><div><div>import os</div><div>import time</div><div><br></div><div>#time.sleep(15)</div><div>os.chdir('/tank/bigtest/test')</div><div>for i in xrange(1000):</div><div> print i</div><div> os.chdir('Chdir Test')</div><div> os.getcwd()</div><div> os.chdir('..')</div></div><div><br></div><div><div>I used the following dtrace to get insight into what was happening (ran it from global zone).</div><div><br></div><div>dtrace -n 'fbt:genunix:vnodetopath_common:entry /pid == $target/ { printf("%s\n",stringof(args[1]->v_path)) }' -q -x strsize=4k -p 22482</div><div><br></div><div>Uncomment the sleep line so that you can determine the PID when running dtrace.</div></div><div><br></div></div>
`