Fails to build on Windows

This issue has been created since 2021-03-26.

I initially ran xcaddy build --output bin/caddy.exe --with github.com/caddyserver/nginx-adapter
and it immediately throws an exception with a stack trace and blocks my terminal.

I've also tried with various other plugins, and all have the same result.

go version: go1.16.2 windows/amd64

I realize this isn't a lot of information, I'm not very familiar with Go; if you can direct me to how to further debug this, I'd be happy to.

Stack Trace
Exception 0xc0000005 0x0 0x7ffa55310fff 0x209cbd10000
PC=0x209cbd10000

runtime: unknown pc 0x209cbd10000
stack: frame={sp:0x81fcdfe650, fp:0x0} stack=[0x0,0x81fcdffd30)
00000081fcdfe550:  00000081fcdfe598  00000081fcdfe5c0
00000081fcdfe560:  00000081fcdfe588  00000081fcdfe580
00000081fcdfe570:  00000081fcdfe584  00000209a6990fc0
00000081fcdfe580:  0000000000000000  0000000000000000
00000081fcdfe590:  0000000000000000  0000000000000005
00000081fcdfe5a0:  00000081fcdfe6e8  00007ffa52acb3df
00000081fcdfe5b0:  00000209a67c3b40  00007ffa5514345e
00000081fcdfe5c0:  00007ffa551100e8  00000209a67f86f0
00000081fcdfe5d0:  00007ffa52acb3d9  00000081fcdfe620
00000081fcdfe5e0:  004f0044004e0049  0053005c00530057
00000081fcdfe5f0:  00000209a67c3b40  0000000000000000
00000081fcdfe600:  00000209a67dfc60  006c006400050005
00000081fcdfe610:  00007ffa52acb3d9  0000000000000000
00000081fcdfe620:  00007ffa00000000  00007ffa551100e8
00000081fcdfe630:  0000000000000000  0000000000000000
00000081fcdfe640:  0000000000000001  00007ffa55142513
00000081fcdfe650: <0000020900000001  0000000000000000
00000081fcdfe660:  0000000000000000  00000081fcdfe758
00000081fcdfe670:  0000000000000000  0000000000000000
00000081fcdfe680:  0000000000000000  0000000000000000
00000081fcdfe690:  00000209a67f86f0  00007ffa55261180
00000081fcdfe6a0:  00000209a67c3b40  00007ffa552637a0
00000081fcdfe6b0:  000000000000097d  00007ffa51ccccd8
00000081fcdfe6c0:  00007ffa51cca148  00007ffa552611a8
00000081fcdfe6d0:  00007ffa55273fcf  00007ffa51cc0000
00000081fcdfe6e0:  00007ffa55265d94  00007ffa55164c60
00000081fcdfe6f0:  0000000000000000  0000000000000000
00000081fcdfe700:  0000000000000000  0000000000000000
00000081fcdfe710:  00000209a67f3d80  0000000000000044
00000081fcdfe720:  0000000000000003  00007ffa5527a3f0
00000081fcdfe730:  0000000000000001  00000081fcdfea00
00000081fcdfe740:  00000209a67dfc60  00007ffa5516eb58
runtime: unknown pc 0x209cbd10000
stack: frame={sp:0x81fcdfe650, fp:0x0} stack=[0x0,0x81fcdffd30)
00000081fcdfe550:  00000081fcdfe598  00000081fcdfe5c0
00000081fcdfe560:  00000081fcdfe588  00000081fcdfe580
00000081fcdfe570:  00000081fcdfe584  00000209a6990fc0
00000081fcdfe580:  0000000000000000  0000000000000000
00000081fcdfe590:  0000000000000000  0000000000000005
00000081fcdfe5a0:  00000081fcdfe6e8  00007ffa52acb3df
00000081fcdfe5b0:  00000209a67c3b40  00007ffa5514345e
00000081fcdfe5c0:  00007ffa551100e8  00000209a67f86f0
00000081fcdfe5d0:  00007ffa52acb3d9  00000081fcdfe620
00000081fcdfe5e0:  004f0044004e0049  0053005c00530057
00000081fcdfe5f0:  00000209a67c3b40  0000000000000000
00000081fcdfe600:  00000209a67dfc60  006c006400050005
00000081fcdfe610:  00007ffa52acb3d9  0000000000000000
00000081fcdfe620:  00007ffa00000000  00007ffa551100e8
00000081fcdfe630:  0000000000000000  0000000000000000
00000081fcdfe640:  0000000000000001  00007ffa55142513
00000081fcdfe650: <0000020900000001  0000000000000000
00000081fcdfe660:  0000000000000000  00000081fcdfe758
00000081fcdfe670:  0000000000000000  0000000000000000
00000081fcdfe680:  0000000000000000  0000000000000000
00000081fcdfe690:  00000209a67f86f0  00007ffa55261180
00000081fcdfe6a0:  00000209a67c3b40  00007ffa552637a0
00000081fcdfe6b0:  000000000000097d  00007ffa51ccccd8
00000081fcdfe6c0:  00007ffa51cca148  00007ffa552611a8
00000081fcdfe6d0:  00007ffa55273fcf  00007ffa51cc0000
00000081fcdfe6e0:  00007ffa55265d94  00007ffa55164c60
00000081fcdfe6f0:  0000000000000000  0000000000000000
00000081fcdfe700:  0000000000000000  0000000000000000
00000081fcdfe710:  00000209a67f3d80  0000000000000044
00000081fcdfe720:  0000000000000003  00007ffa5527a3f0
00000081fcdfe730:  0000000000000001  00000081fcdfea00
00000081fcdfe740:  00000209a67dfc60  00007ffa5516eb58
rax     0x7ffa51ccd87c
rbx     0x7ffa51ccd87a
rcx     0x41
rdi     0xffffffffffbadd11
rsi     0x0
rbp     0x7ffa51e1a100
rsp     0x81fcdfe650
r8      0x0
r9      0x0
r10     0x0
r11     0x97c
r12     0xc000007a
r13     0x0
r14     0x7ffa51ccd87c
r15     0x7ffa55110000
rip     0x209cbd10000
rflags  0x10202
cs      0x33
fs      0x53
gs      0x2b
francislavoie wrote this answer on 2021-03-26

