Skip to content

Ferron crashes #417

@zdila

Description

@zdila
RUST_BACKTRACE=1 /home/martin/ferron/target/debug/ferron -c sample.kdl

thread 'Request handler' (2174346) panicked at ferron/src/handler.rs:105:8:
called `Result::unwrap()` on an `Err` value: Os { code: 12, kind: OutOfMemory, message: "Cannot allocate memory" }
stack backtrace:
   0: __rustc::rust_begin_unwind
             at /rustc/ded5c06cf21d2b93bffd5d884aa6e96934ee4234/library/std/src/panicking.rs:698:5
   1: core::panicking::panic_fmt
             at /rustc/ded5c06cf21d2b93bffd5d884aa6e96934ee4234/library/core/src/panicking.rs:80:14
   2: core::result::unwrap_failed
             at /rustc/ded5c06cf21d2b93bffd5d884aa6e96934ee4234/library/core/src/result.rs:1862:5
   3: core::result::Result<T,E>::unwrap
             at /home/martin/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1233:23
   4: ferron::handler::create_http_handler::{{closure}}
             at /home/martin/ferron/ferron/src/handler.rs:105:8
Error while running a server: receiving from an empty and closed channel

(sample.kdl can be anything, even * {})

report-bba427e0-c918-4fb9-8271-908297daf424.toml.gz

Happens with version 2.3.2:

Workaround:

Replace available_parallelism with 8 at

for _ in 0..available_parallelism {

My PC has 24 CPU cores and 64GB RAM.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions