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

thread 'main' panicked at ext/node/global.rs: already mutably borrowed: BorrowError #22150

Closed
y12studio opened this issue Jan 27, 2024 · 1 comment · Fixed by #22151
Closed

Comments

@y12studio
Copy link

============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: linux x86_64
Version: 1.40.2
Args: ["deno", "run", "-A", "app.ts"]

thread 'main' panicked at ext/node/global.rs:273:27:
already mutably borrowed: BorrowError
stack backtrace:
   0:     0x56424a78483c - std::backtrace_rs::backtrace::libunwind::trace::ha637c64ce894333a
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x56424a78483c - std::backtrace_rs::backtrace::trace_unsynchronized::h47f62dea28e0c88d
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x56424a78483c - std::sys_common::backtrace::_print_fmt::h9eef0abe20ede486
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x56424a78483c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hed7f999df88cc644
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x56424a7ba140 - core::fmt::rt::Argument::fmt::h1539a9308b8d058d
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/rt.rs:142:9
   5:     0x56424a7ba140 - core::fmt::write::h3a39390d8560d9c9
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/fmt/mod.rs:1120:17
   6:     0x56424a77e63f - std::io::Write::write_fmt::h5fc9997dfe05f882
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/io/mod.rs:1762:15
   7:     0x56424a784624 - std::sys_common::backtrace::_print::h894006fb5c6f3d45
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x56424a784624 - std::sys_common::backtrace::print::h23a2d212c6fff936
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x56424a7862e7 - std::panicking::default_hook::{{closure}}::h8a1d2ee00185001a
  10:     0x56424a78604f - std::panicking::default_hook::h6038f2eba384e475
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:292:9
  11:     0x56424ac6eb5a - deno::setup_panic_hook::{{closure}}::he1bca190f0e6e5ea
  12:     0x56424a786968 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h1f8f335eaa9cfaee
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2021:9
  13:     0x56424a786968 - std::panicking::rust_panic_with_hook::h2b5517d590cab22e
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:783:13
  14:     0x56424a7866be - std::panicking::begin_panic_handler::{{closure}}::h233112c06e0ef43e
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:657:13
  15:     0x56424a784d06 - std::sys_common::backtrace::__rust_end_short_backtrace::h6e893f24d7ebbff8
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x56424a786422 - rust_begin_unwind
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
  17:     0x56424a7b71c5 - core::panicking::panic_fmt::hbf0e066aabfa482c
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
  18:     0x56424a7b4359 - core::cell::panic_already_mutably_borrowed::hbeab05f78ade3c3e
                               at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/cell.rs:770:5
  19:     0x56424b8cc52b - deno_node::global::current_mode::hbc0edd57ccfa9761
  20:     0x56424b8cc744 - deno_node::global::getter::hdcf172726b4746a6
  21:     0x56424b0ded95 - <extern "C" fn(A0,A1) .> R as v8::support::CFnFrom<F>>::mapping::c_fn::h31a451a47144c889
  22:     0x5642498f3eba - _ZN2v88internal25PropertyCallbackArguments15CallNamedGetterENS0_6HandleINS0_15InterceptorInfoEEENS2_INS0_4NameEEE
                               at ./../../../../v8/src/api/api-arguments-inl.h:147:3
  23:     0x5642499118c3 - _ZN2v88internal12_GLOBAL__N_134GetPropertyWithInterceptorInternalEPNS0_14LookupIteratorENS0_6HandleINS0_15InterceptorInfoEEEPb
                               at ./../../../../v8/src/objects/js-objects.cc:1223:19
  24:     0x56424998d786 - _ZN2v88internal6Object11GetPropertyEPNS0_14LookupIteratorEb
                               at ./../../../../v8/src/objects/objects.cc:1201:9
  25:     0x564249a91b21 - _ZN2v88internal7Runtime17GetObjectPropertyEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_S6_Pb
                               at ./../../../../v8/src/runtime/runtime-object.cc:42:32
  26:     0x5642494ff7c0 - _ZN2v86Object3GetENS_5LocalINS_7ContextEEENS1_INS_5ValueEEE
                               at ./../../../../v8/src/api/api.cc:4750:20
  27:     0x56424accec64 - napi_get_named_property
  28:     0x7fa1aa208572 - _Z4InitN4Napi3EnvENS_6ObjectE
  29:     0x7fa1aa203fc4 - _ZL11__napi_InitP10napi_env__P12napi_value__
  30:     0x56424b3dfc17 - deno_napi::op_napi_open<NP>::v8_fn_ptr::hf110f809db202634
  31:     0x56424a59265d - Builtins_CallApiCallbackGeneric

https://github.com/openwallet-foundation/credo-ts-docs/blob/8ec85e630a3dc6db0106ce21e72afcc1fd22b288/snippets/current/src/set-up.ts#L4

docker run -e RUST_BACKTRACE=full -i --rm \
  --entrypoint=sh denoland/deno:debian-1.40.2 > log.txt 2>&1 <<'EOOOF'
cat <<'EXXF' > test.sh
id
echo
env
echo
deno info
cat <<'EOF' > app.ts
import type { InitConfig } from 'npm:@aries-framework/core'
import { Agent } from 'npm:@aries-framework/core'
import { agentDependencies } from 'npm:@aries-framework/node'

const config: InitConfig = {
  label: 'docs-agent-nodejs',
  walletConfig: {
    id: 'wallet-id',
    key: 'testkey0000000000000000000000000',
  },
}
const agent = new Agent({
  config,
  dependencies: agentDependencies,
})
EOF
echo
deno run -A app.ts
echo
EXXF
sh test.sh
EOOOF

cat log.txt

log.txt

@mmastrac
Copy link
Contributor

Thanks for the detailed report -- you should be able to test with the latest canary once it builds in a few hours.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants