{"record":{"id":"f4c1d3a0ae1f1743","repo":"gitui-org/gitui","slug":"get-err","errorCode":null,"errorMessage":"get err","messagePattern":"get err","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/notify_mutex.rs","lineNumber":46,"sourceCode":"\t\tlet mut data = self.data.0.lock().expect(\"lock err\");\n\t\twhile *data != condition {\n\t\t\tdata = self.data.1.wait(data).expect(\"wait err\");\n\t\t}\n\t\tdrop(data);\n\t}\n\n\t///\n\tpub fn set_and_notify(&self, value: T) {\n\t\t*self.data.0.lock().expect(\"set err\") = value;\n\t\tself.data.1.notify_one();\n\t}\n\n\t///\n\tpub fn get(&self) -> T\n\twhere\n\t\tT: Copy,\n\t{\n\t\t*self.data.0.lock().expect(\"get err\")\n\t}\n}\n","sourceCodeStart":28,"sourceCodeEnd":49,"githubUrl":"https://github.com/gitui-org/gitui/blob/2fa693cb6ed431b21ebc300dd02e83c2476699ce/src/notify_mutex.rs#L28-L49","documentation":"Notify::get() locks the shared mutex to copy the value out; expect(\"get err\") fires only on poisoning - an earlier panic on a thread that held the lock. All four notify_mutex expects ('lock'/'wait'/'set'/'get' err) are the same failure class: std mutex poisoning after a panic elsewhere in the process.","triggerScenarios":"Any reader thread calling get() after a writer or another reader panicked while holding the mutex; typical during the fallout of one of gitui's render panics on a background thread.","commonSituations":"Secondary crash lines after the real panic; logs where multiple threads report lock failures in sequence.","solutions":["Treat as noise until the first panic in the log is fixed; that is the actionable one.","Update gitui.","For embedded variants, use unwrap_or_else(|p| p.into_inner()) on lock results or a non-poisoning mutex implementation."],"exampleFix":"// before\n*self.data.0.lock().expect(\"get err\")\n// after\n*self.data.0.lock().unwrap_or_else(|poisoned| poisoned.into_inner())","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"let value = *m.lock().unwrap_or_else(|poisoned| poisoned.into_inner());","preventionTips":["Treat lock-poison messages as trailing noise from an earlier panic; fix that one.","Use non-poisoning mutexes in shared-state code you control.","Log the original panic location (RUST_BACKTRACE=1) to shorten diagnosis."],"tags":["mutex","poisoning","panic","concurrency","notify"],"backgroundTag":"mutex-poisoned","analyzedSha":"2fa693cb6ed431b21ebc300dd02e83c2476699ce","analyzedAt":"2026-08-16T23:07:36.562Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}