Skip to content

src: fix race condition in `~NodeTraceBuffer`

Stress test CI looks good so far: https://ci.nodejs.org/job/node-stress-single-test/2146/ (️)


Libuv does not guarantee that handles have their close callbacks called in the order in which they were added (and in fact, currently calls them in reverse order).

This patch ensures that the flush_signal_ handle is no longer in use (i.e. its close callback has already been run) when we signal to the main thread that ~NodeTraceBuffer may be destroyed.

Credit for debugging goes to Gireesh Punathil.

Fixes: https://github.com/nodejs/node/issues/25512

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading