rvolosatovs opened issue #6456:
Setting
RUST_LOG=trace
in CI tests, e.g. e3cf96200
consistently causes panic in tests:thread 'worker #1' panicked at 'already mutably borrowed: BorrowError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/file-per-thread-logger-0.1.6/src/lib.rs:117:23 stack backtrace: 0: rust_begin_unwind at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5 1: core::panicking::panic_fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14 2: core::result::unwrap_failed at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5 3: core::result::Result<T,E>::expect 4: core::cell::RefCell<T>::borrow 5: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 6: std::thread::local::LocalKey<T>::try_with 7: std::thread::local::LocalKey<T>::with 8: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 9: log::__private_api_log 10: cranelift_codegen::isa::aarch64::inst::emit::mem_finalize 11: cranelift_codegen::isa::aarch64::inst::<impl cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::print_with_state 12: cranelift_codegen::isa::aarch64::inst::emit::<impl cranelift_codegen::machinst::MachInstEmit for cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::pretty_print_inst 13: <cranelift_codegen::machinst::vcode::VCode<I> as core::fmt::Debug>::fmt 14: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 15: <core::fmt::Arguments as core::fmt::Display>::fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:559:9 16: <&T as core::fmt::Display>::fmt 17: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 18: std::io::Write::write_fmt 19: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 20: std::thread::local::LocalKey<T>::try_with 21: std::thread::local::LocalKey<T>::with 22: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 23: log::__private_api_log 24: cranelift_codegen::machinst::lower::Lower<I>::lower 25: cranelift_codegen::machinst::compile::compile 26: cranelift_codegen::isa::aarch64::AArch64Backend::compile_vcode 27: <cranelift_codegen::isa::aarch64::AArch64Backend as cranelift_codegen::isa::TargetIsa>::compile_function 28: cranelift_codegen::context::Context::compile_stencil 29: cranelift_codegen::context::Context::compile 30: <cranelift_filetests::test_compile::TestCompile as cranelift_filetests::subtest::SubTest>::run 31: cranelift_filetests::subtest::SubTest::run_target 32: cranelift_filetests::runone::run 33: cranelift_filetests::concurrent::worker_thread::{{closure}}::{{closure}} 34: std::panicking::try::do_call 35: __rust_try 36: std::panicking::try 37: std::panic::catch_unwind 38: cranelift_filetests::concurrent::worker_thread::{{closure}} note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. FAIL filetests/filetests/isa/aarch64/dynamic-slot.clif: panicked in worker #1: already mutably borrowed: BorrowError thread 'worker #1' panicked at 'already mutably borrowed: BorrowError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/file-per-thread-logger-0.1.6/src/lib.rs:117:23 stack backtrace: 0: rust_begin_unwind at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5 1: core::panicking::panic_fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14 2: core::result::unwrap_failed at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5 3: core::result::Result<T,E>::expect 4: core::cell::RefCell<T>::borrow 5: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 6: std::thread::local::LocalKey<T>::try_with 7: std::thread::local::LocalKey<T>::with 8: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 9: log::__private_api_log 10: cranelift_codegen::isa::aarch64::inst::emit::mem_finalize 11: cranelift_codegen::isa::aarch64::inst::<impl cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::print_with_state 12: cranelift_codegen::isa::aarch64::inst::emit::<impl cranelift_codegen::machinst::MachInstEmit for cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::pretty_print_inst 13: <cranelift_codegen::machinst::vcode::VCode<I> as core::fmt::Debug>::fmt 14: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 15: <core::fmt::Arguments as core::fmt::Display>::fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:559:9 16: <&T as core::fmt::Display>::fmt 17: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 18: std::io::Write::write_fmt 19: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 20: std::thread::local::LocalKey<T>::try_with 21: std::thread::local::LocalKey<T>::with 22: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 23: log::__private_api_log 24: cranelift_codegen::machinst::lower::Lower<I>::lower 25: cranelift_codegen::machinst::compile::compile 26: cranelift_codegen::isa::aarch64::AArch64Backend::compile_vcode 27: <cranelift_codegen::isa::aarch64::AArch64Backend as cranelift_codegen::isa::TargetIsa>::compile_function 28: cranelift_codegen::context::Context::compile_stencil 31: cranelift_filetests::subtest::SubTest::run_target 32: cranelift_filetests::runone::run 33: cranelift_filetests::concurrent::worker_thread::{{closure}}::{{closure}} 34: std::panicking::try::do_call 35: __rust_try 36: std::panicking::try 37: std::panic::catch_unwind 38: cranelift_filetests::concurrent::worker_thread::{{closure}} note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. FAIL filetests/filetests/isa/aarch64/reftypes.clif: panicked in worker #0: already mutably borrowed: BorrowError thread 'worker #1' panicked at 'already mutably borrowed: BorrowError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/file-per-thread-logger-0.1.6/src/lib.rs:117:23 stack backtrace: 0: rust_begin_unwind at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5 1: core::panicking::panic_fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14 2: core::result::unwrap_failed at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5 3: core::result::Result<T,E>::expect 4: core::cell::RefCell<T>::borrow 5: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 6: std::thread::local::LocalKey<T>::try_with 7: std::thread::local::LocalKey<T>::with 8: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 9: log::__private_api_log 10: cranelift_codegen::isa::aarch64::inst::emit::mem_finalize 11: cranelift_codegen::isa::aarch64::inst::<impl cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::print_with_state 12: cranelift_codegen::isa::aarch64::inst::emit::<impl cranelift_codegen::machinst::MachInstEmit for cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::pretty_print_inst 13: <cranelift_codegen::machinst::vcode::VCode<I> as core::fmt::Debug>::fmt 14: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 15: <core::fmt::Arguments as core::fmt::Display>::fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:559:9 16: <&T as core::fmt::Display>::fmt 17: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 18: std::io::Write::write_fmt 19: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 20: std::thread::local::LocalKey<T>::try_with 21: std::thread::local::LocalKey<T>::with 22: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 23: log::__private_api_log 24: cranelift_codegen::machinst::lower::Lower<I>::lower 25: cranelift_codegen::machinst::compile::compile 26: cranelift_codegen::isa::aarch64::AArch64Backend::compile_vcode 27: <cranelift_codegen::isa::aarch64::AArch64Backend as cranelift_codegen::isa::TargetIsa>::compile_function 28: cranelift_codegen::context::Context::compile_stencil 29: cranelift_codegen::context::Context::compile 30: <cranelift_filetests::test_compile::TestCompile as cranelift_filetests::subtest::SubTest>::run 31: cranelift_filetests::subtest::SubTest::run_target 32: cranelift_filetests::runone::run 33: cranelift_filetests::concurrent::worker_thread::{{closure}}::{{closure}} 34: std::panicking::try::do_call 35: __rust_try 36: std::panicking::try 37: std::panic::catch_unwind 38: cranelift_filetests::concurrent::worker_thread::{{closure}} note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. FAIL filetests/filetests/egraph/issue-5716.clif: panicked in worker #1: already mutably borrowed: BorrowError 1218 tests Error: 5 failures error: test failed, to rerun pass `-p cranelift-tools --test filetests`
pchickey commented on issue #6456:
This looks like a panic in
file_per_thread_logger
, @bnjbvr could you take a look?
bnjbvr commented on issue #6456:
Ah interesting, from skimming the backtrace it's a log statement in a log statement, which causes a double borrow of an internal structure in the logger. I'll try to take a look on my spare time.
alexcrichton closed issue #6456:
Setting
RUST_LOG=trace
in CI tests, e.g. e3cf96200
consistently causes panic in tests:thread 'worker #1' panicked at 'already mutably borrowed: BorrowError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/file-per-thread-logger-0.1.6/src/lib.rs:117:23 stack backtrace: 0: rust_begin_unwind at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5 1: core::panicking::panic_fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14 2: core::result::unwrap_failed at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5 3: core::result::Result<T,E>::expect 4: core::cell::RefCell<T>::borrow 5: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 6: std::thread::local::LocalKey<T>::try_with 7: std::thread::local::LocalKey<T>::with 8: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 9: log::__private_api_log 10: cranelift_codegen::isa::aarch64::inst::emit::mem_finalize 11: cranelift_codegen::isa::aarch64::inst::<impl cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::print_with_state 12: cranelift_codegen::isa::aarch64::inst::emit::<impl cranelift_codegen::machinst::MachInstEmit for cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::pretty_print_inst 13: <cranelift_codegen::machinst::vcode::VCode<I> as core::fmt::Debug>::fmt 14: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 15: <core::fmt::Arguments as core::fmt::Display>::fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:559:9 16: <&T as core::fmt::Display>::fmt 17: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 18: std::io::Write::write_fmt 19: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 20: std::thread::local::LocalKey<T>::try_with 21: std::thread::local::LocalKey<T>::with 22: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 23: log::__private_api_log 24: cranelift_codegen::machinst::lower::Lower<I>::lower 25: cranelift_codegen::machinst::compile::compile 26: cranelift_codegen::isa::aarch64::AArch64Backend::compile_vcode 27: <cranelift_codegen::isa::aarch64::AArch64Backend as cranelift_codegen::isa::TargetIsa>::compile_function 28: cranelift_codegen::context::Context::compile_stencil 29: cranelift_codegen::context::Context::compile 30: <cranelift_filetests::test_compile::TestCompile as cranelift_filetests::subtest::SubTest>::run 31: cranelift_filetests::subtest::SubTest::run_target 32: cranelift_filetests::runone::run 33: cranelift_filetests::concurrent::worker_thread::{{closure}}::{{closure}} 34: std::panicking::try::do_call 35: __rust_try 36: std::panicking::try 37: std::panic::catch_unwind 38: cranelift_filetests::concurrent::worker_thread::{{closure}} note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. FAIL filetests/filetests/isa/aarch64/dynamic-slot.clif: panicked in worker #1: already mutably borrowed: BorrowError thread 'worker #1' panicked at 'already mutably borrowed: BorrowError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/file-per-thread-logger-0.1.6/src/lib.rs:117:23 stack backtrace: 0: rust_begin_unwind at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5 1: core::panicking::panic_fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14 2: core::result::unwrap_failed at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5 3: core::result::Result<T,E>::expect 4: core::cell::RefCell<T>::borrow 5: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 6: std::thread::local::LocalKey<T>::try_with 7: std::thread::local::LocalKey<T>::with 8: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 9: log::__private_api_log 10: cranelift_codegen::isa::aarch64::inst::emit::mem_finalize 11: cranelift_codegen::isa::aarch64::inst::<impl cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::print_with_state 12: cranelift_codegen::isa::aarch64::inst::emit::<impl cranelift_codegen::machinst::MachInstEmit for cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::pretty_print_inst 13: <cranelift_codegen::machinst::vcode::VCode<I> as core::fmt::Debug>::fmt 14: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 15: <core::fmt::Arguments as core::fmt::Display>::fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:559:9 16: <&T as core::fmt::Display>::fmt 17: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 18: std::io::Write::write_fmt 19: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 20: std::thread::local::LocalKey<T>::try_with 21: std::thread::local::LocalKey<T>::with 22: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 23: log::__private_api_log 24: cranelift_codegen::machinst::lower::Lower<I>::lower 25: cranelift_codegen::machinst::compile::compile 26: cranelift_codegen::isa::aarch64::AArch64Backend::compile_vcode 27: <cranelift_codegen::isa::aarch64::AArch64Backend as cranelift_codegen::isa::TargetIsa>::compile_function 28: cranelift_codegen::context::Context::compile_stencil 31: cranelift_filetests::subtest::SubTest::run_target 32: cranelift_filetests::runone::run 33: cranelift_filetests::concurrent::worker_thread::{{closure}}::{{closure}} 34: std::panicking::try::do_call 35: __rust_try 36: std::panicking::try 37: std::panic::catch_unwind 38: cranelift_filetests::concurrent::worker_thread::{{closure}} note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. FAIL filetests/filetests/isa/aarch64/reftypes.clif: panicked in worker #0: already mutably borrowed: BorrowError thread 'worker #1' panicked at 'already mutably borrowed: BorrowError', /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/file-per-thread-logger-0.1.6/src/lib.rs:117:23 stack backtrace: 0: rust_begin_unwind at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:579:5 1: core::panicking::panic_fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64:14 2: core::result::unwrap_failed at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/result.rs:1750:5 3: core::result::Result<T,E>::expect 4: core::cell::RefCell<T>::borrow 5: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 6: std::thread::local::LocalKey<T>::try_with 7: std::thread::local::LocalKey<T>::with 8: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 9: log::__private_api_log 10: cranelift_codegen::isa::aarch64::inst::emit::mem_finalize 11: cranelift_codegen::isa::aarch64::inst::<impl cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::print_with_state 12: cranelift_codegen::isa::aarch64::inst::emit::<impl cranelift_codegen::machinst::MachInstEmit for cranelift_codegen::isa::aarch64::lower::isle::generated_code::MInst>::pretty_print_inst 13: <cranelift_codegen::machinst::vcode::VCode<I> as core::fmt::Debug>::fmt 14: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 15: <core::fmt::Arguments as core::fmt::Display>::fmt at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:559:9 16: <&T as core::fmt::Display>::fmt 17: core::fmt::write at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/fmt/mod.rs:1232:17 18: std::io::Write::write_fmt 19: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log::{{closure}} 20: std::thread::local::LocalKey<T>::try_with 21: std::thread::local::LocalKey<T>::with 22: <file_per_thread_logger::FilePerThreadLogger as log::Log>::log 23: log::__private_api_log 24: cranelift_codegen::machinst::lower::Lower<I>::lower 25: cranelift_codegen::machinst::compile::compile 26: cranelift_codegen::isa::aarch64::AArch64Backend::compile_vcode 27: <cranelift_codegen::isa::aarch64::AArch64Backend as cranelift_codegen::isa::TargetIsa>::compile_function 28: cranelift_codegen::context::Context::compile_stencil 29: cranelift_codegen::context::Context::compile 30: <cranelift_filetests::test_compile::TestCompile as cranelift_filetests::subtest::SubTest>::run 31: cranelift_filetests::subtest::SubTest::run_target 32: cranelift_filetests::runone::run 33: cranelift_filetests::concurrent::worker_thread::{{closure}}::{{closure}} 34: std::panicking::try::do_call 35: __rust_try 36: std::panicking::try 37: std::panic::catch_unwind 38: cranelift_filetests::concurrent::worker_thread::{{closure}} note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. FAIL filetests/filetests/egraph/issue-5716.clif: panicked in worker #1: already mutably borrowed: BorrowError 1218 tests Error: 5 failures error: test failed, to rerun pass `-p cranelift-tools --test filetests`
Last updated: Nov 22 2024 at 16:03 UTC