title: How to find the location where a perl script (linux process) is hung
body: <p>I have a very hard to reproduce condition where a perl process gets hung. I am not sure where it is hung. <code>ps ax | grep &lt;process name&gt;</code> shows stat column as SN which I understand means it is sleeping and is running at nice priority. </p>
  
  <p>I looked over the script (there is a ton of code in there) but cannot see any particular sleep that lasts over more than a few seconds (this process has been sleeping for more than a day).</p>
  
  <p>I can't restart and add log to the Perl scripts because the condition may not be reproduced. I can try <code>strace</code> but wondering if there is a better mechanism</p>