title: Why I can't do cpu-profiling when the process blocking by String(str).replace(some_regexp, '') in Node.js?
body: <p>For Example，blow function <code>testReplace</code> will blocking the Node.js process: </p>
  
  <pre><code>function testReplace() {
      let str = '&lt;br/&gt;                                                        早餐后自由活动，于指定时间集合自行办理退房手续。';
      str += '&lt;br/&gt;                                      &lt;br/&gt;                                        &lt;br/&gt;                                    &lt;br/&gt;';
      str += '                                    &lt;br/&gt;                                                                                                                        &lt;br/&gt;';
      str += '                                                &lt;br/&gt;                                                                                                            &lt;br/&gt;';
      str += '                                                                                                                    根据船班时间，自行前往暹粒机场，返回中国。&lt;br/&gt;';
      str += '如需送机服务，需增加280/每单。&lt;br/&gt;';
  
      let r = String(str).replace(/(^(\s*?&lt;br[\s\/]*?&gt;\*?)+|(\s*?&lt;br[\s\/]*?&gt;\s*?)+?$)/igm, '');
      console.log(str)
  }
  </code></pre>
  
  <p>And I want to know where is the blocking function, so I use <code>v8-profiler</code> to do cpu-profiling when the process blocking, such as:</p>
  
  <pre><code>v8Profiler.startProfiling('easy_monitor', true);
  setTimeout(() =&gt; {
      let profile = v8Profiler.stopProfiling('easy_monitor');
      profile.delete();
  }, 5000);
  </code></pre>
  
  <p>but this always throw error:</p>
  
  <pre><code>Bus error: 10
  </code></pre>
  
  <p>How can I resolve this problem? If you can help me I'll really appreciate to you ：）</p>