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

Rust panic in http.rs #11091

Closed
konsti219 opened this issue Jun 23, 2021 · 3 comments · Fixed by #11130
Closed

Rust panic in http.rs #11091

konsti219 opened this issue Jun 23, 2021 · 3 comments · Fixed by #11130
Assignees
Labels
bug Something isn't working correctly

Comments

@konsti219
Copy link

I'm running a web server using deno and oak.

deno 1.11.2 (release, x86_64-unknown-linux-gnu)
v8 9.1.269.35
typescript 4.3.2

I'm getting rust panics, but I haven't figured out what causes them yet.

Error with full backtrace:

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', runtime/ops/http.rs:221:47
stack backtrace:
   0:     0x558c6d1e6df3 - std::backtrace_rs::backtrace::libunwind::trace::ha5edb8ba5c6b7a6c
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x558c6d1e6df3 - std::backtrace_rs::backtrace::trace_unsynchronized::h0de86d320a827db2
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x558c6d1e6df3 - std::sys_common::backtrace::_print_fmt::h97b9ad6f0a1380ff
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x558c6d1e6df3 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h14be7eb08f97fe80
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x558c6ca359cf - core::fmt::write::h2ca8877d3e0e52de
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/fmt/mod.rs:1094:17
   5:     0x558c6d1e6674 - std::io::Write::write_fmt::h64f5987220b618f4
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/io/mod.rs:1584:15
   6:     0x558c6d1e611b - std::sys_common::backtrace::_print::h7f1a4097308f2e0a
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x558c6d1e611b - std::sys_common::backtrace::print::h1f799fc2ca7f5035
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x558c6d1e611b - std::panicking::default_hook::{{closure}}::hf38436e8a3ce1071
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:208:50
   9:     0x558c6d1e5432 - std::panicking::default_hook::he2f8f3fae11ed1dd
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:225:9
  10:     0x558c6d1e5432 - std::panicking::rust_panic_with_hook::h79a18548bd90c7d4
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:591:17
  11:     0x558c6d1ff74e - std::panicking::begin_panic_handler::{{closure}}::h212a72cc08e25126
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:495:13
  12:     0x558c6d1ff6ec - std::sys_common::backtrace::__rust_end_short_backtrace::hbd6897dd42bc0fcd
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x558c6d1ff69d - rust_begin_unwind
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:493:5
  14:     0x558c6c69f1e0 - core::panicking::panic_fmt::h77ecd04e9b1dd84d
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:92:14
  15:     0x558c6c69f12c - core::panicking::panic::h60569d8a39169222
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:50:5
  16:     0x558c6cc487b0 - <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll::hf8574d0fccfad93d
  17:     0x558c6cbc23aa - <futures_util::future::future::Inspect<Fut,F> as core::future::future::Future>::poll::h0b56c342f3d7b984
  18:     0x558c6ca77ab7 - futures_util::stream::stream::StreamExt::poll_next_unpin::h73c1866cbd207d49
  19:     0x558c6ca72dd6 - deno_core::runtime::JsRuntime::poll_event_loop::h4f2d7297580c35d7
  20:     0x558c6c715d42 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h732ea0e1a5e05605
  21:     0x558c6c7fd7bc - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h05a1c7faccb95779
  22:     0x558c6c6f47c0 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h434e876dbed6ceda
  23:     0x558c6c6e71e7 - deno::main::h35f038cc28cab3d8
  24:     0x558c6c6e3d3b - std::sys_common::backtrace::__rust_begin_short_backtrace::hb067182dc73ae59f
  25:     0x558c6c6e3fbf - main
  26:     0x7f448433acb2 - __libc_start_main
  27:     0x558c6c6de39a - _start
  28:                0x0 - <unknown>
@ry ry added the bug Something isn't working correctly label Jun 23, 2021
@lucacasonato
Copy link
Member

lucacasonato commented Jun 23, 2021

fetch request body streaming has the same issue, but I already fixed that in #10969.

@bartlomieju
Copy link
Member

bartlomieju commented Jun 26, 2021

@konsti219 could you provide some example reproduction? I'm having trouble triggering this panic.

EDIT: Actually no need, I can rewrite the logic using "safer" methods.

@cryptogohan
Copy link

Nice 🙌 , been seeing this one in the logs.

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants