You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally, full backtrace information should be generated.
Alternatively, it would be helpful to include some clue in the backtrace as to why the information is missing.
Reproducing the issue
The following program reproduces the behaviour:
use libc;
use tempdir::TempDir;
use std::{ffi::CString, io::Write};
use std::{env, fs::File};
fn main() {
env::set_var("RUST_BACKTRACE", "full");
println!("Consuming all available file descriptors with RUST_BACKTRACE=full");
let tmp_dir = TempDir::new("example").unwrap();
let path : String = tmp_dir.path().join("test").to_owned().into_os_string().into_string().unwrap();
let mut file = File::create_new(&path).unwrap();
file.write_all(b"contents").unwrap();
let mut fds = vec!();
loop {
let file_path = CString::new(path.clone()).unwrap();
let fd = unsafe { libc::open(file_path.as_ptr(), libc::O_RDONLY) };
if fd == -1 {
panic!("ran out of file descriptors");
}
fds.push(fd);
}
}
Reproduce the issue by cloning this repository and issuing cargo run from inside the cloned directory.
Environment
The issue occurred in the following environments.
Linux
Rust 1.83.0
Arch linux 6.12.4
x86_64
macOS
Rust 1.83.0
macOS Sonoma 14.7.2
Apple M1
Background
The issue was encountered while debugging a failing test. See this zuplip conversation for more details.
The text was updated successfully, but these errors were encountered:
When a program uses all available file descriptors and then panics, the backtrace contains no symbolic information, line numbers, and such like.
Example output
Desired behaviour
Ideally, full backtrace information should be generated.
Alternatively, it would be helpful to include some clue in the backtrace as to why the information is missing.
Reproducing the issue
The following program reproduces the behaviour:
Reproduce the issue by cloning this repository and issuing
cargo run
from inside the cloned directory.Environment
The issue occurred in the following environments.
Linux
macOS
Background
The issue was encountered while debugging a failing test. See this zuplip conversation for more details.
The text was updated successfully, but these errors were encountered: