Coder Social home page Coder Social logo

Comments (6)

brc-dd avatar brc-dd commented on June 11, 2024 1

I'm seeing this only with homebrew version of deno. The latest official binary works fine.

Related issues - Homebrew/homebrew-core#171317, #23758

These are full logs with homebrew version:

❯ which deno
/opt/homebrew/bin/deno

❯ RUST_BACKTRACE=full udd tests/deno/index.test.ts

============================================================
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: macos aarch64
Version: 1.43.2
Args: ["deno", "run", "--allow-read=.", "--allow-write=.", "--allow-net", "--no-config", "https://deno.land/x/udd/main.ts", "tests/deno/index.test.ts"]

thread 'main' panicked at /private/tmp/deno-20240509-7177-1nc96g/deno_core/serde_v8/ser.rs:267:34:
already borrowed: BorrowMutError
stack backtrace:
   0:        0x1051cf9b0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he735dbc19bf16515
   1:        0x1044e8700 - core::fmt::write::hef5cddb56c038e23
   2:        0x1051b9244 - std::io::Write::write_fmt::h0dc631791748dd86
   3:        0x1051cf810 - std::sys_common::backtrace::print::h104bc4229e84cb49
   4:        0x1051e49b8 - std::panicking::default_hook::{{closure}}::he5ba2bc230f0bb9e
   5:        0x1051e46c0 - std::panicking::default_hook::hf55ea1ed61f9a330
   6:        0x1043fd9b4 - deno::setup_panic_hook::{{closure}}::h23acd9c76d0ca189
   7:        0x1051e54b0 - std::panicking::rust_panic_with_hook::h29cd1affa2bec942
   8:        0x1051cfd0c - std::panicking::begin_panic_handler::{{closure}}::h20e35afb75c4d3ea
   9:        0x1051cfc70 - std::sys_common::backtrace::__rust_end_short_backtrace::h3caf01002b4ebcc2
  10:        0x1051e4d1c - _rust_begin_unwind
  11:        0x1044eef88 - core::panicking::panic_fmt::hd47b186e02bbaa3c
  12:        0x1044f5cc0 - core::cell::panic_already_borrowed::h1d75f6098bece528
  13:        0x105194fe8 - <serde_v8::ser::StructSerializers as serde::ser::SerializeStruct>::end::h97c90d35ecb6ebc8
  14:        0x104b6f968 - <serde_v8::magic::buffer::ToJsBuffer as serde::ser::Serialize>::serialize::hbde6413c2d02cd93
  15:        0x104c9c80c - core::ops::function::FnOnce::call_once::hc1939f8f22cf2050
  16:        0x10463cb8c - deno_core::runtime::jsruntime::JsRuntime::do_js_event_loop_tick_realm::hbf577405dca4b35a
  17:        0x10463a0a8 - deno_core::runtime::jsruntime::JsRuntime::poll_event_loop::hea6e424d62a4090e
  18:        0x104157754 - deno_core::runtime::jsruntime::JsRuntime::run_event_loop::{{closure}}::h87bee11e4bf3907c
  19:        0x1041588fc - deno_runtime::worker::MainWorker::run_event_loop::{{closure}}::heb9319d0546c58fc
  20:        0x1041583dc - deno::worker::CliMainWorker::evaluate_module_possibly_with_npm::{{closure}}::h583415d3b0ff7824
  21:        0x1041a52cc - deno::worker::CliMainWorker::execute_main_module_possibly_with_npm::{{closure}}::h776b4d3acb60ff07
  22:        0x1041a4648 - deno::worker::CliMainWorker::run::{{closure}}::h019340077f0a2168
  23:        0x1041a1d94 - deno::tools::run::run_script::{{closure}}::h0ee6e1122ae77c80
  24:        0x1041a5988 - deno::spawn_subcommand::{{closure}}::h0363d328ce7a4f99
  25:        0x1043d9994 - <deno_unsync::task::MaskFutureAsSend<F> as core::future::future::Future>::poll::hf818df4feb59e322
  26:        0x1043d9c98 - tokio::runtime::task::raw::poll::h5e58f9bba51de475
  27:        0x1040739e4 - deno::main::h49a42ed3ea399fc1
  28:        0x104066b08 - std::sys_common::backtrace::__rust_begin_short_backtrace::he3b2470bd5bec9a6
  29:        0x10407258c - _main

from deno.

mmastrac avatar mmastrac commented on June 11, 2024 1

Fixing upstream in deno_core: denoland/deno_core#735

from deno.

nleck avatar nleck commented on June 11, 2024

Downgrading fixed the problem.
curl -fsSL https://deno.land/install.sh | sh -s v1.42.0

from deno.

bebraw avatar bebraw commented on June 11, 2024

Same. If you execute deno task start against https://github.com/survivejs/website-v3, the project crashes in a similar way. Here's the trace:

Task start deno run -A --unstable --no-check https://deno.land/x/[email protected]/gustwind-cli/mod.ts -d -p 3000
⚠️  The `--unstable` flag is deprecated and will be removed in Deno 2.0. Use granular `--unstable-*` flags instead.
Learn more at: https://docs.deno.com/runtime/manual/tools/unstable_flags
Starting development server

============================================================
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: macos x86_64
Version: 1.43.2
Args: ["/usr/local/bin/deno", "run", "-A", "--unstable", "--no-check", "https://deno.land/x/[email protected]/gustwind-cli/mod.ts", "-d", "-p", "3000"]

thread 'main' panicked at /private/tmp/deno-20240509-7188-obss62/deno_core/serde_v8/de.rs:628:53:
called `Option::unwrap()` on a `None` value
stack backtrace:
   0:        0x10479f2ed - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he776435ce16d6b78
   1:        0x1037527cb - core::fmt::write::h2b9e9c9b9d578e83
   2:        0x10478f598 - std::io::Write::write_fmt::had83bf0751478941
   3:        0x10479f0f1 - std::sys_common::backtrace::print::h913402da03d152a3
   4:        0x104786660 - std::panicking::default_hook::{{closure}}::h8fcea87a808389ab
   5:        0x1047863d5 - std::panicking::default_hook::he41a4726e0362119
   6:        0x1036136bc - deno::setup_panic_hook::{{closure}}::h5c1fcd1506d370d3
   7:        0x1047873e0 - std::panicking::rust_panic_with_hook::hfa1925e6750edf2f
   8:        0x10479f5fc - std::panicking::begin_panic_handler::{{closure}}::h80d66d31b1376759
   9:        0x10479f589 - std::sys_common::backtrace::__rust_end_short_backtrace::h7584da9a2fe80106
  10:        0x104786966 - _rust_begin_unwind
  11:        0x105fbf2c5 - core::panicking::panic_fmt::hf8bb0516a37cf723
  12:        0x105fbf3ce - core::panicking::panic::hefc6f8942d8c556c
  13:        0x105fbf7a8 - core::option::unwrap_failed::h5ce22982ddb6c26b
  14:        0x103e1b742 - serde::de::SeqAccess::next_element::h022e05636cbafbd9
  15:        0x103f6af33 - serde_v8::de::from_v8::h7d0d37910e34ec3e
  16:        0x103f741f0 - deno_runtime::ops::process::op_spawn_child::op_spawn_child::v8_fn_ptr::hdf9b7af7281414cc

It worked without problems in the previous version (1.43.1).

from deno.

bebraw avatar bebraw commented on June 11, 2024

This might be related to #23753 and you can find more related issues there.

from deno.

0f-0b avatar 0f-0b commented on June 11, 2024

Running this program with RUST_BACKTRACE=1 cargo +1.78.0 run -r results in the same panic message.

Cargo.toml:

[package]
name = "repro"
edition = "2021"

[dependencies]
deno_core = "0.279.0"

[profile.release]
lto = true

src/main.rs:

use deno_core::{op2, JsRuntime, RuntimeOptions, ToJsBuffer};

#[op2]
#[serde]
fn op_test() -> ToJsBuffer {
    "foo".to_owned().into_bytes().into()
}

deno_core::extension!(
    test,
    ops = [op_test],
    esm_entry_point = "ext:test",
    esm = ["ext:test" = {
        source = r#"
            import { op_test } from "ext:core/ops";
            op_test();
        "#
    }],
);

fn main() {
    JsRuntime::new(RuntimeOptions {
        extensions: vec![test::init_ops_and_esm()],
        ..Default::default()
    });
}

from deno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.