mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-23 22:13:38 +00:00
There is a crash in the WebGPU CI pipeline. It crashed at process
shutdown when unloading onnxruntime_pybind11_state.pyd.
Here is the callstack:
```
dxil.dll!DxcSwapThreadMalloc() Unknown
dxil.dll!DxcThreadMalloc::DxcThreadMalloc(struct IMalloc *) Unknown
dxil.dll!DxcValidator::Release(void) Unknown
[Inline Frame] webgpu_dawn.dll!Microsoft::WRL::ComPtr<IDxcValidator>::InternalRelease() Line 235 C++
[Inline Frame] webgpu_dawn.dll!Microsoft::WRL::ComPtr<IDxcValidator>::{dtor}() Line 290 C++
webgpu_dawn.dll!dawn::native::d3d12::Backend::`scalar deleting destructor'(unsigned int) C++
webgpu_dawn.dll!`eh vector destructor iterator'(void * ptr, unsigned __int64 size, unsigned __int64 count, void(*)(void *) destructor) C++
webgpu_dawn.dll!dawn::native::InstanceBase::~InstanceBase() Line 197 C++
webgpu_dawn.dll!dawn::native::InstanceBase::`scalar deleting destructor'(unsigned int) C++
webgpu_dawn.dll!dawn::native::InstanceBase::DeleteThis() Line 218 C++
ucrtbase.dll!<lambda>(void)() Unknown
ucrtbase.dll!__crt_seh_guarded_call<int>::operator()<<lambda_7777bce6b2f8c936911f934f8298dc43>,<lambda>(void) &,<lambda_3883c3dff614d5e0c5f61bb1ac94921c>>() Unknown
ucrtbase.dll!_execute_onexit_table() Unknown
onnxruntime_pybind11_state.pyd!dllmain_crt_process_detach(const bool is_terminating) Line 182 C++
> onnxruntime_pybind11_state.pyd!dllmain_dispatch(HINSTANCE__ * const instance, const unsigned long reason, void * const reserved) Line 293 C++
ntdll.dll!LdrpCallInitRoutine() Unknown
ntdll.dll!LdrShutdownProcess() Unknown
ntdll.dll!RtlExitUserProcess() Unknown
kernel32.dll!ExitProcessImplementation() Unknown
ucrtbase.dll!exit_or_terminate_process() Unknown
ucrtbase.dll!common_exit() Unknown
python312.dll!00007ff9cab3ec8d() Unknown
python312.dll!00007ff9cab3efbf() Unknown
python312.dll!00007ff9cab3edee() Unknown
python312.dll!00007ff9cab57f4c() Unknown
python312.dll!00007ff9cab57579() Unknown
python312.dll!00007ff9cab573be() Unknown
python312.dll!00007ff9cab5729b() Unknown
python312.dll!00007ff9cabacfcb() Unknown
python312.dll!00007ff9cabacd7d() Unknown
python312.dll!00007ff9cab99e2d() Unknown
python.exe!00007ff78a641230() Unknown
kernel32.dll!BaseThreadInitThunk() Unknown
ntdll.dll!RtlUserThreadStart() Unknown
```
It might be because the destruct order of some global variables was
wrong. I saw DX DLLs were getting destroyed earlier than the WebGPU
instance in our code in onnxruntime_pybind11_state.pyd.
107 lines
3.3 KiB
YAML
107 lines
3.3 KiB
YAML
##### start trigger Don't edit it manually, Please do edit set-trigger-rules.py ####
|
|
### please do rerun set-trigger-rules.py ###
|
|
trigger:
|
|
branches:
|
|
include:
|
|
- main
|
|
- rel-*
|
|
paths:
|
|
exclude:
|
|
- docs/**
|
|
- README.md
|
|
- CONTRIBUTING.md
|
|
- BUILD.md
|
|
- 'js/web'
|
|
- 'onnxruntime/core/providers/js'
|
|
pr:
|
|
branches:
|
|
include:
|
|
- main
|
|
- rel-*
|
|
paths:
|
|
exclude:
|
|
- docs/**
|
|
- README.md
|
|
- CONTRIBUTING.md
|
|
- BUILD.md
|
|
- 'js/web'
|
|
- 'onnxruntime/core/providers/js'
|
|
#### end trigger ####
|
|
|
|
parameters:
|
|
- name: RunOnnxRuntimeTests
|
|
displayName: Run Tests?
|
|
type: boolean
|
|
default: true
|
|
|
|
stages:
|
|
- stage: webgpu
|
|
dependsOn: []
|
|
jobs:
|
|
- template: templates/jobs/win-ci-vs-2022-job.yml
|
|
parameters:
|
|
BuildConfig: 'RelWithDebInfo'
|
|
EnvSetupScript: setup_env.bat
|
|
buildArch: x64
|
|
# add --build_java if necessary
|
|
additionalBuildFlags: >-
|
|
--build_nodejs
|
|
--use_webgpu
|
|
--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=ON onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY=ON
|
|
msbuildPlatform: x64
|
|
isX86: false
|
|
job_name_suffix: x64_RelWithDebInfo
|
|
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
|
|
ORT_EP_NAME: WebGPU
|
|
EnablePython: false
|
|
WITH_CACHE: true
|
|
MachinePool: onnxruntime-Win2022-VS2022-webgpu-A10
|
|
|
|
- stage: webgpu_external_dawn
|
|
dependsOn: []
|
|
jobs:
|
|
- job: build_x64_RelWithDebInfo
|
|
variables:
|
|
DEPS_CACHE_DIR: $(Agent.TempDirectory)/deps_ccache
|
|
ORT_CACHE_DIR: $(Agent.TempDirectory)/ort_ccache
|
|
TODAY: $[format('{0:dd}{0:MM}{0:yyyy}', pipeline.startTime)]
|
|
workspace:
|
|
clean: all
|
|
pool: onnxruntime-Win2022-VS2022-webgpu-A10
|
|
timeoutInMinutes: 300
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
submodules: none
|
|
|
|
- template: templates/jobs/win-ci-prebuild-steps.yml
|
|
parameters:
|
|
EnvSetupScript: setup_env.bat
|
|
DownloadCUDA: false
|
|
DownloadTRT: false
|
|
BuildArch: x64
|
|
BuildConfig: RelWithDebInfo
|
|
MachinePool: onnxruntime-Win2022-VS2022-webgpu-A10
|
|
WithCache: true
|
|
Today: $(Today)
|
|
|
|
- template: templates/jobs/win-ci-build-steps.yml
|
|
parameters:
|
|
WithCache: true
|
|
Today: $(TODAY)
|
|
CacheDir: $(ORT_CACHE_DIR)
|
|
AdditionalKey: " $(System.StageName) | RelWithDebInfo "
|
|
BuildPyArguments: '--config RelWithDebInfo --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --update --parallel --cmake_generator "Visual Studio 17 2022" --use_webgpu --use_external_dawn --skip_tests --target onnxruntime_webgpu_external_dawn_test'
|
|
MsbuildArguments: '-maxcpucount'
|
|
BuildArch: x64
|
|
Platform: x64
|
|
BuildConfig: RelWithDebInfo
|
|
|
|
- script: |
|
|
onnxruntime_webgpu_external_dawn_test.exe
|
|
displayName: Run tests (onnxruntime_webgpu_external_dawn_test)
|
|
workingDirectory: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|
|
- script: |
|
|
onnxruntime_webgpu_external_dawn_test.exe --no_proc_table
|
|
displayName: Run tests (onnxruntime_webgpu_external_dawn_test)
|
|
workingDirectory: '$(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo'
|