Skip to content
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

illegal access error with Typescript compiled code #34361

Closed
selimrecep opened this issue Jul 14, 2020 · 4 comments
Closed

illegal access error with Typescript compiled code #34361

selimrecep opened this issue Jul 14, 2020 · 4 comments
Labels
inspector Issues and PRs related to the V8 inspector protocol

Comments

@selimrecep
Copy link

selimrecep commented Jul 14, 2020

  • Version: v12.18.2
  • Platform: Linux desktop-G31T-M7 5.3.0-62-generic fs: fix fd leak in ReadStream.destroy() #56~18.04.1-Ubuntu SMP Wed Jun 24 16:17:03 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: Well, Unfortunately I don't know

What steps will reproduce the bug?

How often does it reproduce? Is there a required condition?

I know it doesn't make sense but, random. Actually I have no idea what is this error about, but there is a text "please report this."

What is the expected behavior?

It should run without any issues.

Debugger listening on ws://127.0.0.1:38745/0d73e24f-b2ca-4d16-8d39-c7de3a22160a
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
[index] Error: Hatalı dosya: database 
 	 Logger.log (/home/desktop/Masaüstü/Recep/workspace/request-log-data-handler/dist/Logging/Logger.js:29:21)
Logging/LogManager.ts:60
[index] Error: Hatalı dosya: database 
 	 Logger.log (/home/desktop/Masaüstü/Recep/workspace/request-log-data-handler/dist/Logging/Logger.js:29:21)
Waiting for the debugger to disconnect...
Process exited with code 0

What do you see instead?

illegal access
FATAL ERROR: 
Debugger listening on ws://127.0.0.1:38745/0d73e24f-b2ca-4d16-8d39-c7de3a22160a
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
[index] Error: Hatalı dosya: database 
 	 Logger.log (/home/desktop/Masaüstü/Recep/workspace/request-log-data-handler/dist/Logging/Logger.js:29:21)
Logging/LogManager.ts:60
[index] Error: Hatalı dosya: database 
 	 Logger.log (/home/desktop/Masaüstü/Recep/workspace/request-log-data-handler/dist/Logging/Logger.js:29:21)
(THERE CAN BE A MISSING LINE. I forgot to copy error before I start debugging again.)
node::inspector::Agent::ToggleAsyncHook Cannot toggle Inspector's AsyncHook, please report this.
 1: 0xa0bb60 node::Abort() [/usr/bin/node]
 2: 0xa0bf6c node::OnFatalError(char const*, char const*) [/usr/bin/node]
 3: 0xa0c009  [/usr/bin/node]
 4: 0xafe5b8  [/usr/bin/node]
 5: 0x11f4824 v8_inspector::V8Debugger::setAsyncCallStackDepth(v8_inspector::V8DebuggerAgentImpl*, int) [/usr/bin/node]
 6: 0x1200491 v8_inspector::V8DebuggerAgentImpl::disable() [/usr/bin/node]
 7: 0x1218e10 v8_inspector::V8InspectorSessionImpl::~V8InspectorSessionImpl() [/usr/bin/node]
 8: 0x1219071 v8_inspector::V8InspectorSessionImpl::~V8InspectorSessionImpl() [/usr/bin/node]
 9: 0xafb81c  [/usr/bin/node]
10: 0xafbdd1  [/usr/bin/node]
11: 0xb1c7fa  [/usr/bin/node]
12: 0xb1d1f4 node::inspector::MainThreadInterface::RemoveObject(int) [/usr/bin/node]
13: 0xb1c5f2  [/usr/bin/node]
14: 0xb1ca95  [/usr/bin/node]
15: 0xa7a924 node::PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<v8::Task, std::default_delete<v8::Task> >) [/usr/bin/node]
16: 0xa7b3a5 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/usr/bin/node]
17: 0x13333ee  [/usr/bin/node]
18: 0x1346008  [/usr/bin/node]
19: 0x1333c2f uv_run [/usr/bin/node]
20: 0x9bcf79 node::Environment::CleanupHandles() [/usr/bin/node]
21: 0x9bd2ce node::Environment::RunCleanup() [/usr/bin/node]
22: 0xa4eb7a node::NodeMainInstance::Run() [/usr/bin/node]
23: 0x9dcc68 node::Start(int, char**) [/usr/bin/node]
24: 0x7fcba4d83b97 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
25: 0x979215  [/usr/bin/node]
Process exited with code null

Additional information

I am not sure what causes this. I will try to find what is wrong with my code or maybe node. But I am using Typescript with VSCode.

@addaleax
Copy link
Member

Yeah, it would be great to know the missing lines before the Cannot toggle Inspector … one – if this happens again, please share those :)

@selimrecep
Copy link
Author

selimrecep commented Jul 14, 2020

Just happened again :D Actually I have 0 idea about this I would want to provide more details. But the output log is all I know. I will try to find what causes error or in which scenarios it happens.

