- 
                Notifications
    
You must be signed in to change notification settings  - Fork 255
 
Description
Rarely, subspace-farmer will crash with logs like:
2025-09-11T08:42:08.025567Z  INFO subspace_networking::node_runner: dsn: actively using 3/73 known peers                                       
                                                                                                                                               
thread '<unknown>' has overflowed its stack                                                                                                    
fatal runtime error: stack overflow, aborting  
Unfortunately, Rust does not print backtraces on stack overflow, because it requires an alternate stack:
rust-lang/rust#51405
The recommended workaround is to dump a core dump, and use lldb or gdb with debug symbols:
https://users.rust-lang.org/t/how-to-diagnose-a-stack-overflow-issues-cause/17320/12
https://stackoverflow.com/questions/36041974/is-there-any-standard-methodology-for-debugging-a-stack-overflow-in-rust/36042050#36042050
To generate a build with separate backtrace debug file, use:
RUSTFLAGS="-C debuginfo=line-tables-only -C split-debuginfo=packed" cargo build --locked --profile production --bin subspace-farmerThen copy the debug info .dwp, .dSYM, or .pdb file along with the binary.
https://doc.rust-lang.org/rustc/codegen-options/index.html#debuginfo
https://doc.rust-lang.org/rustc/codegen-options/index.html#split-debuginfo