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

exceptions in inspector callback cause fatal error #14965

Closed
bcoates opened this issue Aug 21, 2017 · 2 comments · Fixed by #14980
Closed

exceptions in inspector callback cause fatal error #14965

bcoates opened this issue Aug 21, 2017 · 2 comments · Fixed by #14980
Labels
inspector Issues and PRs related to the V8 inspector protocol

Comments

@bcoates
Copy link

bcoates commented Aug 21, 2017

  • Version: v.8.4.0
  • Platform: Linux 3.13.0-92-generic x86_64 (Ubuntu 14.04.4 LTS)
  • Subsystem: inspector

An exception (either with "throw" or due to an error) inside the callback from an inspector event sometimes causes a fatal error (if there is not a fatal, it appears to eat the exception)

Possibly same issue as #12024

This case seems to reliably trigger it:

let inspector = require('inspector')
let sess = new inspector.Session()

sess.on('inspectorNotification', ()=>{
 console.log('note')
 throw "barf"
})

sess.connect()
sess.post('Debugger.enable', {}, (err,res) => {console.log(err,res)} )

console.log('done')

output:

note


#
# Fatal error in ../deps/v8/src/builtins/builtins-console.cc, line 53
# Check failed: !isolate->has_scheduled_exception().
#

==== C stack trace ===============================

    node(v8::base::debug::StackTrace::StackTrace()+0x16) [0x15c8c36]
    node() [0x1451857]
    node(V8_Fatal+0xd8) [0x15c3998]
    node(v8::internal::Builtin_ConsoleLog(int, v8::internal::Object**, v8::internal::Isolate*)+0x10c) [0xc4d10c]
    [0xaf03813c8dd]
Illegal instruction (core dumped)
@mscdex mscdex added the inspector Issues and PRs related to the V8 inspector protocol label Aug 21, 2017
@mscdex
Copy link
Contributor

mscdex commented Aug 21, 2017

/cc @nodejs/v8-inspector

@eugeneo
Copy link
Contributor

eugeneo commented Aug 21, 2017

This is caused by having a console.log statement that triggers inspector notification after the exception. I will take a look.

MylesBorins pushed a commit that referenced this issue Sep 10, 2017
Fixes: #14965
PR-URL: #14980
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 11, 2017
Fixes: #14965
PR-URL: #14980
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
MylesBorins pushed a commit that referenced this issue Sep 12, 2017
Fixes: #14965
PR-URL: #14980
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
addaleax pushed a commit to addaleax/node that referenced this issue Sep 13, 2017
Fixes: nodejs#14965
PR-URL: nodejs#14980
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
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.

3 participants