How did you build/download xcaddy? What version of Go do you have installed (run go version)?

josh-hemphill wrote this answer on 2021-03-26

It might be an issue with the GoLang installation. I had tried installing Go with chocolatey, and got the error when trying to build. For some reason it just started working after I built xcaddy from source after reinstalling Go with Go's msi installer. I think I got the error again after the reinstall because I had put the xcaddy binary I had built previously in my user bin folder and it carried over after the reinstall. I would have thought that building xcaddy would have failed if building with xcaddy ultimately failse.
So I guess that makes it an issue with installing Go with chocolatey on Windows. It didn't look like it was an official installation method, should I open an issue with a GoLang repository?

francislavoie wrote this answer on 2021-03-26

I personally use https://scoop.sh/ to install Go on windows. I think it's better than chocolatey.

Glad you figured it out!

More Details About Repo
Owner Name caddyserver
Repo Name xcaddy
Full Name caddyserver/xcaddy
Language Go
Created Date 2020-03-21
Updated Date 2022-09-22
Star Count 381
Watcher Count 14
Fork Count 72
Issue Count 3

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Can't start if $HOME/.config/sunshine folder doesn't exists 3 2022-08-11 2022-09-07
CFQ: Snapshot floods dmesg: "request aux data allocation failed" 12 2015-10-12 2022-09-13
[Feature Request]: Rebirth local leaderboard 0 2022-01-02 2022-09-05
Conformity of java-webauthn-server to FIDO2 9 2020-12-24 2022-07-27
PILHelper has no attribute 'create_scaled_image' 1 2021-02-19 2022-09-21
Use Async for websocket internal thread management 0 2018-11-29 2022-09-11
Allow Client to Handle Reload 13 2020-05-28 2022-09-11
STD lib OptionParser 1 2021-05-18 2022-08-06
[REVIEW] <Memphis broker> 2 2022-08-01 2022-08-01
[REVIEW] <Transliterate> 1 2022-08-01 2022-08-28
Karabiner Modification Works on External Keyboard But Not MacBook Keyboard 4 2022-06-08 2022-07-26
使用 GitHub Projects 描绘路线图 1 2022-05-31 2022-09-25
System Error when running Ganache 2.5.4 on win32 0 2022-04-26 2022-09-18
System Error when running Ganache 2.5.4 on win32 0 2022-04-26 2022-09-27
Fluid Autocrafting is not working in 1.18 1 2021-12-16 2022-09-11
ASCII art version spacing is slightly off 0 2021-05-06 2021-12-16
Arrow functions as class properties compile incorrectly 4 2022-02-07 2022-09-16
Percetual Loss 3 2021-04-26 2022-01-05
A broken link to a more detailed overview of Optimism contracts in /packages/contracts/README 1 2022-01-26 2022-09-27
Comments from Chapters 2, 3, 7 1 2021-07-31 2022-09-13
Internal compiler error when using two modificators with local variables 3 2021-03-04 2022-09-01
Layout with 3d map export hangs indefinitely (3.16 -> 3.26 regression) 1 2022-09-02 2022-09-08
Safari: Toolbox Hover Issue 0 2022-04-20 2022-08-28
What is the meaning of the prometheus metrics tag "le" and Is there a grafana config file 7 2022-05-05 2022-09-14
TypeScript breaks Storybook 0 2021-12-13 2022-09-13
Cannot set properties of undefined (setting 'loadingDefaults') 12 2022-01-04 2022-09-15
Remove LogName argument as deprecated from Logger API 5 2022-06-01 2022-09-09
1.25.1 and gtksourceview-4 0 2021-02-26 2022-07-13
`shift_left` on constant `int16`s doesn't constant fold 0 2022-02-09 2022-09-20
[BUG] - FriendNotifications v1.8.1 1 2022-03-26 2022-09-06
Need Textures MP 2 2020-12-28 2021-12-26
autojump not working for my macOS Sierra 7 2017-03-02 2022-09-09
Deploying to an arm server running raspbian fails 1 2020-04-21 2022-09-21
attrs shape and radius already defined 3 2014-10-01 2022-08-24
jgroups launch script use deprecated API 0 2021-10-21 2022-09-11
bug: @ionic/react-test-utils ionFireEvent isn't working 3 2022-02-02 2022-08-20
merge_batcher: Base buffer size off 8KiB 2 2021-08-11 2022-08-13
Tableview cell and subviews being kept in memory due to strong retain cycle 2 2022-09-06 2022-09-29
Versioning of the installer 12 2016-04-26 2022-09-21
Optional root (su, Magisk Zygisk module, etc) for mirroring Android 12+ w/FLAG_SECURE 17 2022-02-23 2022-09-25
attempt to move 0 2019-07-24 2022-01-17
Cannot output video from webcam real time 0 2022-07-29 2022-09-10
Add Zega PiBoy 0 2021-10-12 2022-01-12
org.apache.spark.sql.AnalysisException: iceberg is not a valid Spark SQL Data Source 4 2022-05-23 2022-09-21
typescript cannot infer type 4 2019-03-30 2021-12-29
CRITICAL:root:twint.feed:Follow:IndexError when running .Followers script 3 2022-05-02 2022-09-16
Issues Running on Windows 2 2020-12-25 2022-09-21
We are redundantly running Flutter example project build tests on every build shard 1 2022-08-30 2022-09-03
API verification of `ui.dart` not taking enums into account when validating against web 0 2022-08-30 2022-09-03
expect() in semantic test producing unhelpful output 1 2022-08-30 2022-09-03