Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
runtime: Some delay-loaded system DLLs fail to load on Windows Server 2016 #15655
1. What version of Go are you using (
go version go1.6.2 windows/amd64
2. What operating system and processor architecture are you using (
Windows Server 2016 Technical Preview 5 (x64)
3. What did you do?
Compile the example code for
And then try to run it:
4. What did you expect to see?
Expected the correct output for the program:
5. What did you see instead?
An error returned from
I traced this to a problem somewhere in the Windows loader when trying to resolve DLL paths for certain delay-loaded libraries. I don't know if this is a Go bug or a Windows bug.
In the example above the problem is caused when the first call to
The reason for the delay load failure is mysterious, but it's somehow related to
You should get some very verbose output. Now grep for
The critical lines are:
For some reason the loader is unable to compute the DLL path for
It's not just
This is a giant hack, but a possible workaround for this problem is to eagerly load the problematic DLLs instead of letting the delay-load machinery attempt to do so. What I did locally to unblock me was adding
@mattn, do you mean whether I tried passing that flag for my hacky workaround patch to
Note that the original problem manifests itself during an implicit delay load of
@jstarks This was on a Datacenter Edition with Desktop Experience, but I just reinstalled the same OS from scratch on another VM and I cannot repro it there, so maybe something is corrupted on my original install.
I'll dig into it a bit more and report back if I can track down what caused it originally. Feel free to close this issue as no repro; I can reopen it if I get more information.