gfx-rs/wgpu · error
error writing `lock::observing::Action`
Error message
error writing `lock::observing::Action`
What it means
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.
Source
Thrown at wgpu-core/src/lock/observing.rs:424
fn write_rank(&mut self, rank: LockRankSet) {
self.write_action(&Action::Rank {
bit: rank.number(),
member_name: rank.member_name(),
const_name: rank.const_name(),
});
}
fn write_action(&mut self, action: &Action) {
use std::io::Write;
self.buffer.clear();
ron::ser::to_writer(&mut self.buffer, &action)
.expect("error serializing `lock::observing::Action`");
self.buffer.push('\n');
self.log_file
.write_all(self.buffer.as_bytes())
.expect("error writing `lock::observing::Action`");
}
}
/// An action logged by a thread that is observing lock acquisition order.
///
/// Each thread's log file is a sequence of these enums, serialized
/// using the [`ron`] crate, one action per line.
///
/// Lock observation cannot assume that there will be any convenient
/// finalization point before the program exits, so in practice,
/// actions must be written immediately when they occur. This means we
/// can't, say, accumulate tables and write them out when they're
/// complete. The `lock-analyzer` binary is then responsible for
/// consolidating the data into a single table of observed transitions.
#[derive(serde::Serialize)]
enum Action {
/// A location that we will refer to in later actions.
///View on GitHub (pinned to 3e11ff59bf)
Solutions
- Ensure the observation directory and disk have space and remain writable for the process lifetime
- Disable lock observation if logging is not essential
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at wgpu-core/src/lock/observing.rs:424 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gfx-rs/wgpu@3e11ff59bf (2026-09-03).
Data as JSON: /api/errors/89cd533e0b9a0350.
Report an issue: GitHub.