{"record":{"id":"89cd533e0b9a0350","repo":"gfx-rs/wgpu","slug":"error-writing-lock-observing-action","errorCode":null,"errorMessage":"error writing `lock::observing::Action`","messagePattern":"error writing `lock::observing::Action`","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"wgpu-core/src/lock/observing.rs","lineNumber":424,"sourceCode":"\n    fn write_rank(&mut self, rank: LockRankSet) {\n        self.write_action(&Action::Rank {\n            bit: rank.number(),\n            member_name: rank.member_name(),\n            const_name: rank.const_name(),\n        });\n    }\n\n    fn write_action(&mut self, action: &Action) {\n        use std::io::Write;\n\n        self.buffer.clear();\n        ron::ser::to_writer(&mut self.buffer, &action)\n            .expect(\"error serializing `lock::observing::Action`\");\n        self.buffer.push('\\n');\n        self.log_file\n            .write_all(self.buffer.as_bytes())\n            .expect(\"error writing `lock::observing::Action`\");\n    }\n}\n\n/// An action logged by a thread that is observing lock acquisition order.\n///\n/// Each thread's log file is a sequence of these enums, serialized\n/// using the [`ron`] crate, one action per line.\n///\n/// Lock observation cannot assume that there will be any convenient\n/// finalization point before the program exits, so in practice,\n/// actions must be written immediately when they occur. This means we\n/// can't, say, accumulate tables and write them out when they're\n/// complete. The `lock-analyzer` binary is then responsible for\n/// consolidating the data into a single table of observed transitions.\n#[derive(serde::Serialize)]\nenum Action {\n    /// A location that we will refer to in later actions.\n    ///","sourceCodeStart":406,"sourceCodeEnd":442,"githubUrl":"https://github.com/gfx-rs/wgpu/blob/3e11ff59bf3f9795d285ecc045014089640d7248/wgpu-core/src/lock/observing.rs#L406-L442","documentation":"Panic in lock observation logging: write_all to the observation log file failed (disk full, closed file, or I/O error) after the action was serialized. The faulty input is the log file/its underlying storage.","triggerScenarios":"Thrown at wgpu-core/src/lock/observing.rs:424 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the observation directory and disk have space and remain writable for the process lifetime","Disable lock observation if logging is not essential"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e11ff59bf3f9795d285ecc045014089640d7248","analyzedAt":"2026-09-03T01:43:21.459Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}