denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.31k stars 5.36k forks source link

bug: long html cause `deno fmt` to panic #26744

Open BlowaterNostr opened 8 hours ago

BlowaterNostr commented 8 hours ago

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: 2.0.4 Args: ["deno", "fmt"]

thread 'tokio-runtime-worker' panicked at cli/tools/fmt.rs:792:11: Formatting not stable. Bailed after 5 tries. This indicates a bug in the formatter where it formats the file (a super long html) differently each time. As a temporary workaround you can ignore this file. stack backtrace: 0: 0x103bb7fa8 - ::fmt::h243268f17d714c7f 1: 0x102c65fd8 - core::fmt::write::hb3cfb8a30e72d7ff 2: 0x103b8736c - std::io::Write::write_fmt::hfb2314975de9ecf1 3: 0x103bba310 - std::panicking::default_hook::{{closure}}::h14c7718ccf39d316 4: 0x103bb9e64 - std::panicking::default_hook::hc62e60da3be2f352 5: 0x102b8837c - deno::setup_panic_hook::{{closure}}::h61fd774b4bec764f 6: 0x103bbb23c - std::panicking::rust_panic_with_hook::h09e8a656f11e82b2 7: 0x103bbaca4 - std::panicking::begin_panic_handler::{{closure}}::h1230eb3cc91b241c 8: 0x103bbac18 - std::sys::backtrace::rust_end_short_backtrace::hc3491307aceda2c2 9: 0x103bbac0c - _rust_begin_unwind 10: 0x102c64500 - core::panicking::panic_fmt::ha4b80a05b9fff47a 11: 0x10291a684 - tokio::runtime::task::raw::poll::h30c25fa47e711b32 12: 0x103c9d3b8 - std::sys::backtrace::__rust_begin_short_backtrace::h220bb53afb6deb29 13: 0x103c9d108 - core::ops::function::FnOnce::call_once{{vtable.shim}}::ha38053a920de994d 14: 0x103bbe8c8 - std::sys::pal::unix::thread::Thread::new::thread_start::h1bd1b9c95010bf71 15: 0x1824ee034 - pthread_joiner_wake make: *** [fmt] Error 1

BlowaterNostr commented 8 hours ago

this html has > 400K characters

bartlomieju commented 7 hours ago

Could you please paste the contents of the HTML file into a gist and link here? I have a feeling this is the same issue as https://github.com/denoland/deno/issues/26560, but I want to confirm it