/usr/bin/node /home/desktop/Masaüstü/Recep/workspace/request-log-data-handler/dist/index.js
Debugger listening on ws://127.0.0.1:38707/90561054-5303-4d25-bcdb-d0c839d026a4
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
[index] Error: Hatalı dosya: database 
 	 Logger.log (/home/desktop/Masaüstü/Recep/workspace/request-log-data-handler/dist/Logging/Logger.js:29:21)
[index] Error: Hatalı dosya: database 
 	 Logger.log (/home/desktop/Masaüstü/Recep/workspace/request-log-data-handler/dist/Logging/Logger.js:29:21)
Debugger listening on ws://127.0.0.1:38707/90561054-5303-4d25-bcdb-d0c839d026a4
For help, see: https://nodejs.org/en/docs/inspector
undefined:0



illegal access
FATAL ERROR: 
node::inspector::Agent::ToggleAsyncHook Cannot toggle Inspector's AsyncHook, please report this.
 1: 0xa0bb60 node::Abort() [/usr/bin/node]
 2: 0xa0bf6c node::OnFatalError(char const*, char const*) [/usr/bin/node]
 3: 0xa0c009  [/usr/bin/node]
 4: 0xafe5b8  [/usr/bin/node]
 5: 0x11f4824 v8_inspector::V8Debugger::setAsyncCallStackDepth(v8_inspector::V8DebuggerAgentImpl*, int) [/usr/bin/node]
 6: 0x1200491 v8_inspector::V8DebuggerAgentImpl::disable() [/usr/bin/node]
 7: 0x1218e10 v8_inspector::V8InspectorSessionImpl::~V8InspectorSessionImpl() [/usr/bin/node]
 8: 0x1219071 v8_inspector::V8InspectorSessionImpl::~V8InspectorSessionImpl() [/usr/bin/node]
 9: 0xafb81c  [/usr/bin/node]
10: 0xafbdd1  [/usr/bin/node]
11: 0xb1c7fa  [/usr/bin/node]
12: 0xb1d1f4 node::inspector::MainThreadInterface::RemoveObject(int) [/usr/bin/node]
13: 0xb1c5f2  [/usr/bin/node]
14: 0xb1ca95  [/usr/bin/node]
15: 0xa7a924 node::PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<v8::Task, std::default_delete<v8::Task> >) [/usr/bin/node]
16: 0xa7b3a5 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/usr/bin/node]
17: 0x13333ee  [/usr/bin/node]
18: 0x1346008  [/usr/bin/node]
19: 0x1333c2f uv_run [/usr/bin/node]
20: 0x9bcf79 node::Environment::CleanupHandles() [/usr/bin/node]
21: 0x9bd2ce node::Environment::RunCleanup() [/usr/bin/node]
22: 0xa4eb7a node::NodeMainInstance::Run() [/usr/bin/node]
23: 0x9dcc68 node::Start(int, char**) [/usr/bin/node]
24: 0x7fd2d7678b97 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
25: 0x979215  [/usr/bin/node]
Process exited with code null

@selimrecep
Copy link
Author

selimrecep commented Jul 14, 2020

An additional note: undefined: 0 output part is not part of my code. Plus, somehow vscode try to attach debug twice (I guess): There are two Debugger listening on ... lines.

@addaleax addaleax added the inspector Issues and PRs related to the V8 inspector protocol label Jul 14, 2020
addaleax added a commit to addaleax/node that referenced this issue Jul 14, 2020
In the termination case, we should not crash. There’s also no harm
being done by ignoring the termination exception here, since the
thread is about to be torn down anyway.

Also, add a guard against running this during shutdown. That is the
likely cause of nodejs#34361.

Fixes: nodejs#34361
@addaleax
Copy link
Member

@selimrecep I think #34362 should fix this … I don’t quite know how to reproduce this, so I’m having a hard time coming up with a regression test, but if there’s any chance that you could build Node.js with that PR and verify that it fixes this, that would be extremely helpful :)

Either way, thanks for the bug report!

cjihrig pushed a commit that referenced this issue Jul 23, 2020
In the termination case, we should not crash. There’s also no harm
being done by ignoring the termination exception here, since the
thread is about to be torn down anyway.

Also, add a guard against running this during shutdown. That is the
likely cause of #34361.

Fixes: #34361

PR-URL: #34362
Fixes: #27261
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this issue Jul 27, 2020
In the termination case, we should not crash. There’s also no harm
being done by ignoring the termination exception here, since the
thread is about to be torn down anyway.

Also, add a guard against running this during shutdown. That is the
likely cause of #34361.

Fixes: #34361

PR-URL: #34362
Fixes: #27261
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
addaleax added a commit that referenced this issue Aug 13, 2020
In the termination case, we should not crash. There’s also no harm
being done by ignoring the termination exception here, since the
thread is about to be torn down anyway.

Also, add a guard against running this during shutdown. That is the
likely cause of #34361.

Fixes: #34361

PR-URL: #34362
Fixes: #27261
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inspector Issues and PRs related to the V8 inspector protocol
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants