[denoland/deno]尝试运行 deno 时出现 panic 错误

2024-07-17 694 views
9

deno当我尝试运行或时出现以下错误deno repl

thread 'main' panicked at 'Core threads number cannot be above max limit', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.9/src/runtime/builder.rs:451:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

如果我运行RUST_BACKTRACE=1 deno我会得到这个:

thread 'main' panicked at 'Core threads number cannot be above max limit', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.9/src/runtime/builder.rs:451:13
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:77
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:61
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1028
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1412
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:65
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:50
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:188
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:205
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:464
  11: std::panicking::begin_panic
  12: tokio::runtime::builder::Builder::build
  13: deno::tokio_util::run
  14: deno::main
  15: std::rt::lang_start::{{closure}}
  16: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:48
  17: std::panicking::try::do_call
             at src/libstd/panicking.rs:287
  18: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:78
  19: std::panicking::try
             at src/libstd/panicking.rs:265
  20: std::panic::catch_unwind
             at src/libstd/panic.rs:396
  21: std::rt::lang_start_internal
             at src/libstd/rt.rs:47
  22: main
  23: __libc_start_main
  24: _start
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

我的操作系统是Deepin Linux 15.11deno版本0.31.0

回答

3

我猜你的机器只有一个核心吧?你能 cat /prof/cpuinfo 吗?

5

这是我运行后得到的结果cat /proc/cpuinfo

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 142
model name  : Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
stepping    : 10
microcode   : 0x66
cpu MHz     : 3001.008
cache size  : 6144 KB
physical id : 0
siblings    : 8
core id     : 0
cpu cores   : 4
apicid      : 0
initial apicid  : 0
fpu     : yes
fpu_exception   : yes
cpuid level : 22
wp      : yes
5

我可以确认 denov0.27.0在我的计算机上可以运行:

deno_in_action

3

由于某种原因,tokio 认为您有超过 512 个线程。 的输出是什么cat /proc/cpuinfo | grep "physical id"

8

@afinch7 这是输出cat /proc/cpuinfo | grep "physical id"

physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
physical id : 0
5

遇到同样的问题,这里是完整的回溯:

➜  test export RUST_BACKTRACE=full
➜  test deno init                 
thread 'main' panicked at 'Core threads number cannot be above max limit', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.9/src/runtime/builder.rs:451:13
stack backtrace:
   0:     0x55db3f1a4394 - backtrace::backtrace::libunwind::trace::h65597d255cb1398b
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x55db3f1a4394 - backtrace::backtrace::trace_unsynchronized::hd4f479d7150ec4a0
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x55db3f1a4394 - std::sys_common::backtrace::_print_fmt::h015072984a2b172c
                               at src/libstd/sys_common/backtrace.rs:77
   3:     0x55db3f1a4394 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6df05d3335f32194
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x55db3f1cd7fc - core::fmt::write::h1f444f4312eb6c27
                               at src/libcore/fmt/mod.rs:1028
   5:     0x55db3f19e0b7 - std::io::Write::write_fmt::h8d147888220078ef
                               at src/libstd/io/mod.rs:1412
   6:     0x55db3f1a709e - std::sys_common::backtrace::_print::h8a6df0fa81d6af62
                               at src/libstd/sys_common/backtrace.rs:65
   7:     0x55db3f1a709e - std::sys_common::backtrace::print::h6f05b4733407e509
                               at src/libstd/sys_common/backtrace.rs:50
   8:     0x55db3f1a709e - std::panicking::default_hook::{{closure}}::h0d0a23bd02315dd8
                               at src/libstd/panicking.rs:188
   9:     0x55db3f1a6d91 - std::panicking::default_hook::h8d15a9aecb4efac6
                               at src/libstd/panicking.rs:205
  10:     0x55db3f1a779b - std::panicking::rust_panic_with_hook::hbe174577402a475d
                               at src/libstd/panicking.rs:464
  11:     0x55db3e6d8b65 - std::panicking::begin_panic::h5730ec7dff54d9c2
  12:     0x55db3e6d8429 - tokio::runtime::builder::Builder::build::h015d30f953c24fc7
  13:     0x55db3e3ac95a - deno::tokio_util::run::ha841a176ef2cdb45
  14:     0x55db3e2958da - deno::main::h494c1d38ebcb8b15
  15:     0x55db3e267fa3 - std::rt::lang_start::{{closure}}::h2f907ccab5628fbf
  16:     0x55db3f1a71c3 - std::rt::lang_start_internal::{{closure}}::h6ea535ec5c50fc3e
                               at src/libstd/rt.rs:48
  17:     0x55db3f1a71c3 - std::panicking::try::do_call::h631c6408dfccc6f5
                               at src/libstd/panicking.rs:287
  18:     0x55db3f1b1d3a - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:78
  19:     0x55db3f1a7d3d - std::panicking::try::hab539b2d1255d635
                               at src/libstd/panicking.rs:265
  20:     0x55db3f1a7d3d - std::panic::catch_unwind::hd5e0a26424bd7f34
                               at src/libstd/panic.rs:396
  21:     0x55db3f1a7d3d - std::rt::lang_start_internal::h3bdc4c7d98181bf9
                               at src/libstd/rt.rs:47
  22:     0x55db3e268002 - main
  23:     0x7fdc9b440b97 - __libc_start_main
  24:     0x55db3e267e99 - _start
  25:                0x0 - <unknown>

