Open matthiaskrgr opened 6 years ago
cc @eugeneo @ofrobots - I'm reasonably sure this is caused by freeing the memory of one of the uv_async_t
handles prematurely.
At a guess, the signalling from the close callback needs to be delayed until both close callbacks have happened (applies to both node_trace_buffer.cc and node_trace_writer.cc.)
I think https://github.com/nodejs/node/pull/21335 should fix it.
If this is still a problem, might it be the source of this that comes up in CI on Windows 10:
00:57:06 not ok 71 parallel/test-cli-node-options
00:57:06 ---
00:57:06 duration_ms: 2.627
00:57:06 severity: fail
00:57:06 exitcode: 1
00:57:06 stack: |-
00:57:06 assert.js:753
00:57:06 throw newErr;
00:57:06 ^
00:57:06
00:57:06 AssertionError [ERR_ASSERTION]: ifError got unwanted exception: Command failed: c:\workspace\node-test-binary-windows\Release\node.exe -e console.log("B")
00:57:06
00:57:06 at ChildProcess.exithandler (child_process.js:294:12)
00:57:06 at ChildProcess.emit (events.js:189:13)
00:57:06 at maybeClose (internal/child_process.js:977:16)
00:57:06 at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
00:57:06 ...
Above is from https://ci.nodejs.org/job/node-test-binary-windows/21941/COMPILED_BY=vs2017,RUNNER=win10,RUN_SUBSET=0/console and was on host test-azure_msft-win10-x64-4.
@nodejs/build Has this been resolved?
@nodejs/build Has this been resolved?
¯\(ツ)\/¯ This doesn't look like a build issue. It looks like it was an issue with trace events.
git repo (nodejs/node) @ 64de66d78888f46c74ba8b8ea18100a9f35a1c7a I was running
CFLAGS="-fsanitize=address -fno-sanitize=leak -g3" CXXFLAGS="$CFLAGS" LDFLAGS="-fsanitize=address -fno-sanitize=leak -g3" ASAN_OPTIONS=detect_leaks=0 make test -j 4
platform:Linux t470 4.17.0-2-MANJARO #1 SMP PREEMPT Fri Jun 8 07:13:17 UTC 2018 x86_64 GNU/Linux
I used clang 6.0 as CC/CXX.
During
make test
, I got a use after free: