-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Investigate flaky test parallel/test-worker-message-port-transfer-terminate #30846
Comments
cc @nodejs/workers |
@joaocgreis By the way… any idea how for how to get proper stack traces in Windows release builds? 😄 I feel like this might have been caused by c712fb7 (the |
@addaleax if you're debugging locally, the easiest way is to build node on the console, and then open If you need the debugger to launch only when node crashes (to run in a loop for example) you can use this script: jitdebug.cmd@echo off
setlocal
set _command=%1
set _image=%2
if /i "%_command%" == "" (
set _command=on
) else if /i "%_command%" == "on" (
set _command=on
) else if /i "%_command%" == "off" (
set _command=off
) else (
echo Invalid command: %_command%. Must be either "on" or "off".
goto :eof
)
if "%_image%" == "" (
set _image=node.exe
)
if /i "%_command%" == "on" (
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%_image%" /v debugger /t REG_SZ /d vsjitdebugger.exe /f /reg:64
echo Just-In-Time debugging enabled for %_image%
) else (
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\%_image%" /v debugger /f /reg:64
echo Just-In-Time debugging disabled for %_image%
) I think there was a discussion somewhere about generating a memory dump automatically on crash, but I can't find it. IIRC, that was not straightforward. |
@bnoordhuis How consistently can you reproduce this (in the form of #30850)? Can you verify whether this makes a difference? diff --git a/src/node_worker.cc b/src/node_worker.cc
index 9976ec3f0ac0..c93a6e5b5a9e 100644
--- a/src/node_worker.cc
+++ b/src/node_worker.cc
@@ -189,8 +189,8 @@ class WorkerThreadData {
*static_cast<bool*>(data) = true;
}, &platform_finished);
- isolate->Dispose();
w_->platform_->UnregisterIsolate(isolate);
+ isolate->Dispose();
// Wait until the platform has cleaned up all relevant resources.
while (!platform_finished) My only theory so far would be that there’s a race condition window in which a new Also /cc @codebytere because we had a conversation about the order of these calls a while back which ended up in #30181 but in which I may have been mistaken about the order of the calls being irrelevant. |
With @addaleax at Node+JS Interactive, I was able to reproduce this bug on my laptop infrequently but multiple times nonetheless. With the patch she proposes above, I am now unable to reproduce. |
I previously thought the order of these calls was no longer relevant. I was wrong. This commit undoes the changes from 312c02d, adds a comment explaining why I was wrong, and flips the order of the calls elsewhere for consistency, the latter having been the goal of 312c02d. Fixes: nodejs#30846 Refs: nodejs#30181
I previously thought the order of these calls was no longer relevant. I was wrong. This commit undoes the changes from 312c02d, adds a comment explaining why I was wrong, and flips the order of the calls elsewhere for consistency, the latter having been the goal of 312c02d. Fixes: #30846 Refs: #30181 PR-URL: #30909 Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
I previously thought the order of these calls was no longer relevant. I was wrong. This commit undoes the changes from 312c02d, adds a comment explaining why I was wrong, and flips the order of the calls elsewhere for consistency, the latter having been the goal of 312c02d. Fixes: #30846 Refs: #30181 PR-URL: #30909 Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
I previously thought the order of these calls was no longer relevant. I was wrong. This commit undoes the changes from 312c02d, adds a comment explaining why I was wrong, and flips the order of the calls elsewhere for consistency, the latter having been the goal of 312c02d. Fixes: #30846 Refs: #30181 PR-URL: #30909 Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
On: https://ci.nodejs.org/computer/test-azure_msft-win10_vcbt2015-x64-4/
Ref: https://ci.nodejs.org/job/node-test-binary-windows-js-suites/69/RUN_SUBSET=1,nodes=win10-COMPILED_BY-vs2019/testReport/junit/(root)/test/parallel_test_worker_message_port_transfer_terminate/
The text was updated successfully, but these errors were encountered: