jerryscript
jerryscript copied to clipboard
Waiting the remaining tcp data are sent
So that the tcp socket are closed by debugger client first and the debugger client won't receive socket are closed by remote error
The error message:
Test command:
cmd \
/S \
/C \
C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe \
D:\a\jerryscript\jerryscript\tools\runners/run-debugger-test.py \
D:\a\jerryscript\jerryscript\build\tests\jerry_debugger_tests\local\bin\jerry.exe \
websocket \
D:\a\jerryscript\jerryscript\jerry-debugger/jerry_client.py \
tests\debugger\do_abort
run debug server: D:\a\jerryscript\jerryscript\build\tests\jerry_debugger_tests\local\bin\jerry.exe tests\debugger\do_abort.js --start-debug-server --debug-channel websocket
run debug client: cmd /S /C C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe D:\a\jerryscript\jerryscript\jerry-debugger/jerry_client.py --channel websocket --non-interactive
input debug cmd: tests\debugger\do_abort.cmd
['git', '--no-pager', 'diff', '--ignore-space-at-eol', '--no-index', 'tests\\debugger\\do_abort.expected', 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\do_abort5k9rpkyiout']
FAIL: tests\debugger\do_abort
warning: LF will be replaced by CRLF in C:\Users\RUNNER~1\AppData\Local\Temp\do_abort5k9rpkyiout.
The file will have its original line endings in your working directory
diff --git "a/tests\\debugger\\do_abort.expected" "b/C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\do_abort5k9rpkyiout"
index 7656e41..8d31910 100644
--- "a/tests\\debugger\\do_abort.expected"
+++ "b/C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\do_abort5k9rpkyiout"
@@ -10,3 +10,5 @@ Stopped at tests/debugger/do_abort.js:20 (in g() at line:19, col:1)
Stopped at tests/debugger/do_abort.js:16 (in f() at line:15, col:1)
(jerry-debugger) abort new Error('Fatal error :)')
err: Error: Fatal error :)
+Failed to connect to the JerryScript debugger.
+Error: [WinError 10054] An existing connection was forcibly closed by the remote host
This is the random failure I am talking about: https://github.com/jerryscript-project/jerryscript/runs/1721915835
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo [email protected]
@zherczeg Just to clarify that's not only windows related issue. https://github.com/jerryscript-project/jerryscript/runs/1721915835#step:5:708
I am still curious: [WinError 10054] An existing connection was forcibly closed by the remote host - this is a hint, not an error, why can't we simply ignore it?
I am still curious: [WinError 10054] An existing connection was forcibly closed by the remote host - this is a hint, not an error, why can't we simply ignore it?
Are you talking about ignore the error in python side? There is a testcase that restart the jerry engine in debugger, so ignore this error is not acceptable, as you don't know it's a abnormal connection disconnect or an disconnection that caused by the user(the restart debug instruction).
In the restart debug case you are expecting a restart, it doesn't matter if it fails why it fails. A successful close does not guarantee that the restart will successful. So I still don't get why we cannot ignore this.
In the restart debug case you are expecting a restart, it doesn't matter if it fails why it fails. A successful close does not guarantee that the restart will successful. So I still don't get why we cannot ignore this.
As I said, we can not disinguish normal disconnection(restart instruction) or it's the jerry executable crash(cause connection reset). So it's better to waiting normal close when restarting, and when crash, [WinError 10054] happens