<div dir="ltr">I was running the setup script for a program in a new OVZ7 Centos CT, and it hung forever. <br><br>The line where it hung was this:<div><br>password=`cat /dev/urandom | tr -dc &#39;a-zA-Z0-9&#39; | fold -w 32 | head -n 1`</div><div><br></div><div>I ran the following command in various environments:</div><div><br></div><div>time cat /dev/urandom | tr -dc &#39;a-zA-Z0-9&#39; | fold -w 32 | head -n 1<br><br>In an ordinary physical host, a VM, an OVZ host, and in an LXD container, the results are as follows:<br><br><div>root@akita:~#  time cat /dev/urandom | tr -dc &#39;a-zA-Z0-9&#39; | fold -w 32 | head -n 1</div><div>EozLZFPO0nu9UXR77LR6veKodVT9vYNW</div><div><br></div><div>real<span style="white-space:pre">        </span>0m0.008s</div><div>user<span style="white-space:pre">        </span>0m0.003s</div><div>sys<span style="white-space:pre">        </span>0m0.004s</div><div>root@akita:~#</div></div><div><br></div><div>But in any OVZ 7 CT, the following occurs:</div><div><br></div><div><div>root@dbserv:~# time cat /dev/urandom | tr -dc &#39;a-zA-Z0-9&#39; | fold -w 32 | head -n 1</div><div>YtdP0ZUlfNKX1Vlh0VaBVZmO894HbsEp</div></div><div>&lt; hang indefinitely, or until CTRL-C&gt;</div><div><div>^C</div><div><br></div><div>real<span style="white-space:pre">        </span>4m36.571s</div><div>user<span style="white-space:pre">        </span>1m54.928s</div><div>sys<span style="white-space:pre">        </span>4m51.873s</div><div>root@dbserv:~# </div></div><div><br>Interestingly, the problem does not seem to be with /dev/urandom, as the output is generated immediately. But the process does not end after being piped into &#39;head -1&#39;.<br><br>So, for whatever reason, the behavior of this one liner is very different inside an OVZ 7 CT than it is anywhere else. <br><br>Your thoughts?<br><br>Jake</div></div>