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

Inspector causes Rust runtime crash #5807

Closed
sug0 opened this issue May 24, 2020 · 4 comments · Fixed by #5822
Closed

Inspector causes Rust runtime crash #5807

sug0 opened this issue May 24, 2020 · 4 comments · Fixed by #5822
Labels
bug Something isn't working correctly cli related to cli/ dir

Comments

@sug0
Copy link

sug0 commented May 24, 2020

Trying to call functions within Deno on the inspector console, running deno repl --inspect, causes a crash, due to a cell already being borrowed, as seen here:

thread 'main' panicked at 'already mutably borrowed: BorrowError', /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550\src\libcore\cell.rs:798:9

The culprit of the crash seems to be this line of code:
https://github.com/denoland/deno/blob/master/cli/inspector.rs#L547

Which keeps the cell borrowed, while poll_sessions is called, for instance here:
https://github.com/denoland/deno/blob/master/cli/inspector.rs#L367

Edit: forgot to mention
deno 1.0.2
v8 8.4.300
typescript 3.9.2

@ry ry added bug Something isn't working correctly cli related to cli/ dir labels May 24, 2020
@piscisaureus
Copy link
Member

@sug0
I do believe that you are experiencing a crash, but I'm not convinced that you identified the right "culprit". If only because that line of code isn't (or at least - shouldn't) run when you use '--inspect'.

Could you share the full stack trace?

@sug0
Copy link
Author

sug0 commented May 24, 2020

Sure, but it doesn't help much, I'm not on a debug build, this build has no symbols. In any case, it's fairly easy to reproduce:

  1. Run deno repl --inspect
  2. Open chrome://inspect and start inspecting deno
  3. On the console tab, try to call, for instance, Deno.cwd()

The stack trace of the release build is the following:

thread 'main' panicked at 'already mutably borrowed: BorrowError', /rustc/4fb7144ed159f94491249e86d5bbd033b5d60550\src\libcore\cell.rs:798:9
stack backtrace:
   0:     0x7ff78512796f - CrashForExceptionInNonABICompliantCodeRange
   1:     0x7ff785148ebb - CrashForExceptionInNonABICompliantCodeRange
   2:     0x7ff78511d75c - CrashForExceptionInNonABICompliantCodeRange
   3:     0x7ff78512affc - CrashForExceptionInNonABICompliantCodeRange
   4:     0x7ff78512ac4f - CrashForExceptionInNonABICompliantCodeRange
   5:     0x7ff78512b7d7 - CrashForExceptionInNonABICompliantCodeRange
   6:     0x7ff78512b35f - CrashForExceptionInNonABICompliantCodeRange
   7:     0x7ff7851477c0 - CrashForExceptionInNonABICompliantCodeRange
   8:     0x7ff785147613 - CrashForExceptionInNonABICompliantCodeRange
   9:     0x7ff783f5210b - <unknown>
  10:     0x7ff783d4625b - <unknown>
  11:     0x7ff784627a77 - <unknown>
  12:     0x7ff784649b77 - <unknown>
  13:     0x7ff7846468ab - <unknown>
  14:     0x7ff784ae26bb - CrashForExceptionInNonABICompliantCodeRange
  15:     0x7ff784ae1af8 - CrashForExceptionInNonABICompliantCodeRange
  16:     0x7ff784ae1046 - CrashForExceptionInNonABICompliantCodeRange
  17:     0x7ff784ae0c67 - CrashForExceptionInNonABICompliantCodeRange
  18:     0x7ff7848f37fc - CrashForExceptionInNonABICompliantCodeRange
  19:     0x7ff784885c55 - CrashForExceptionInNonABICompliantCodeRange
  20:     0x7ff784885c55 - CrashForExceptionInNonABICompliantCodeRange
  21:     0x7ff784885c55 - CrashForExceptionInNonABICompliantCodeRange
  22:     0x7ff784885c55 - CrashForExceptionInNonABICompliantCodeRange
  23:     0x7ff78488371e - CrashForExceptionInNonABICompliantCodeRange
  24:     0x7ff78488330c - CrashForExceptionInNonABICompliantCodeRange
  25:     0x7ff784744ca7 - <unknown>
  26:     0x7ff78474402a - <unknown>
  27:     0x7ff7848286a6 - CrashForExceptionInNonABICompliantCodeRange
  28:     0x7ff78468c987 - <unknown>
  29:     0x7ff78486efb4 - CrashForExceptionInNonABICompliantCodeRange
  30:     0x7ff784cb3ee3 - CrashForExceptionInNonABICompliantCodeRange
  31:     0x7ff784c8650a - CrashForExceptionInNonABICompliantCodeRange
  32:     0x7ff78486b27f - CrashForExceptionInNonABICompliantCodeRange
  33:     0x7ff784867e1c - CrashForExceptionInNonABICompliantCodeRange
  34:     0x7ff78466b41f - <unknown>
  35:     0x7ff78466c7bf - <unknown>
  36:     0x7ff783ef752f - <unknown>
  37:     0x7ff783e1eee1 - <unknown>
  38:     0x7ff783e7a143 - <unknown>
  39:     0x7ff7840017d8 - <unknown>
  40:     0x7ff783ead05d - <unknown>
  41:     0x7ff783e18f1d - <unknown>
  42:     0x7ff783c836be - <unknown>
  43:     0x7ff783d8d789 - <unknown>
  44:     0x7ff783cf43f4 - <unknown>
  45:     0x7ff783eab6c5 - <unknown>
  46:     0x7ff783da48f0 - <unknown>
  47:     0x7ff783f5b326 - <unknown>
  48:     0x7ff78512b1f7 - CrashForExceptionInNonABICompliantCodeRange
  49:     0x7ff785139222 - CrashForExceptionInNonABICompliantCodeRange
  50:     0x7ff78512ba18 - CrashForExceptionInNonABICompliantCodeRange
  51:     0x7ff783da62c7 - <unknown>
  52:     0x7ff785158024 - CrashForExceptionInNonABICompliantCodeRange
  53:     0x7ff8569c7bd4 - BaseThreadInitThunk
  54:     0x7ff856f8ce51 - RtlUserThreadStart

@piscisaureus
Copy link
Member

More useful stack trace below.
There is another (known but possibly related) issue: typing anything in the inspector console makes deno crash if the script isn't paused.

thread 'main' panicked at 'already mutably borrowed: BorrowError', /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\cell.rs:798:9
stack backtrace:
   0: backtrace::backtrace::trace_unsynchronized
             at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.44\src\backtrace\mod.rs:66
   1: std::sys_common::backtrace::_print_fmt
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:78
   2: std::sys_common::backtrace::_print::{{impl}}::fmt
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:59
   3: core::fmt::write
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\fmt\mod.rs:1063
   4: std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\io\mod.rs:1426
   5: std::sys_common::backtrace::_print
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:62
   6: std::sys_common::backtrace::print
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:49
   7: std::panicking::default_hook::{{closure}}
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:204
   8: std::panicking::default_hook
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:224
   9: std::panicking::rust_panic_with_hook
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:470
  10: std::panicking::begin_panic_handler
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:378
  11: core::panicking::panic_fmt
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\panicking.rs:85
  12: core::option::expect_none_failed
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\option.rs:1211
  13: core::result::Result<core::cell::Ref<deno::state::StateInner>, core::cell::BorrowError>::expect<core::cell::Ref<deno::state::StateInner>,core::cell::BorrowError>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\result.rs:961
  14: core::cell::RefCell<deno::state::StateInner>::borrow<deno::state::StateInner>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\cell.rs:798
  15: deno::state::State::check_read
             at .\cli\state.rs:468
  16: deno::ops::fs::op_cwd
             at .\cli\ops\fs.rs:959
  17: core::ops::function::Fn::call<fn(deno::state::State*, serde_json::value::Value, core::option::Option<deno_core::isolate::ZeroCopyBuf>) -> core::result::Result<deno::ops::dispatch_json::JsonOp, deno::op_error::OpError>,(deno::state::State*, serde_json::val
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\ops\function.rs:72
  18: deno::state::{{impl}}::stateful_op::{{closure}}<fn(deno::state::State*, serde_json::value::Value, core::option::Option<deno_core::isolate::ZeroCopyBuf>) -> core::result::Result<deno::ops::dispatch_json::JsonOp, deno::op_error::OpError>>
             at .\cli\state.rs:203
  19: deno::ops::dispatch_json::json_op::{{closure}}::{{closure}}<closure-0>
             at .\cli\ops\dispatch_json.rs:69
  20: core::result::Result<serde_json::value::Value, deno::op_error::OpError>::and_then<serde_json::value::Value,deno::op_error::OpError,deno::ops::dispatch_json::JsonOp,closure-0>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\result.rs:727
  21: deno::ops::dispatch_json::json_op::{{closure}}<closure-0>
             at .\cli\ops\dispatch_json.rs:67
  22: deno::state::{{impl}}::core_op::{{closure}}<closure-0>
             at .\cli\state.rs:115
  23: deno_core::isolate::CoreIsolate::dispatch_op<rusty_v8::scope::Entered<rusty_v8::function::FunctionCallbackInfo, ()>>
             at .\core\isolate.rs:366
  24: deno_core::bindings::send
             at .\core\bindings.rs:470
  25: core::ops::function::Fn::call<fn(mut rusty_v8::scope::Entered<rusty_v8::function::FunctionCallbackInfo, ()>*, rusty_v8::function::FunctionCallbackArguments, rusty_v8::function::ReturnValue),(mut rusty_v8::scope::Entered<rusty_v8::function::FunctionCallbac
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\ops\function.rs:72
  26: rusty_v8::function::{{impl}}::mapping::{{closure}}<fn(mut rusty_v8::scope::Entered<rusty_v8::function::FunctionCallbackInfo, ()>*, rusty_v8::function::FunctionCallbackArguments, rusty_v8::function::ReturnValue)>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\rusty_v8-0.4.2\src\function.rs:251
  27: rusty_v8::support::{{impl}}::mapping::c_fn<closure-0,(),const rusty_v8::function::FunctionCallbackInfo*>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\rusty_v8-0.4.2\src\support.rs:584
  28: v8::internal::FunctionCallbackArguments::Call
             at .\..\..\..\..\v8\src\api\api-arguments-inl.h:158
  29: v8::internal::`anonymous namespace'::HandleApiCallHelper<0>
             at .\..\..\..\..\v8\src\builtins\builtins-api.cc:111
  30: v8::internal::Builtin_Impl_HandleApiCall
             at .\..\..\..\..\v8\src\builtins\builtins-api.cc:141
  31: v8::internal::Builtin_HandleApiCall
             at .\..\..\..\..\v8\src\builtins\builtins-api.cc:129
  32: Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit
  33: Builtins_InterpreterEntryTrampoline
  34: Builtins_InterpreterEntryTrampoline
  35: Builtins_InterpreterEntryTrampoline
  36: Builtins_InterpreterEntryTrampoline
  37: Builtins_JSEntryTrampoline
  38: Builtins_JSEntry
  39: v8::internal::`anonymous namespace'::Invoke
             at .\..\..\..\..\v8\src\execution\execution.cc:367
  40: v8::internal::Execution::Call
             at .\..\..\..\..\v8\src\execution\execution.cc:461
  41: v8::internal::DebugEvaluate::Global
             at .\..\..\..\..\v8\src\debug\debug-evaluate.cc:54
  42: v8::debug::EvaluateGlobal
             at .\..\..\..\..\v8\src\api\api.cc:10065
  43: v8_inspector::V8RuntimeAgentImpl::evaluate
             at .\..\..\..\..\v8\src\inspector\v8-runtime-agent-impl.cc:288
  44: v8_inspector::protocol::Runtime::DomainDispatcherImpl::evaluate
             at .\gen\v8\src\inspector\protocol\Runtime.cpp:2085
  45: std::__1::__function::__policy_invoker<void (const v8_crdtp::Dispatchable &)>::__call_impl<std::__1::__function::__default_alloc_func<`lambda at gen/v8/src/inspector/protocol/Runtime.cpp:1726:10',void (const v8_crdtp::Dispatchable &)>>
             at .\..\..\..\..\buildtools\third_party\libc++\trunk\include\functional:2071
  46: v8_crdtp::UberDispatcher::DispatchResult::Run
             at .\..\..\..\..\v8\third_party\inspector_protocol\crdtp\dispatch.cc:501
  47: v8_inspector::V8InspectorSessionImpl::dispatchProtocolMessage
             at .\..\..\..\..\v8\src\inspector\v8-inspector-session-impl.cc:378
  48: v8_inspector__V8InspectorSession__dispatchProtocolMessage
             at .\..\..\..\..\src\binding.cc:1476
  49: rusty_v8::inspector::V8InspectorSession::dispatch_protocol_message
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\rusty_v8-0.4.2\src\inspector.rs:563
  50: deno::inspector::{{impl}}::receive_from_websocket::{{closure}}::{{closure}}
             at .\cli\inspector.rs:740
  51: futures_util::stream::try_stream::map_ok::{{impl}}::poll_next::{{closure}}::{{closure}}::{{closure}}<futures_channel::mpsc::UnboundedReceiver<core::result::Result<warp::filters::ws::Message, warp::error::Error>>,closure-0,()>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.4\src\stream\try_stream\map_ok.rs:95
  52: core::result::Result<warp::filters::ws::Message, warp::error::Error>::map<warp::filters::ws::Message,warp::error::Error,(),closure-0>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\result.rs:519
  53: futures_util::stream::try_stream::map_ok::{{impl}}::poll_next::{{closure}}::{{closure}}<futures_channel::mpsc::UnboundedReceiver<core::result::Result<warp::filters::ws::Message, warp::error::Error>>,closure-0,()>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.4\src\stream\try_stream\map_ok.rs:95
  54: core::option::Option<core::result::Result<warp::filters::ws::Message, warp::error::Error>>::map<core::result::Result<warp::filters::ws::Message, warp::error::Error>,core::result::Result<(), warp::error::Error>,closure-0>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\option.rs:456
  55: futures_util::stream::try_stream::map_ok::{{impl}}::poll_next::{{closure}}<futures_channel::mpsc::UnboundedReceiver<core::result::Result<warp::filters::ws::Message, warp::error::Error>>,closure-0,()>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.4\src\stream\try_stream\map_ok.rs:95
  56: core::task::poll::Poll<core::option::Option<core::result::Result<warp::filters::ws::Message, warp::error::Error>>>::map<core::option::Option<core::result::Result<warp::filters::ws::Message, warp::error::Error>>,core::option::Option<core::result::Result<()
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\task\poll.rs:33
  57: futures_util::stream::try_stream::map_ok::{{impl}}::poll_next<futures_channel::mpsc::UnboundedReceiver<core::result::Result<warp::filters::ws::Message, warp::error::Error>>,closure-0,()>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.4\src\stream\try_stream\map_ok.rs:92
  58: futures_core::stream::{{impl}}::try_poll_next<futures_util::stream::try_stream::map_ok::MapOk<futures_channel::mpsc::UnboundedReceiver<core::result::Result<warp::filters::ws::Message, warp::error::Error>>, closure-0>,(),warp::error::Error>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-core-0.3.4\src\stream.rs:193
  59: futures_util::stream::try_stream::try_collect::{{impl}}::poll<futures_util::stream::try_stream::map_ok::MapOk<futures_channel::mpsc::UnboundedReceiver<core::result::Result<warp::filters::ws::Message, warp::error::Error>>, closure-0>,()>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.4\src\stream\try_stream\try_collect.rs:56
  60: std::future::poll_with_tls_context<futures_util::stream::try_stream::try_collect::TryCollect<futures_util::stream::try_stream::map_ok::MapOk<futures_channel::mpsc::UnboundedReceiver<core::result::Result<warp::filters::ws::Message, warp::error::Error>>, cl
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libstd\future.rs:102
  61: deno::inspector::{{impl}}::receive_from_websocket::{{closure}}
             at .\cli\inspector.rs:736
  62: std::future::{{impl}}::poll<generator-0>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libstd\future.rs:44
  63: core::future::future::{{impl}}::poll<alloc::boxed::Box<Future>>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\future\future.rs:118
  64: futures_util::future::future::FutureExt::poll_unpin<core::pin::Pin<alloc::boxed::Box<Future>>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.4\src\future\future\mod.rs:507
  65: deno::inspector::{{impl}}::poll
             at .\cli\inspector.rs:796
  66: alloc::boxed::{{impl}}::poll<deno::inspector::DenoInspectorSession>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\liballoc\boxed.rs:1157
  67: futures_util::stream::futures_unordered::{{impl}}::poll_next<alloc::boxed::Box<deno::inspector::DenoInspectorSession>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.4\src\stream\futures_unordered\mod.rs:544
  68: futures_util::stream::stream::StreamExt::poll_next_unpin<futures_util::stream::futures_unordered::FuturesUnordered<alloc::boxed::Box<deno::inspector::DenoInspectorSession>>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.4\src\stream\stream\mod.rs:1184
  69: deno::inspector::DenoInspector::poll_sessions
             at .\cli\inspector.rs:489
  70: deno::inspector::{{impl}}::poll
             at .\cli\inspector.rs:367
  71: alloc::boxed::{{impl}}::poll<deno::inspector::DenoInspector>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\liballoc\boxed.rs:1157
  72: futures_util::future::future::FutureExt::poll_unpin<alloc::boxed::Box<deno::inspector::DenoInspector>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\futures-util-0.3.4\src\future\future\mod.rs:507
  73: deno::worker::{{impl}}::poll::{{closure}}
             at .\cli\worker.rs:208
  74: core::option::Option<mut alloc::boxed::Box<deno::inspector::DenoInspector>*>::map<mut alloc::boxed::Box<deno::inspector::DenoInspector>*,core::task::poll::Poll<()>,closure-0>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\option.rs:456
  75: deno::worker::{{impl}}::poll
             at .\cli\worker.rs:208
  76: core::future::future::{{impl}}::poll<deno::worker::Worker>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\future\future.rs:106
  77: std::future::poll_with_tls_context<mut deno::worker::Worker*>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libstd\future.rs:102
  78: deno::run_repl::{{closure}}
             at .\cli\main.rs:506
  79: std::future::{{impl}}::poll<generator-0>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libstd\future.rs:44
  80: core::future::future::{{impl}}::poll<alloc::boxed::Box<Future>>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libcore\future\future.rs:118
  81: tokio::runtime::basic_scheduler::{{impl}}::block_on::{{closure}}::{{closure}}<tokio::park::either::Either<tokio::time::driver::Driver<tokio::park::either::Either<tokio::io::driver::Driver, tokio::park::thread::ParkThread>>, tokio::park::either::Either<tok
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\runtime\basic_scheduler.rs:131
  82: tokio::coop::budget::{{closure}}<closure-0,core::task::poll::Poll<core::result::Result<(), deno_core::any_error::ErrBox>>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\coop.rs:97
  83: std::thread::local::LocalKey<core::cell::Cell<usize>>::try_with<core::cell::Cell<usize>,closure-0,core::task::poll::Poll<core::result::Result<(), deno_core::any_error::ErrBox>>>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libstd\thread\local.rs:262
  84: std::thread::local::LocalKey<core::cell::Cell<usize>>::with<core::cell::Cell<usize>,closure-0,core::task::poll::Poll<core::result::Result<(), deno_core::any_error::ErrBox>>>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libstd\thread\local.rs:239
  85: tokio::coop::budget
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\coop.rs:79
  86: tokio::runtime::basic_scheduler::{{impl}}::block_on::{{closure}}<tokio::park::either::Either<tokio::time::driver::Driver<tokio::park::either::Either<tokio::io::driver::Driver, tokio::park::thread::ParkThread>>, tokio::park::either::Either<tokio::io::drive
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\runtime\basic_scheduler.rs:131
  87: tokio::runtime::basic_scheduler::enter::{{closure}}<closure-0,core::result::Result<(), deno_core::any_error::ErrBox>,tokio::park::either::Either<tokio::time::driver::Driver<tokio::park::either::Either<tokio::io::driver::Driver, tokio::park::thread::ParkTh
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\runtime\basic_scheduler.rs:213
  88: tokio::macros::scoped_tls::ScopedKey<tokio::runtime::basic_scheduler::Context>::set<tokio::runtime::basic_scheduler::Context,closure-0,core::result::Result<(), deno_core::any_error::ErrBox>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\macros\scoped_tls.rs:64
  89: tokio::runtime::basic_scheduler::enter<closure-0,core::result::Result<(), deno_core::any_error::ErrBox>,tokio::park::either::Either<tokio::time::driver::Driver<tokio::park::either::Either<tokio::io::driver::Driver, tokio::park::thread::ParkThread>>, tokio
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\runtime\basic_scheduler.rs:213
  90: tokio::runtime::basic_scheduler::BasicScheduler<tokio::park::either::Either<tokio::time::driver::Driver<tokio::park::either::Either<tokio::io::driver::Driver, tokio::park::thread::ParkThread>>, tokio::park::either::Either<tokio::io::driver::Driver, tokio:
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\runtime\basic_scheduler.rs:123
  91: tokio::runtime::{{impl}}::block_on::{{closure}}<core::pin::Pin<alloc::boxed::Box<Future>>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\runtime\mod.rs:444
  92: tokio::runtime::context::enter<closure-0,core::result::Result<(), deno_core::any_error::ErrBox>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\runtime\context.rs:72
  93: tokio::runtime::handle::Handle::enter<closure-0,core::result::Result<(), deno_core::any_error::ErrBox>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\runtime\handle.rs:71
  94: tokio::runtime::Runtime::block_on<core::pin::Pin<alloc::boxed::Box<Future>>>
             at C:\Users\BertBelder\.cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.20\src\runtime\mod.rs:441
  95: deno::tokio_util::run_basic<core::pin::Pin<alloc::boxed::Box<Future>>,core::result::Result<(), deno_core::any_error::ErrBox>>
             at .\cli\tokio_util.rs:18
  96: deno::main
             at .\cli\main.rs:669
  97: std::rt::lang_start::{{closure}}<()>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\src\libstd\rt.rs:67
  98: std::rt::lang_start_internal::{{closure}}
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\rt.rs:52
  99: std::panicking::try::do_call<closure-0,i32>
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:303
 100: panic_unwind::__rust_maybe_catch_panic
             at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libpanic_unwind\lib.rs:86
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@piscisaureus
Copy link
Member

So the problem is an invalid double borrow of 'State'. This bug has probably been introduced when the inspector object was moved from Worker to State in e34a3b6 (#5250).

piscisaureus added a commit to piscisaureus/deno that referenced this issue May 24, 2020
…enoland#5822)

Note that this does not fix the 'Uncaught ReferenceError' issue that
happens when 'eager evaluation' is enabled in the inspector.

Fixes: denoland#5807
piscisaureus added a commit to piscisaureus/deno that referenced this issue May 24, 2020
…enoland#5822)

Note that this does not fix the 'Uncaught ReferenceError' issue that
happens when 'eager evaluation' is enabled in the inspector.

Fixes: denoland#5807
piscisaureus added a commit to piscisaureus/deno that referenced this issue May 24, 2020
…enoland#5822)

Note that this does not fix the 'Uncaught ReferenceError' issue that
happens when 'eager evaluation' is enabled in the inspector.

Fixes: denoland#5807
piscisaureus added a commit to piscisaureus/deno that referenced this issue May 25, 2020
…enoland#5822)

Note that this does not fix the 'Uncaught ReferenceError' issue that
happens when 'eager evaluation' is enabled in the inspector.

Fixes: denoland#5807
piscisaureus added a commit to piscisaureus/deno that referenced this issue May 25, 2020
…enoland#5822)

Note that this does not fix the 'Uncaught ReferenceError' issue that
happens when 'eager evaluation' is enabled in the inspector.

Fixes: denoland#5807
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants