Tests failing when building Go from source on Windows 7 64Bit

150 views
Skip to first unread message

Michael Lekkas

unread,
Dec 31, 2014, 7:06:17 AM12/31/14
to golan...@googlegroups.com
PS C:\Dev> go version
go version devel +241583a Tue Dec 30 23:28:02 2014 +0000 windows/amd64

PS C:\Dev> go env
set GOARCH=amd64
set GOBIN=
set GOCHAR=6
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Git\Repositories\goprojects
set GORACE=
set GOROOT=C:\Go\source\go
set GOTOOLDIR=C:\Go\source\go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

I am using MinGW-64 (x86_64-4.9.2-release-win32-seh-rt_v3-rev1.7z)

I have pulled the latest commits and I am executing "all.bat"

Build is successful but tests are failing (see attachment) 

May I ask please if you could provide any feedback?

Thank you very much

Failing tests output.txt

peterGo

unread,
Dec 31, 2014, 7:51:48 AM12/31/14
to golan...@googlegroups.com
Michael,

I can't reproduce your issue.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\>gcc --version
gcc (tdm64-2) 4.8.1

C:\>go version

go version devel +241583a Tue Dec 30 23:28:02 2014 +0000 windows/amd64

C:\>go env

set GOARCH=amd64
set GOBIN=
set GOCHAR=6
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\gopath
set GORACE=
set GOROOT=C:\go
set GOTOOLDIR=C:\go\pkg\tool\windows_amd64

set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

C:\go\src>all.bat

<<SNIP>>

ALL TESTS PASSED

---
Installed Go for windows/amd64 in C:\go
Installed commands in C:\go\bin

C:\go\src>


See attachment.

Peter
nuts.txt

Dave Cheney

unread,
Dec 31, 2014, 8:47:59 AM12/31/14
to golan...@googlegroups.com
The runtime tests spawn sub processes to test various aspects of the runtime. Do you have an AV solution or other product that may be interceeding with this ?

Michael Lekkas

unread,
Dec 31, 2014, 9:02:14 AM12/31/14
to golan...@googlegroups.com
I have Kaspersky Pure 3.0

The first times I was building, it was asking me to grant access for net and os test packages and I have configured the firewall accordingly.

After that, I am not getting any other warnings from Kaspersky in order to grant access

Dave Cheney

unread,
Dec 31, 2014, 9:04:56 AM12/31/14
to golan...@googlegroups.com
Try it without your AV.

Michael Lekkas

unread,
Dec 31, 2014, 10:06:38 AM12/31/14
to golan...@googlegroups.com
I have disabled Kaspersky, disabled firewall, even running PowerShell as Administrator but tests are still failing.

ok      regexp  0.639s
ok      regexp/syntax   0.930s
panic: test timed out after 2m0s

goroutine 80666 [running]:
testing.func·008()
        C:/Go/source/go/src/testing/testing.go:681 +0x136
created by time.goFunc
        C:/Go/source/go/src/time/sleep.go:129 +0x5c

goroutine 1 [runnable]:
testing.RunTests(0x6c52c0, 0x785dc0, 0x89, 0x89, 0xc32b7bfc59922501)
        C:/Go/source/go/src/testing/testing.go:556 +0xae6
testing.(*M).Run(0xc08200a1e0, 0x79f5a0)
        C:/Go/source/go/src/testing/testing.go:485 +0x73
main.main()
        runtime/_test/_testmain.go:724 +0x1dc
FAIL    runtime 121.101s
?       runtime/cgo     [no test files]
ok      runtime/debug   0.967s


Michael Lekkas

unread,
Dec 31, 2014, 10:11:26 AM12/31/14
to golan...@googlegroups.com
Peter, thank you very much for your feedback first of all.

PS C:\Dev> gcc -v
Thread model: win32
gcc version 4.9.2 (x86_64-win32-seh-rev1, Built by MinGW-W64 project)

PS C:\Dev> [System.Environment]::OSVersion.Version
Major  Minor  Build  Revision
-----  -----  -----  --------
6      1      7601   65536

I have also installed tdm64-gcc-4.9.2-3.exe but tests are still failing

PS C:\Dev> gcc -v
Thread model: posix
gcc version 4.9.2 (tdm64-1)

peterGo

unread,
Dec 31, 2014, 2:36:02 PM12/31/14
to golan...@googlegroups.com
Michael,

How far did you get in the failed package runtime tests? Run go test -v -short from your src\runtime directory. For example,

C:\>gcc --version
gcc (tdm64-1) 4.9.2
 
C:\>go version
go version devel +6cb4033 Wed Dec 31 13:00:03 2014 +0000 windows/amd64
 
---
Installed Go for windows/amd64 in C:\go
Installed commands in C:\go\bin
---
 
C:\go\src\runtime>go test -v -short
 
=== RUN TestSideEffectOrder
--- PASS: TestSideEffectOrder (0.00s)

<<SNIP>>
 
=== RUN TestZeroDivisionException
--- PASS: TestZeroDivisionException (0.30s)
--- PASS: TestStackGrowth (1.06s)
--- PASS: TestStackGrowthCallback (0.01s)
PASS
ok      runtime 47.483s
 
C:\go\src\runtime>


See attachment.

Peter
nuts.1.txt

minux

unread,
Jan 1, 2015, 2:12:35 AM1/1/15
to Michael Lekkas, golang-nuts
On Wed, Dec 31, 2014 at 7:06 AM, Michael Lekkas <mikel...@gmail.com> wrote:
PS C:\Dev> go version
go version devel +241583a Tue Dec 30 23:28:02 2014 +0000 windows/amd64

PS C:\Dev> go env
set GOARCH=amd64
set GOBIN=
set GOCHAR=6
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Git\Repositories\goprojects
set GORACE=
set GOROOT=C:\Go\source\go
set GOTOOLDIR=C:\Go\source\go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1

I am using MinGW-64 (x86_64-4.9.2-release-win32-seh-rt_v3-rev1.7z)

I have pulled the latest commits and I am executing "all.bat"

Build is successful but tests are failing (see attachment) 
I think the test times out because the machine is slow (or windows is slow,
or the machine is thrashing, ...)

Note this line:
ok      regexp/syntax   7.238s

on my 3-year-old notebook, the same test takes half a second to complete.
and just FYI, the runtime test takes 33s to complete. Taking this time scale
into account, there is no doubt the runtime test will time out on that machine
(it needs at least 7 minutes to complete the runtime test.)

If you do want to complete the test, you can modify run.bat, and raise the
test timeout, by replacing "-timeout=120s" with something like "-timeout=20m"
and then rerun all.bat (or run.bat, if %GOROOT%/bin is in your %PATH%)

Michael Lekkas

unread,
Jan 1, 2015, 10:18:14 AM1/1/15
to golan...@googlegroups.com, mikel...@gmail.com
Minux, you were right about the computer performance.

I had also installed Trusteer Rapport which was causing the issue.

I removed it and now build succeeds.

Thank you very much everyone for your help and Happy New Year!
Reply all
Reply to author
Forward
0 new messages