Skip to content
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

WGL flake turns into panic in request_adapter() #4653

Open
kpreid opened this issue Nov 8, 2023 · 1 comment
Open

WGL flake turns into panic in request_adapter() #4653

kpreid opened this issue Nov 8, 2023 · 1 comment
Labels
backend: gles Issues with GLES or WebGL help required We need community help to make this happen. platform: windows Issues with integration with windows type: bug Something isn't working

Comments

@kpreid
Copy link
Contributor

kpreid commented Nov 8, 2023

In CI, my application called request_adapter() and wgpu panicked due to some sort of flake. Evidently this code path can fail due to external factors; therefore, it should not panic but return an error that can be retried and/or reported to the user. (Or maybe this is some kind of race condition bug analogous to acting on a closed file descriptor?)

inner.context.make_current(inner.device).unwrap();

  thread 'tokio-runtime-worker' panicked at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-hal-0.18.0\src\gles\adapter.rs:194:26:
  called `Result::unwrap()` on an `Err` value: Os { code: 2004, kind: Uncategorized, message: "The requested transformation operation is not supported." }
  stack backtrace:
     0: std::panicking::begin_panic_handler
               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\std\src\panicking.rs:595
     1: core::panicking::panic_fmt
               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\core\src\panicking.rs:67
     2: core::result::unwrap_failed
               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library\core\src\result.rs:1652
     3: enum2$<core::result::Result<tuple$<>,std::io::error::Error> >::unwrap
               at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33\library\core\src\result.rs:1077
     4: wgpu_hal::gles::wgl::AdapterContext::lock
               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-hal-0.18.0\src\gles\wgl.rs:72
     5: wgpu_hal::gles::Adapter::expose
               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-hal-0.18.0\src\gles\adapter.rs:194
     6: wgpu_hal::gles::wgl::impl$11::enumerate_adapters
               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-hal-0.18.0\src\gles\wgl.rs:454
     7: wgpu_core::instance::impl$6::request_adapter::gather<wgpu_hal::gles::Api,tuple$<> >
               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-core-0.18.0\src\instance.rs:834
     8: wgpu_core::global::Global<wgpu_core::identity::IdentityManagerFactory>::request_adapter<wgpu_core::identity::IdentityManagerFactory>
               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-core-0.18.0\src\instance.rs:906
     9: wgpu::backend::direct::impl$7::instance_request_adapter
               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.18.0\src\backend\direct.rs:613
    10: wgpu::context::impl$5::instance_request_adapter<wgpu::backend::direct::Context>
               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.18.0\src\context.rs:2075
    11: wgpu::Instance::request_adapter
               at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.18.0\src\lib.rs:1880
    12: test_wgpu::get_factory::async_fn$0
               at .\tests\test-wgpu.rs:43
    ...

Platform

  • Microsoft Windows Server 2022 10.0.20348 (GitHub Actions)
  • wgpu 0.18.0
  • AdapterInfo { name: "Microsoft Basic Render Driver", vendor: 5140, device: 140, device_type: Cpu, backend: Dx12 }
@kpreid
Copy link
Contributor Author

kpreid commented Nov 8, 2023

(I've only seen this the once so far; I'm filing this issue in the spirit of "when dealing with hardware interfacing, write down all the edge-case happenings", not because it's causing any practical trouble.)

@teoxoy teoxoy added type: bug Something isn't working help required We need community help to make this happen. backend: gles Issues with GLES or WebGL platform: windows Issues with integration with windows labels Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: gles Issues with GLES or WebGL help required We need community help to make this happen. platform: windows Issues with integration with windows type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants