Windows OpenGL initialization hangs in wintrust.dll!WinVerifyTrust()

Hi,

Since recently we are getting reports of our application hanging at startup. I’ve managed to reproduce it, here’s a stack trace:

 	ntdll.dll!NtWaitForAlertByThreadId()	Unknown
 	ntdll.dll!RtlAcquireSRWLockExclusive()	Unknown
 	crypt32.dll!CDefaultChainEngineMgr::GetDefaultCurrentUserEngine()	Unknown
 	crypt32.dll!CertGetCertificateChain()	Unknown
 	wintrust.dll!_BuildChainForPubKeyParaInheritance()	Unknown
 	wintrust.dll!I_VerifyRfc3161CounterSignature()	Unknown
 	wintrust.dll!_ExtractCounterSigners()	Unknown
 	wintrust.dll!ExtractSigners_()	Unknown
 	wintrust.dll!SoftpubLoadSignature()	Unknown
 	wintrust.dll!I_VerifyTrust()	Unknown
 	wintrust.dll!WinVerifyTrust()	Unknown
 	nvoglv64.dll!00007fffcae0d5c1()	Unknown
 	nvoglv64.dll!00007fffcae0fe8f()	Unknown
 	nvoglv64.dll!00007fffcae0f858()	Unknown
 	nvoglv64.dll!00007fffca8ff7e3()	Unknown
 	nvoglv64.dll!00007fffca901e29()	Unknown
 	nvoglv64.dll!00007fffca9229fd()	Unknown
 	nvoglv64.dll!00007fffca87aac5()	Unknown
 	nvoglv64.dll!00007fffca87c119()	Unknown
 	nvoglv64.dll!00007fffcae17f6f()	Unknown
 	ntdll.dll!LdrpCallInitRoutine()	Unknown
 	ntdll.dll!LdrpInitializeNode()	Unknown
 	ntdll.dll!LdrpInitializeGraphRecurse()	Unknown
 	ntdll.dll!LdrpPrepareModuleForExecution()	Unknown
 	ntdll.dll!LdrpLoadDllInternal()	Unknown
 	ntdll.dll!LdrpLoadDll()	Unknown
 	ntdll.dll!LdrLoadDll()	Unknown
 	KernelBase.dll!LoadLibraryExW()	Unknown
 	opengl32.dll!pgldrvLoadAndAllocDriverInfo()	Unknown
 	opengl32.dll!LoadAvailableDrivers()	Unknown
 	opengl32.dll!__DescribePrimaryPixelFormat()	Unknown
 	opengl32.dll!wglNumHardwareFormats()	Unknown
 	opengl32.dll!wglSetPixelFormat()	Unknown
 	gdi32full.dll!SetPixelFormat()	Unknown
>	PTGuiViewer.exe!wxGLCanvas::FindMatchingPixelFormat(const wxGLAttributes & dispAttrs, tagPIXELFORMATDESCRIPTOR * ppfd) Line 1068	C++
 	PTGuiViewer.exe!wxGLCanvas::Create(wxWindow * parent, const wxGLAttributes & dispAttrs, int id, const wxPoint & pos, const wxSize & size, long style, const wxString & name, const wxPalette & palette) Line 769	C++
 	PTGuiViewer.exe!wxGLCanvas::wxGLCanvas(wxWindow * parent, const wxGLAttributes & dispAttrs, int id, const wxPoint & pos, const wxSize & size, long style, const wxString & name, const wxPalette & palette) Line 677	C++
 	PTGuiViewer.exe!ViewerCanvas::ViewerCanvas(wxWindow * parent, const wxGLAttributes & glattributes, const std::function<void ()> & aftercreatefunc) Line 725	C++
 	PTGuiViewer.exe!ViewerFrame::ViewerFrame(const TjnNullable<wxString> & panoramafile) Line 565	C++
 	PTGuiViewer.exe!PTGuiViewerApp::CreateViewerFrame(wxFrame * previousframe, const TjnNullable<wxString> & fileName) Line 286	C++
 	[Inline Frame] PTGuiViewer.exe!PTGuiViewerApp::OnInit::<lambda_1>::operator()() Line 391	C++
 	[Inline Frame] PTGuiViewer.exe!PTGuiViewerApp::DoAndShowException(PTGuiViewerApp::OnInit::<lambda_1> func) Line 425	C++
 	PTGuiViewer.exe!PTGuiViewerApp::OnInit() Line 344	C++
 	PTGuiViewer.exe!wxEntryReal(int & argc, wchar_t * * argv) Line 481	C++
 	[Inline Frame] PTGuiViewer.exe!wxEntry(int & argc, wchar_t * * argv) Line 175	C++
 	PTGuiViewer.exe!wxEntry(HINSTANCE__ * hInstance, HINSTANCE__ *, char *, int nCmdShow) Line 345	C++
 	[Inline Frame] PTGuiViewer.exe!invoke_main() Line 102	C++
 	PTGuiViewer.exe!__scrt_common_main_seh() Line 288	C++
 	kernel32.dll!00007ff8688b53e0()	Unknown
 	ntdll.dll!RtlUserThreadStart()	Unknown

This hangs indefinitely. After killing and restarting the application, things run normally. So it appears the driver verification actually succeeds and the result is cached, but the initial call doesn’t return.

The problem seems to have started with driver 546.17, confirmed on several cards (GTX 1660 Ti, RTX3080Ti, RTX 3060). Windows 10.0.22621 as well as 10.0.22000.

It has worked for years, the problem started to appear recently, presumably with driver 546.17.

If more information is needed let me know.

Joost Nieuwenhuijse

Hi there @joostn and welcome back to the NVIDIA developer forums.

I see you also reached out through CUDA support and received a customer visible bug report.

I would appreciate it greatly if you could follow up here when the bug has been resolved in case I miss it, so we can share the solution with the wider public.

Thanks!

Hi Markus, I have received a followup on my bug report, informing me that the problem was found and will be fixed in a future driver update.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.