You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
local fatal error for test/js-native-api/test_object/test.js #38040
$ out/Release/node test/js-native-api/test_object/test.js
node(1489,0x1095dfd40) malloc: *** error for object 0x13cf049e0: pointer being freed was not allocated
node(1489,0x1095dfd40) malloc: *** set a breakpoint in malloc_error_break to debug
[1] 1489 abort out/Release/node
Sometimes it fails with this abort, other times with a segmentation fault.
This may be an indication that V8 is not removing the weak callback once queued, even though we are calling ClearWeak() from the environment teardown-induced finalization loop. We may want to consider the alternative solution mentioned in #37616 (comment) to see if that prevents this problem.
@targos it will be helpful to share the node version that you are testing against. thanks!
@gabrielschulhof the tricky thing is that the ClearWeak() is expected to be called during the first pass callback. So that is the API contract that ClearWeak() will not clear the second pass callback. I've submitted an issue to v8 to discuss this https://bugs.chromium.org/p/v8/issues/detail?id=11608 . And as a fix from node when the cancellation of second pass callback is not available, I've submitted #38000 to address the issue.
Activity
targos commentedon Apr 2, 2021
targos commentedon Apr 2, 2021
@nodejs/node-api
gabrielschulhof commentedon Apr 2, 2021
This may be an indication that V8 is not removing the weak callback once queued, even though we are calling
ClearWeak()from the environment teardown-induced finalization loop. We may want to consider the alternative solution mentioned in #37616 (comment) to see if that prevents this problem.mhdawson commentedon Apr 9, 2021
This may be related: #38000
legendecas commentedon Apr 9, 2021
@targos it will be helpful to share the node version that you are testing against. thanks!
@gabrielschulhof the tricky thing is that the
ClearWeak()is expected to be called during the first pass callback. So that is the API contract thatClearWeak()will not clear the second pass callback. I've submitted an issue to v8 to discuss this https://bugs.chromium.org/p/v8/issues/detail?id=11608 . And as a fix from node when the cancellation of second pass callback is not available, I've submitted #38000 to address the issue.targos commentedon Apr 11, 2021
@legendecas I'm testing with the master branch.
targos commentedon Apr 14, 2021
Saw it crash in a GitHub workflow too: https://github.com/nodejs/node/runs/2338974533
richardlau commentedon Apr 14, 2021
The GitHub Actions build-tarball workflow has been consistently failing due to this test crashing after 78343bb / #37263: https://github.com/nodejs/node/actions/workflows/build-tarball.yml?query=branch%3Amaster

BethGriggs commentedon Apr 14, 2021
Does it make sense to temporarily revert 78343bb / #37263 to see if that brings us back to passing actions runs?
cc: @ExE-Boss, @aduh95
jasnell commentedon Apr 15, 2021
It looks like #38250 may fix this.
src: fix finalization crash
src: fix finalization crash
src: fix finalization crash
src: fix finalization crash
src: fix finalization crash