我的cpuinfo的输出也是同样的!

7

我运行时也会得到这个cargo test

<snip other failed tests>
---- worker::tests::execute_mod_circular stdout ----
thread 'worker::tests::execute_mod_circular' panicked at 'Core threads number cannot be above max limit', /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/builder.rs:451:13
stack backtrace:
   0:     0x560c1c776a44 - backtrace::backtrace::libunwind::trace::heb43798aede8bd30
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x560c1c776a44 - backtrace::backtrace::trace_unsynchronized::had2ba7dec4bd2732
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x560c1c776a44 - std::sys_common::backtrace::_print_fmt::hda61f46e822731b2
                               at src/libstd/sys_common/backtrace.rs:84
   3:     0x560c1c776a44 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfe37fa5de6572965
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x560c1c79fa6c - core::fmt::write::h74887d18db27282c
                               at src/libcore/fmt/mod.rs:1025
   5:     0x560c1a611d05 - std::io::Write::write_fmt::h614a83dae7f00217
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/io/mod.rs:1426
   6:     0x560c1c76d3c1 - std::io::impls::<impl std::io::Write for alloc::boxed::Box<W>>::write_fmt::h6085952b68669738
                               at src/libstd/io/impls.rs:156
   7:     0x560c1c77939e - std::sys_common::backtrace::_print::hcc0fd4b3552039ef
                               at src/libstd/sys_common/backtrace.rs:65
   8:     0x560c1c77939e - std::sys_common::backtrace::print::h1c9c5c1c0505592d
                               at src/libstd/sys_common/backtrace.rs:50
   9:     0x560c1c77939e - std::panicking::default_hook::{{closure}}::hefb6085c1ab83a59
                               at src/libstd/panicking.rs:193
  10:     0x560c1c779038 - std::panicking::default_hook::h1b037d2bf0657ab3
                               at src/libstd/panicking.rs:207
  11:     0x560c1c779a7b - std::panicking::rust_panic_with_hook::h787d7f532b084b9a
                               at src/libstd/panicking.rs:471
  12:     0x560c1c75f0a7 - std::panicking::begin_panic::h946f8105e373bde8
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panicking.rs:404
  13:     0x560c1aea74d3 - tokio::runtime::builder::Builder::build_threaded_runtime::h637c5889bed9314d
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/builder.rs:451
  14:     0x560c1aea50c9 - tokio::runtime::builder::Builder::build::he086933f99ea9192
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/builder.rs:313
  15:     0x560c1a3f9433 - deno::tokio_util::run::h0d64594fab7ac82a
                               at cli/tokio_util.rs:8
  16:     0x560c1a099af5 - deno::worker::tests::execute_mod_circular::h29d98cc6a5bea74f
                               at cli/worker.rs:330
  17:     0x560c1a3585fa - deno::worker::tests::execute_mod_circular::{{closure}}::hfd174e3db73e8944
                               at cli/worker.rs:306
  18:     0x560c1a5dfb4e - core::ops::function::FnOnce::call_once::ha93fcba0943fbd50
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libcore/ops/function.rs:232
  19:     0x560c1a61cb3f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hfbd00a7d78f2996c
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  20:     0x560c1c7841da - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:78
  21:     0x560c1a637df7 - std::panicking::try::h9b3e32fe508bbc2b
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panicking.rs:270
  22:     0x560c1a637df7 - std::panic::catch_unwind::hfa1c8fc503c88240
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panic.rs:394
  23:     0x560c1a637df7 - test::run_test_in_process::hbf316d0433aaad9d
                               at src/libtest/lib.rs:567
  24:     0x560c1a637df7 - test::run_test::run_test_inner::{{closure}}::hfafc8bc712444d9d
                               at src/libtest/lib.rs:474
  25:     0x560c1a6112e6 - std::sys_common::backtrace::__rust_begin_short_backtrace::he046f767267f8cc1
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/sys_common/backtrace.rs:136
  26:     0x560c1a615666 - std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}::h181aaf56f21c14b6
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/thread/mod.rs:469
  27:     0x560c1a615666 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h210ac2952a56c497
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panic.rs:318
  28:     0x560c1a615666 - std::panicking::try::do_call::h3bf71a2dd778c40e
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panicking.rs:292
  29:     0x560c1c7841da - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:78
  30:     0x560c1a616096 - std::panicking::try::haa1491030708e35a
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panicking.rs:270
  31:     0x560c1a616096 - std::panic::catch_unwind::h74d1656cfaa8c137
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panic.rs:394
  32:     0x560c1a616096 - std::thread::Builder::spawn_unchecked::{{closure}}::h1aef0c9f6c50afd6
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/thread/mod.rs:468
  33:     0x560c1a616096 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h27f633ebc324b9d3
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libcore/ops/function.rs:232
  34:     0x560c1c766a8f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h7bfd6e98bcf6c67e
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  35:     0x560c1c783330 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h9979661149bbc525
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  36:     0x560c1c783330 - std::sys_common::thread::start_thread::had0bb4166c065276
                               at src/libstd/sys_common/thread.rs:13
  37:     0x560c1c783330 - std::sys::unix::thread::Thread::new::thread_start::hbc75223688f972da
                               at src/libstd/sys/unix/thread.rs:80
  38:     0x7f7355b956db - start_thread
  39:     0x7f73556a688f - __clone
  40:                0x0 - <unknown>

failures:
    compilers::ts::tests::test_bundle_async
    compilers::ts::tests::test_compile_async
    file_fetcher::tests::test_fetch_source_1
    file_fetcher::tests::test_fetch_source_2
    file_fetcher::tests::test_fetch_source_async_1
    file_fetcher::tests::test_fetch_source_file
    file_fetcher::tests::test_fetch_source_file_1
    file_fetcher::tests::test_fetch_source_file_2
    file_fetcher::tests::test_fetch_with_etag
    file_fetcher::tests::test_fetch_with_types_header
    file_fetcher::tests::test_fetch_with_types_reference
    file_fetcher::tests::test_get_source_cached_only
    file_fetcher::tests::test_get_source_code_1
    file_fetcher::tests::test_get_source_code_2
    file_fetcher::tests::test_get_source_code_3
    file_fetcher::tests::test_get_source_code_4
    file_fetcher::tests::test_get_source_code_5
    file_fetcher::tests::test_get_source_code_6
    file_fetcher::tests::test_get_source_code_multiple_downloads_of_same_file
    file_fetcher::tests::test_get_source_no_remote
    http_util::tests::test_fetch_brotli
    http_util::tests::test_fetch_gzip
    http_util::tests::test_fetch_string_once_with_redirect
    http_util::tests::test_fetch_sync_string
    http_util::tests::test_fetch_with_etag
    web_worker::tests::removed_from_resource_table_on_close
    web_worker::tests::test_worker_messages
    worker::tests::execute_006_url_imports
    worker::tests::execute_mod_002_hello
    worker::tests::execute_mod_circular
    worker::tests::execute_mod_esm_imports_a
    worker::tests::execute_mod_resolve_error

