title: Under what circumstances would a finally block not be reached?
body: <p>Other than the usual suspects (<code>process.exit()</code>, or process termination/signal, or crash/hardware failure), are there any circumstances where code in a finally block will not be reached?</p>
  <p>The following typescript code usually executes as expected (using node.js) but occasionally will terminate immediately at line 4 with no exceptions being raised or change in the process exit code (exits 0/success):</p>
  <pre><code>1 import si from 'systeminformation';
  2 async populateResolvedValue() {
  3   try {
  4     const osInfo = await si.osInfo();
  5     ...
  6   } finally {
  7     console.log('whew!');  //  &lt;=========== NOT REACHED!
  8   }
  9 }
  </code></pre>
  <p>I've verified this within an IJ debug session - the <code>finally</code> block on line 7 occasionally will not execute and will terminate immediately at line 4 (with some unwinding of the stack). The only case I know of where this could happen (and still exit successfully) is if a segfault is encountered somewhere within <code>someAsyncFunc()</code>, but I added &quot;segfault-handler&quot; and nothing showed up there.</p>
  <p>I have also tried this using Promise.then/finally rather than async/await with try/finally semantics - same exact behavior.</p>
  <p>node.js: v12.18.2 and v14.16.0</p>