-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wgpu panics with "Epoch mismatch for .." #1996
Comments
This is a very interesting issue. Thank you for reducing the test case, it's hugely important for us to get right! pub fn xxx_drop<A: HalApi>(&self, id) {
let hub = A::hub(self);
let mut token = Token::root();
let (last_submit_index, device_id) = {
let (mut guard, _) = hub.xxx.write(&mut token);
match guard.get_mut(id) {
Ok(resource) => {
...
}
}
};
let (device_guard, mut token) = hub.devices.read(&mut token);
let device = &device_guard[device_id];
device
.lock_life(&mut token)
.suspected_resources
.xxx
.push(id::Valid(id));
} What happened here is:
I could think of 2 possible solutions here: either lock the life tracker more aggressively, which would mean more locking on any resource being dropped (yikes!). Or just ignore suspected IDs that aren't relevant any more. I think that's an OK way to go for now, and we should revisit this if/once Arcanization work lands (driven by @pythonesque ). |
Fixes #1745: Support out-of-order module scope declarations in WGSL Fixes #1044: Forbid local variable shadowing in WGSL Fixes #2076: [wgsl-in] no error for duplicated type definition Fixes #2071: Global item does not support 'const' Fixes #2105: [wgsl-in] Type aliases for a vecN<T> doesn't work when constructing vec from a single argument Fixes #1775: Referencing a function without a return type yields an unknown identifier error. Fixes #2089: Error span reported on the declaration of a variable instead of its use Fixes #1996: [wgsl-in] Confusing error: "expected unsigned/signed integer literal, found '1'" Separate parsing from lowering by generating an AST, which desugars as much as possible down to something like Naga IR. The AST is then used to resolve identifiers while lowering to Naga IR. Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com> Co-authored-by: Jim Blandy <jimb@red-bean.com>
Description
I really do not know what else to say besides: it crashes.
The only guess that I can make is, that it is a concurrency issue, since leaving the extra thread out of it (see the example) makes everything go away.
Repro steps
Run the example. You may have to run it more than once, since the panic does not happen consistently.
Expected vs observed behavior
It should run without any issues.
Extra materials
Example: wgpu-epoch-bug.zip
Trace: trace.zip
Panic message and backtrace:
Platform
Windows 10
wgpu-0.10 Vulkan backend
RX 570 driver version 21.6.1
Ryzen 7 3700X
The text was updated successfully, but these errors were encountered: