{"record":{"id":"8b9e72b7a5f6648b","repo":"dbt-labs/dbt-core","slug":"thread-should-not-have-failed","errorCode":null,"errorMessage":"thread should not have failed","messagePattern":"thread should not have failed","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/dbt-common/src/atomic.rs","lineNumber":117,"sourceCode":"                let thread = std::thread::spawn(move || {\n                    let inner_r = Arc::new(123);\n\n                    std::thread::sleep(std::time::Duration::from_millis(100));\n                    if i % 2 == 0 {\n                        r.store(None);\n                    }\n                    r.store(Some(inner_r));\n                    if let Some(value) = r.load() {\n                        assert_eq!(Arc::new(123), value)\n                    }\n                    std::thread::sleep(std::time::Duration::from_millis(100));\n                    r.store(None);\n                });\n                threads.push(thread);\n            }\n\n            for thread in threads {\n                thread.join().expect(\"thread should not have failed\")\n            }\n        }\n\n        let value = r.load();\n        assert!(value.is_none());\n    }\n}\n","sourceCodeStart":99,"sourceCodeEnd":125,"githubUrl":"https://github.com/dbt-labs/dbt-core/blob/0267ce9170576975b76b64ce856b2e5848e96617/crates/dbt-common/src/atomic.rs#L99-L125","documentation":"Test-only assertion in the AtomicOption concurrency stress test: joining a spawned worker thread must not have panicked. Fires only if concurrent store/load of the AtomicOption panics inside the worker (a real concurrency bug), surfacing the panic here via JoinHandle.","triggerScenarios":"Thrown at crates/dbt-common/src/atomic.rs:117 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the propagated thread panic for the failing assertion in AtomicOption usage","Run the stress test single-threaded to isolate the race","Treat failure as a concurrency bug in AtomicOption, not flaky infrastructure"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0267ce9170576975b76b64ce856b2e5848e96617","analyzedAt":"2026-09-07T21:53:39.732Z","contentChangedAt":"2026-09-07T21:53:39.732Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}