test result: FAILED. 152 passed; 32 failed; 0 ignored; 0 measured; 0 filtered out

内核 4.15.0-20-通用 Linux Mint 19.1 Tessa

6

我已经更接近它失败的地方了: https://github.com/tokio-rs/tokio/blob/f9ddb93604a830d106475bd4c4cae436fafcc0da/tokio/src/runtime/builder.rs#L451

第 31 行有一个传递线程数的示例: .core_threads(4) 我尝试添加核心线程行cli/tokio_util.rs,它将失败的测试数从 32 减少到 22,并且不再提及核心线程。显然,我刚刚将其放入4core_threads 中,我不确定是否有更好的方法 :smile: 。

失败的测试大多是断言错误:

---- http_util::tests::test_fetch_brotli stdout ----
thread 'http_util::tests::test_fetch_brotli' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/libcore/result.rs:1188:5
stack backtrace:
deno::test_util::http_server::hd1d64c7ab6b18108
...
    at cli/test_util.rs:62

我有时在构建时会遇到困难,在此步骤中它会在 100% CPU 下停滞一段时间278/298: rusty_v8(build),因此如果其他人可以复制线程修复那就好了!

9

这次合并后,我们离目标更近了一步:https://github.com/denoland/deno/commit/161cf7cdfd44ace8937fb7940727984990742d18

现在我收到这些错误:

thread 'worker::tests::execute_006_url_imports' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', src/libcore/result.rs:1188:5
stack backtrace:
   0:     0x5573fad820c4 - backtrace::backtrace::libunwind::trace::heb43798aede8bd30
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
   1:     0x5573fad820c4 - backtrace::backtrace::trace_unsynchronized::had2ba7dec4bd2732
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
   2:     0x5573fad820c4 - std::sys_common::backtrace::_print_fmt::hda61f46e822731b2
                               at src/libstd/sys_common/backtrace.rs:84
   3:     0x5573fad820c4 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hfe37fa5de6572965
                               at src/libstd/sys_common/backtrace.rs:61
   4:     0x5573fadab4bc - core::fmt::write::h74887d18db27282c
                               at src/libcore/fmt/mod.rs:1025
   5:     0x5573f8cd7e15 - std::io::Write::write_fmt::h614a83dae7f00217
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/io/mod.rs:1426
   6:     0x5573fad78921 - std::io::impls::<impl std::io::Write for alloc::boxed::Box<W>>::write_fmt::h6085952b68669738
                               at src/libstd/io/impls.rs:156
   7:     0x5573fad84a1e - std::sys_common::backtrace::_print::hcc0fd4b3552039ef
                               at src/libstd/sys_common/backtrace.rs:65
   8:     0x5573fad84a1e - std::sys_common::backtrace::print::h1c9c5c1c0505592d
                               at src/libstd/sys_common/backtrace.rs:50
   9:     0x5573fad84a1e - std::panicking::default_hook::{{closure}}::hefb6085c1ab83a59
                               at src/libstd/panicking.rs:193
  10:     0x5573fad846b8 - std::panicking::default_hook::h1b037d2bf0657ab3
                               at src/libstd/panicking.rs:207
  11:     0x5573fad850fb - std::panicking::rust_panic_with_hook::h787d7f532b084b9a
                               at src/libstd/panicking.rs:471
  12:     0x5573fad84cae - rust_begin_unwind
                               at src/libstd/panicking.rs:375
  13:     0x5573fada7dde - core::panicking::panic_fmt::h76b979c035808e69
                               at src/libcore/panicking.rs:84
  14:     0x5573fada7ed7 - core::result::unwrap_failed::hca6a012bfa3eb903
                               at src/libcore/result.rs:1188
  15:     0x5573f9580f3f - core::result::Result<T,E>::unwrap::h26bc9ab2d4c567cf
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libcore/result.rs:956
  16:     0x5573f8a3c277 - deno::test_util::http_server::h9de916c6955cadd0
                               at cli/test_util.rs:62
  17:     0x5573f8cade41 - deno::worker::tests::execute_006_url_imports::{{closure}}::h1e38df43206f2ced
                               at cli/worker.rs:346
  18:     0x5573f8cbb78a - <std::future::GenFuture<T> as core::future::future::Future>::poll::h6d8796556433fba6
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/future.rs:43
  19:     0x5573f890f76f - tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::h89f26308b2b5e3a6
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/basic_scheduler.rs:138
  20:     0x5573f88ced21 - tokio::runtime::Runtime::block_on::{{closure}}::h8ee60cf7bc51df05
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/mod.rs:411
  21:     0x5573f87be49f - tokio::runtime::context::enter::hc8ca31cfb346ec4e
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/context.rs:72
  22:     0x5573f89d72df - tokio::runtime::handle::Handle::enter::h4144387289f9b061
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/handle.rs:34
  23:     0x5573f88ccb70 - tokio::runtime::Runtime::block_on::h1173c1b9a7030b5d
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/mod.rs:408
  24:     0x5573f896f66c - deno::worker::tests::execute_006_url_imports::hf474c1ee19e142f4
                               at cli/worker.rs:344
  25:     0x5573f8cadd8a - deno::worker::tests::execute_006_url_imports::{{closure}}::ha6daa7657280ba9f
                               at cli/worker.rs:344
  26:     0x5573f8b59e6e - core::ops::function::FnOnce::call_once::h6529ff88980426bf
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libcore/ops/function.rs:232
  27:     0x5573f8ce2c4f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hfbd00a7d78f2996c
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  28:     0x5573fad8f9fa - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:78
  29:     0x5573f8cfdf07 - std::panicking::try::h9b3e32fe508bbc2b
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panicking.rs:270
  30:     0x5573f8cfdf07 - std::panic::catch_unwind::hfa1c8fc503c88240
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panic.rs:394
  31:     0x5573f8cfdf07 - test::run_test_in_process::hbf316d0433aaad9d
                               at src/libtest/lib.rs:567
  32:     0x5573f8cfdf07 - test::run_test::run_test_inner::{{closure}}::hfafc8bc712444d9d
                               at src/libtest/lib.rs:474
  33:     0x5573f8cd73f6 - std::sys_common::backtrace::__rust_begin_short_backtrace::he046f767267f8cc1
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/sys_common/backtrace.rs:136
  34:     0x5573f8cdb776 - std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}::h181aaf56f21c14b6
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/thread/mod.rs:469
  35:     0x5573f8cdb776 - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h210ac2952a56c497
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panic.rs:318
  36:     0x5573f8cdb776 - std::panicking::try::do_call::h3bf71a2dd778c40e
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panicking.rs:292
  37:     0x5573fad8f9fa - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:78
  38:     0x5573f8cdc1a6 - std::panicking::try::haa1491030708e35a
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panicking.rs:270
  39:     0x5573f8cdc1a6 - std::panic::catch_unwind::h74d1656cfaa8c137
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/panic.rs:394
  40:     0x5573f8cdc1a6 - std::thread::Builder::spawn_unchecked::{{closure}}::h1aef0c9f6c50afd6
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/thread/mod.rs:468
  41:     0x5573f8cdc1a6 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h27f633ebc324b9d3
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libcore/ops/function.rs:232
  42:     0x5573fad71faf - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h7bfd6e98bcf6c67e
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  43:     0x5573fad8eb50 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h9979661149bbc525
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/liballoc/boxed.rs:1022
  44:     0x5573fad8eb50 - std::sys_common::thread::start_thread::had0bb4166c065276
                               at src/libstd/sys_common/thread.rs:13
  45:     0x5573fad8eb50 - std::sys::unix::thread::Thread::new::thread_start::hbc75223688f972da
                               at src/libstd/sys/unix/thread.rs:80
  46:     0x7faeca3126db - start_thread
  47:     0x7faec9e2388f - __clone
  48:                0x0 - <unknown>

failures:
    file_fetcher::tests::test_fetch_source_1
    file_fetcher::tests::test_fetch_source_2
    file_fetcher::tests::test_fetch_source_async_1
    file_fetcher::tests::test_fetch_with_etag
    file_fetcher::tests::test_fetch_with_types_header
    file_fetcher::tests::test_fetch_with_types_reference
    file_fetcher::tests::test_get_source_cached_only
    file_fetcher::tests::test_get_source_code_1
    file_fetcher::tests::test_get_source_code_2
    file_fetcher::tests::test_get_source_code_3
    file_fetcher::tests::test_get_source_code_4
    file_fetcher::tests::test_get_source_code_5
    file_fetcher::tests::test_get_source_code_6
    file_fetcher::tests::test_get_source_code_multiple_downloads_of_same_file
    file_fetcher::tests::test_get_source_no_remote
    http_util::tests::test_fetch_brotli
    http_util::tests::test_fetch_gzip
    http_util::tests::test_fetch_once_with_redirect
    http_util::tests::test_fetch_sync_string
    http_util::tests::test_fetch_with_etag
    worker::tests::execute_006_url_imports

test result: FAILED. 169 passed; 21 failed; 0 ignored; 0 measured; 0 filtered out

@ry 我正在努力理解堆栈跟踪的这一部分发生了什么:

  16:     0x5573f8a3c277 - deno::test_util::http_server::h9de916c6955cadd0
                               at cli/test_util.rs:62
  17:     0x5573f8cade41 - deno::worker::tests::execute_006_url_imports::{{closure}}::h1e38df43206f2ced
                               at cli/worker.rs:346
  18:     0x5573f8cbb78a - <std::future::GenFuture<T> as core::future::future::Future>::poll::h6d8796556433fba6
                               at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/future.rs:43
  19:     0x5573f890f76f - tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::h89f26308b2b5e3a6
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/basic_scheduler.rs:138
  20:     0x5573f88ced21 - tokio::runtime::Runtime::block_on::{{closure}}::h8ee60cf7bc51df05
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/mod.rs:411
  21:     0x5573f87be49f - tokio::runtime::context::enter::hc8ca31cfb346ec4e
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/context.rs:72
  22:     0x5573f89d72df - tokio::runtime::handle::Handle::enter::h4144387289f9b061
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/handle.rs:34
  23:     0x5573f88ccb70 - tokio::runtime::Runtime::block_on::h1173c1b9a7030b5d
                               at /home/matt/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-0.2.11/src/runtime/mod.rs:408
  24:     0x5573f896f66c - deno::worker::tests::execute_006_url_imports::hf474c1ee19e142f4
                               at cli/worker.rs:344
  25:     0x5573f8cadd8a - deno::worker::tests::execute_006_url_imports::{{closure}}::ha6daa7657280ba9f
                               at cli/worker.rs:344

我想知道这是 tokio 本身的问题,还是 deno 测试设置的问题?

3

@mattlennon3 我知道我有时会遇到这个错误,但我不记得是什么原因导致/修复了它。我会尝试cargo clean再次运行。

5

嗨@afinch7,谢谢你的回复!不幸的是,我得到了相同的输出 :(

在清理并重新运行 fwiw 之前,我拉取了主分支。

1

我可以确认该问题在 v1.0.0 中已经存在。

5

已解决并结束