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

cmd/go: Exception 0xc0000005 thrown when trying to run hello world program #45153

Closed
JacomusP opened this issue Mar 22, 2021 · 5 comments
Closed
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@JacomusP
Copy link

JacomusP commented Mar 22, 2021

What version of Go are you using (go version)?

$ go version
go version go1.16.2 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\peter\AppData\Local\go-build
set GOENV=C:\Users\peter\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\Code\Go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\Code\Go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16.2
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\peter\AppData\Local\Temp\go-build2212488721=/tmp/go-build -gno-record-gcc-switches

What did you do?

I attempted to run the following hello world program.

package main

import "fmt"

func main() {
    fmt.Printf("Hello, world\n")
}

What did you expect to see?

Hello, world to print on the command line

What did you see instead?

go run hello.go
Exception 0xc0000005 0x0 0x7ffdb0e10fff 0x1ac65b20000
PC=0x1ac65b20000

runtime: unknown pc 0x1ac65b20000
stack: frame={sp:0x799f3fe550, fp:0x0} stack=[0x0,0x799f3ffc30)
000000799f3fe450:  000000799f3fe498  000000799f3fe4c0
000000799f3fe460:  000000799f3fe488  000000799f3fe480
000000799f3fe470:  000000799f3fe484  000001ac5f001140
000000799f3fe480:  0000000000000000  0000000000000000
000000799f3fe490:  0000000000000000  0000000000000005
000000799f3fe4a0:  000000799f3fe5e8  00007ffdae93b3df
000000799f3fe4b0:  000001ac5edc3240  00007ffdb0c4345e
000000799f3fe4c0:  00007ffdb0c100e8  000001ac5ee063c0
000000799f3fe4d0:  00007ffdae93b3d9  000000799f3fe520
000000799f3fe4e0:  004f0044004e0049  0053005c00530057
000000799f3fe4f0:  000001ac5edc3240  0000000000000000
000000799f3fe500:  000001ac5edf3ec0  006c006400050005
000000799f3fe510:  00007ffdae93b3d9  0000000000000000
000000799f3fe520:  00007ffd00000000  00007ffdb0c100e8
000000799f3fe530:  0000000000000000  0000000000000000
000000799f3fe540:  0000000000000001  00007ffdb0c42513
000000799f3fe550: <000001ac00000001  0000000000000000
000000799f3fe560:  0000000000000000  000000799f3fe658
000000799f3fe570:  0000000000000000  0000000000000000
000000799f3fe580:  0000000000000000  0000000000000000
000000799f3fe590:  000001ac5ee063c0  00007ffdb0d61180
000000799f3fe5a0:  000001ac5edc3240  00007ffdb0d637a0
000000799f3fe5b0:  000000000000097d  00007ffdadaeccd8
000000799f3fe5c0:  00007ffdadaea148  00007ffdb0d611a8
000000799f3fe5d0:  00007ffdb0d73fcf  00007ffdadae0000
000000799f3fe5e0:  00007ffdb0d65d94  00007ffdb0c64c60
000000799f3fe5f0:  0000000000000000  0000000000000000
000000799f3fe600:  0000000000000000  0000000000000000
000000799f3fe610:  000001ac5ee076c0  0000000000000040
000000799f3fe620:  0000000000000003  00007ffdb0d7a3f0
000000799f3fe630:  0000000000000001  000000799f3fe900
000000799f3fe640:  000001ac5edf3ec0  00007ffdb0c6eb58
runtime: unknown pc 0x1ac65b20000
stack: frame={sp:0x799f3fe550, fp:0x0} stack=[0x0,0x799f3ffc30)
000000799f3fe450:  000000799f3fe498  000000799f3fe4c0
000000799f3fe460:  000000799f3fe488  000000799f3fe480
000000799f3fe470:  000000799f3fe484  000001ac5f001140
000000799f3fe480:  0000000000000000  0000000000000000
000000799f3fe490:  0000000000000000  0000000000000005
000000799f3fe4a0:  000000799f3fe5e8  00007ffdae93b3df
000000799f3fe4b0:  000001ac5edc3240  00007ffdb0c4345e
000000799f3fe4c0:  00007ffdb0c100e8  000001ac5ee063c0
000000799f3fe4d0:  00007ffdae93b3d9  000000799f3fe520
000000799f3fe4e0:  004f0044004e0049  0053005c00530057
000000799f3fe4f0:  000001ac5edc3240  0000000000000000
000000799f3fe500:  000001ac5edf3ec0  006c006400050005
000000799f3fe510:  00007ffdae93b3d9  0000000000000000
000000799f3fe520:  00007ffd00000000  00007ffdb0c100e8
000000799f3fe530:  0000000000000000  0000000000000000
000000799f3fe540:  0000000000000001  00007ffdb0c42513
000000799f3fe550: <000001ac00000001  0000000000000000
000000799f3fe560:  0000000000000000  000000799f3fe658
000000799f3fe570:  0000000000000000  0000000000000000
000000799f3fe580:  0000000000000000  0000000000000000
000000799f3fe590:  000001ac5ee063c0  00007ffdb0d61180
000000799f3fe5a0:  000001ac5edc3240  00007ffdb0d637a0
000000799f3fe5b0:  000000000000097d  00007ffdadaeccd8
000000799f3fe5c0:  00007ffdadaea148  00007ffdb0d611a8
000000799f3fe5d0:  00007ffdb0d73fcf  00007ffdadae0000
000000799f3fe5e0:  00007ffdb0d65d94  00007ffdb0c64c60
000000799f3fe5f0:  0000000000000000  0000000000000000
000000799f3fe600:  0000000000000000  0000000000000000
000000799f3fe610:  000001ac5ee076c0  0000000000000040
000000799f3fe620:  0000000000000003  00007ffdb0d7a3f0
000000799f3fe630:  0000000000000001  000000799f3fe900
000000799f3fe640:  000001ac5edf3ec0  00007ffdb0c6eb58
rax     0x7ffdadaed87c
rbx     0x7ffdadaed87a
rcx     0x41
rdi     0xffffffffffbadd11
rsi     0x0
rbp     0x7ffdadb1a100
rsp     0x799f3fe550
r8      0x0
r9      0x0
r10     0x0
r11     0x97c
r12     0xc000007a
r13     0x0
r14     0x7ffdadaed87c
r15     0x7ffdb0c10000
rip     0x1ac65b20000
rflags  0x10202
cs      0x33
fs      0x53
gs      0x2b

Also this happens whether I run it with -buildmode=exe or not.

@jayconrod
Copy link
Contributor

This is likely a symptom of a corrupted Go installation or a faulty hard disk or RAM.

  • Do you see this consistently, or just once?
  • What happens if you go build hello.go then run hello.exe separately?
  • Do you still see this after reinstalling Go?
  • Do you see this on other machines?

@jayconrod jayconrod added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Mar 22, 2021
@AlexRouSg
Copy link
Contributor

In addition to what @jayconrod said, also check your antivirus as that was the cause of #40878 which looks similar.

@JacomusP
Copy link
Author

@jayconrod

  • I see it consistently
  • If I do go build hello.go and then run hello.exe I see the same error.
  • After reinstalling Go the exception still occurs
  • I only have one windows machine to test it on at the moment, however, I was able to get it setup on my mac-mini yesterday and its been running fine over there.

@AlexRouSg I'll try looking into my AV now and report back.

@JacomusP
Copy link
Author

So I also have Webroot and turning it off made my problem go away. Go now works again on my PC but now I have to find another AV software or just only code in go on my mac-mini. Thanks for your help @AlexRouSg and @jayconrod

@ianlancetaylor
Copy link
Contributor

Thanks for following up. Closing since there doesn't seem to be anything that we can change in the Go repo.

https://golang.org/doc/faq#virus

@golang golang locked and limited conversation to collaborators Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants