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

all: running make on windows-arm fails #32135

Open
alexbrainman opened this issue May 19, 2019 · 16 comments
Open

all: running make on windows-arm fails #32135

alexbrainman opened this issue May 19, 2019 · 16 comments
Assignees
Milestone

Comments

@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented May 19, 2019

It has been awhile since I have seen windows-arm PASS or FAIL on https://build.golang.org, and I decided to see if Go tip still builds on windows arm.

I managed to install Windows IoT on my Raspberry Pi 3.

administrator@max C:\>ver

Microsoft Windows [Version 10.0.17763.107]

administrator@max C:\>

Then I build bootstrap version of Go for windows arm by running

GOOS=windows GOARCH=arm ./bootstrap.bash

against go1.12.4 Git tag on my Linux computer. And I copied created directory onto my Windows RPI using Windows file share.

I could not find Git program that would run on Windows IoT, so I used my Windows 10 computer to clone Go repo onto file share on Windows IoT. I checked out go1.12.4 Git tag.

I used this command file to setup my Windows IoT environment

set MYHOME=u:\dev
set GOROOT=%MYHOME%\go
set GOROOT_BOOTSTRAP=%MYHOME%\go1.12.4
set GOPATH=%MYHOME%
set PATH=%PATH%;%GOROOT%\bin
U:
cd %GOROOT%\src

and then I run make command.

I expected make command to complete successfully, but it fails with

Building Go cmd/dist using u:\dev\go1.12.4
Building Go toolchain1 using u:\dev\go1.12.4.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
# cmd/compile/internal/ssa
runtime: VirtualAlloc of 4194304 bytes failed with errno=1455
fatal error: out of memory

runtime stack:
runtime.throw(0x17e48b3, 0xd)
	u:/dev/go/src/runtime/panic.go:617 +0x5c
runtime.sysMap(0x34000000, 0x400000, 0x1c0c8b0)
	u:/dev/go/src/runtime/mem_windows.go:122 +0x114
runtime.(*mheap).sysAlloc(0x1bfe180, 0x2000, 0x12b5210, 0x12b5838)
	u:/dev/go/src/runtime/malloc.go:633 +0x180
runtime.(*mheap).grow(0x1bfe180, 0x1, 0x0)
	u:/dev/go/src/runtime/mheap.go:1232 +0x2c
runtime.(*mheap).allocSpanLocked(0x1bfe180, 0x1, 0x1c0c8c0, 0x0)
	u:/dev/go/src/runtime/mheap.go:1150 +0x438
runtime.(*mheap).alloc_m(0x1bfe180, 0x1, 0x1241004b, 0x12ea464)
	u:/dev/go/src/runtime/mheap.go:977 +0xd0
runtime.(*mheap).alloc.func1()
	u:/dev/go/src/runtime/mheap.go:1048 +0x3c
runtime.systemstack(0x0)
	u:/dev/go/src/runtime/asm_arm.s:354 +0x84
runtime.mstart()
	u:/dev/go/src/runtime/proc.go:1153

goroutine 98 [running]:
runtime.systemstack_switch()
	u:/dev/go/src/runtime/asm_arm.s:298 +0x4 fp=0x1f7ad8ec sp=0x1f7ad8e8 pc=0x12ea3d4
runtime.(*mheap).alloc(0x1bfe180, 0x1, 0x1004b, 0x12a5f04)
	u:/dev/go/src/runtime/mheap.go:1047 +0x60 fp=0x1f7ad910 sp=0x1f7ad8ec pc=0x12b550c
runtime.(*mcentral).grow(0x1bff738, 0x0)
	u:/dev/go/src/runtime/mcentral.go:256 +0x94 fp=0x1f7ad93c sp=0x1f7ad910 pc=0x12a6474
runtime.(*mcentral).cacheSpan(0x1bff738, 0x14)
	u:/dev/go/src/runtime/mcentral.go:106 +0x374 fp=0x1f7ad970 sp=0x1f7ad93c pc=0x12a5f10
runtime.(*mcache).refill(0x3206bc, 0x4b)
	u:/dev/go/src/runtime/mcache.go:135 +0x94 fp=0x1f7ad984 sp=0x1f7ad970 pc=0x12a591c
runtime.(*mcache).nextFree(0x3206bc, 0x33b6954b, 0x3f, 0x1bf1860, 0x20)
	u:/dev/go/src/runtime/malloc.go:786 +0x7c fp=0x1f7ad9a4 sp=0x1f7ad984 pc=0x129ad34
runtime.mallocgc(0x800, 0x0, 0x7ff00, 0x1)
	u:/dev/go/src/runtime/malloc.go:939 +0x75c fp=0x1f7ada08 sp=0x1f7ad9a4 pc=0x129b644
runtime.growslice(0x178a5f8, 0x33fb9000, 0x3e1, 0x400, 0x410, 0x138d544, 0x33eab0e0, 0x188f0c0)
	u:/dev/go/src/runtime/slice.go:175 +0x128 fp=0x1f7ada38 sp=0x1f7ada08 pc=0x12d4c2c
bootstrap/cmd/internal/obj.(*LSym).Grow(0x1de73e00, 0x410, 0x0)
	u:/dev/go/src/cmd/internal/obj/data.go:49 +0xd0 fp=0x1f7ada74 sp=0x1f7ada38 pc=0x138c1e4
bootstrap/cmd/internal/obj.(*LSym).prepwrite(0x1de73e00, 0x1244c2c0, 0x3e1, 0x0, 0x2f)
	u:/dev/go/src/cmd/internal/obj/data.go:80 +0x15c fp=0x1f7adaa4 sp=0x1f7ada74 pc=0x138c568
bootstrap/cmd/internal/obj.(*LSym).WriteBytes(0x1de73e00, 0x1244c2c0, 0x3e1, 0x0, 0x33d59740, 0x2f, 0x3c, 0x0, 0x188e4a8)
	u:/dev/go/src/cmd/internal/obj/data.go:177 +0x3c fp=0x1f7adabc sp=0x1f7adaa4 pc=0x138d3ec
bootstrap/cmd/compile/internal/ssa.(*FuncDebug).PutLocationList(0x33f3eec0, 0x33d59740, 0x2f, 0x3c, 0x1244c2c0, 0x1de73e00, 0x1de73d80)
	u:/dev/go/src/cmd/compile/internal/ssa/debug.go:1103 +0x3b8 fp=0x1f7adb08 sp=0x1f7adabc pc=0x14b35ac
bootstrap/cmd/compile/internal/gc.createComplexVar.func1(0x188e4a8, 0x1de73e00, 0x188e4a8, 0x1de73d80)
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:744 +0x6c fp=0x1f7adb28 sp=0x1f7adb08 pc=0x170c36c
bootstrap/cmd/internal/dwarf.putvar(0x1892b10, 0x1244c2c0, 0x1f7ade60, 0x33f3f900, 0x188e4a8, 0x0, 0x3, 0xffffffff, 0x33f61360, 0x0, ...)
	u:/dev/go/src/cmd/internal/dwarf/dwarf.go:1497 +0x3a4 fp=0x1f7adb74 sp=0x1f7adb28 pc=0x1389eb0
bootstrap/cmd/internal/dwarf.putscope(0x1892b10, 0x1244c2c0, 0x1f7ade60, 0x33fbc500, 0x15, 0x15, 0x10, 0x3, 0x33f61360, 0x0, ...)
	u:/dev/go/src/cmd/internal/dwarf/dwarf.go:1330 +0x32c fp=0x1f7adbfc sp=0x1f7adb74 pc=0x1389294
bootstrap/cmd/internal/dwarf.putscope(0x1892b10, 0x1244c2c0, 0x1f7ade60, 0x33fbc500, 0x15, 0x15, 0xf, 0x3, 0x33f61360, 0x0, ...)
	u:/dev/go/src/cmd/internal/dwarf/dwarf.go:1356 +0x560 fp=0x1f7adc84 sp=0x1f7adbfc pc=0x13894c8
bootstrap/cmd/internal/dwarf.putscope(0x1892b10, 0x1244c2c0, 0x1f7ade60, 0x33fbc500, 0x15, 0x15, 0x0, 0x3, 0x33f61360, 0x0, ...)
	u:/dev/go/src/cmd/internal/dwarf/dwarf.go:1341 +0x6f0 fp=0x1f7add0c sp=0x1f7adc84 pc=0x1389658
bootstrap/cmd/internal/dwarf.putPrunedScopes(0x1892b10, 0x1244c2c0, 0x1f7ade60, 0x3, 0x3, 0xc)
	u:/dev/go/src/cmd/internal/dwarf/dwarf.go:1082 +0x2d0 fp=0x1f7addb4 sp=0x1f7add0c pc=0x1387564
bootstrap/cmd/internal/dwarf.PutDefaultFunc(0x1892b10, 0x1244c2c0, 0x1f7ade60, 0x33fbc280, 0x15)
	u:/dev/go/src/cmd/internal/dwarf/dwarf.go:1302 +0x37c fp=0x1f7ade00 sp=0x1f7addb4 pc=0x1388dec
bootstrap/cmd/internal/obj.(*Link).populateDWARF(0x1244c2c0, 0x17d6258, 0x13692780, 0x1de73d80, 0x124481a0, 0x18)
	u:/dev/go/src/cmd/internal/obj/objfile.go:595 +0x3dc fp=0x1f7adec4 sp=0x1f7ade00 pc=0x1391f28
bootstrap/cmd/internal/obj.Flushplist(0x1244c2c0, 0x1f7adf3c, 0x1aa28ae0, 0x124481a0, 0x18)
	u:/dev/go/src/cmd/internal/obj/plist.go:109 +0x640 fp=0x1f7adf24 sp=0x1f7adec4 pc=0x1396880
bootstrap/cmd/compile/internal/gc.(*Progs).Flush(0x33f3ec40)
	u:/dev/go/src/cmd/compile/internal/gc/gsubr.go:93 +0xa8 fp=0x1f7adf48 sp=0x1f7adf24 pc=0x1650cc4
bootstrap/cmd/compile/internal/gc.compileSSA(0x13692780, 0x0)
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:324 +0x3d4 fp=0x1f7adfc8 sp=0x1f7adf48 pc=0x1685044
bootstrap/cmd/compile/internal/gc.compileFunctions.func2(0x1f563c80, 0x1f54e200, 0x0)
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:364 +0x38 fp=0x1f7adfdc sp=0x1f7adfc8 pc=0x170c2c4
runtime.goexit()
	u:/dev/go/src/runtime/asm_arm.s:868 +0x4 fp=0x1f7adfdc sp=0x1f7adfdc pc=0x12ec0d4
created by bootstrap/cmd/compile/internal/gc.compileFunctions
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:362 +0x100

goroutine 1 [runnable]:
bootstrap/cmd/compile/internal/gc.compileFunctions()
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:370 +0x158
bootstrap/cmd/compile/internal/gc.Main(0x18045fc)
	u:/dev/go/src/cmd/compile/internal/gc/main.go:675 +0x21e8
main.main()
	u:/dev/go/src/cmd/compile/main.go:51 +0x7c

goroutine 100 [runnable]:
bootstrap/cmd/compile/internal/gc.(*state).newValue2(0x33a150a0, 0x844, 0x1b09f6c0, 0x33f9c230, 0x1e579868, 0x12437c00)
	u:/dev/go/src/cmd/compile/internal/gc/ssa.go:528 +0x60
bootstrap/cmd/compile/internal/gc.(*state).addr(0x33a150a0, 0x1a1839a0, 0x33a15000, 0x33f99e50)
	u:/dev/go/src/cmd/compile/internal/gc/ssa.go:3874 +0x898
bootstrap/cmd/compile/internal/gc.(*state).expr(0x33a150a0, 0x1a1839a0, 0x0)
	u:/dev/go/src/cmd/compile/internal/gc/ssa.go:2269 +0x4164
bootstrap/cmd/compile/internal/gc.(*state).stmt(0x33a150a0, 0x1a1838b0)
	u:/dev/go/src/cmd/compile/internal/gc/ssa.go:959 +0x150
bootstrap/cmd/compile/internal/gc.(*state).stmtList(0x33a150a0, 0x1d00b0b0)
	u:/dev/go/src/cmd/compile/internal/gc/ssa.go:757 +0x4c
bootstrap/cmd/compile/internal/gc.(*state).stmt(0x33a150a0, 0x1a182050)
	u:/dev/go/src/cmd/compile/internal/gc/ssa.go:1111 +0x1378
bootstrap/cmd/compile/internal/gc.(*state).stmtList(0x33a150a0, 0x1d00b9c0)
	u:/dev/go/src/cmd/compile/internal/gc/ssa.go:757 +0x4c
bootstrap/cmd/compile/internal/gc.buildssa(0x19f20900, 0x2, 0x0)
	u:/dev/go/src/cmd/compile/internal/gc/ssa.go:215 +0x910
bootstrap/cmd/compile/internal/gc.compileSSA(0x19f20900, 0x2)
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:299 +0x24
bootstrap/cmd/compile/internal/gc.compileFunctions.func2(0x1f563c80, 0x1f54e200, 0x2)
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:364 +0x38
created by bootstrap/cmd/compile/internal/gc.compileFunctions
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:362 +0x100

goroutine 99 [runnable]:
bootstrap/cmd/compile/internal/gc.scopePCs(0x1caced80, 0x18def200, 0x1e, 0x20, 0x33c3a500, 0x15, 0x15)
	u:/dev/go/src/cmd/compile/internal/gc/scope.go:101 +0x408
bootstrap/cmd/compile/internal/gc.assembleScopes(0x1caced80, 0x18ddf380, 0x33e30c00, 0xc9, 0x100, 0x33d49c00, 0xc9, 0x100, 0x33e30c00, 0xc9, ...)
	u:/dev/go/src/cmd/compile/internal/gc/scope.go:37 +0x10c
bootstrap/cmd/compile/internal/gc.debuginfo(0x1caced80, 0x17d6258, 0x18ddf380, 0x1cacee00, 0x1cacee40, 0x0, 0x1cacee80, 0xffffffff, 0x33c79dd0)
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:445 +0x5bc
bootstrap/cmd/internal/obj.(*Link).populateDWARF(0x1244c2c0, 0x17d6258, 0x18ddf380, 0x1caced80, 0x124481a0, 0x18)
	u:/dev/go/src/cmd/internal/obj/objfile.go:569 +0x420
bootstrap/cmd/internal/obj.Flushplist(0x1244c2c0, 0x1f629f3c, 0x1a927380, 0x124481a0, 0x18)
	u:/dev/go/src/cmd/internal/obj/plist.go:109 +0x640
bootstrap/cmd/compile/internal/gc.(*Progs).Flush(0x339526c0)
	u:/dev/go/src/cmd/compile/internal/gc/gsubr.go:93 +0xa8
bootstrap/cmd/compile/internal/gc.compileSSA(0x18ddf380, 0x1)
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:324 +0x3d4
bootstrap/cmd/compile/internal/gc.compileFunctions.func2(0x1f563c80, 0x1f54e200, 0x1)
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:364 +0x38
created by bootstrap/cmd/compile/internal/gc.compileFunctions
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:362 +0x100

goroutine 101 [running]:
	goroutine running on other thread; stack unavailable
created by bootstrap/cmd/compile/internal/gc.compileFunctions
	u:/dev/go/src/cmd/compile/internal/gc/pgen.go:362 +0x100
go tool dist: FAILED: u:\dev\go\pkg\tool\windows_arm\go_bootstrap install -gcflags=all= -ldflags=all= -i cmd/asm cmd/cgo cmd/compile cmd/link: exit status 2
The system cannot find the batch label specified - fail

I also tried 84066f1 instead of go1.12.4 for bootstrapping. I also tried running make against 84066f1 instead of go1.12.4. I also tried to add GOARM=7 environment variable to both bootstrap build and make command. All to no good - I get the same result.

I also cannot just increase RPI memory. So I looked for a way to get my RPI page file bigger or something. But I could not find any information on the web.

Looking for suggestions of how I can advance my make command progress further.

Alex

@bradfitz bradfitz added the OS-Windows label May 19, 2019
@bcmills
Copy link
Member

@bcmills bcmills commented May 20, 2019

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Nov 19, 2019

@jordanrh1, where are the windows-arm builders?

Per our https://github.com/golang/go/wiki/PortingPolicy, we're likely to remove ports that don't have builders for long periods of time.

@alexbrainman
Copy link
Member Author

@alexbrainman alexbrainman commented Nov 20, 2019

@jstarks can you help with this issue? It would be sad, if windows-arm code gets removed just because we don't have the builder.

Thank you.

Alex

@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Nov 20, 2019

@zx2c4
Copy link
Contributor

@zx2c4 zx2c4 commented Jun 10, 2020

I am able to successfully build 1.14.4 using the instructions Alex posted in his first message, except adding GOARM=7 to the bootstrap.bash environment. This is on Windows 10 ARM64 with a checkout of 1.14.4:

image

Therefore, I believe this issue can be closed as fixed.

However, this problem -- #39465 -- now exists with gitmaster/1.15.

@alexbrainman
Copy link
Member Author

@alexbrainman alexbrainman commented Jun 10, 2020

I am able to successfully build 1.14.4 using the instructions Alex posted in his first message, except adding GOARM=7 to the bootstrap.bash environment.

Great. Can you try and run all.bat, and see if it pass too.

Also, please, workout how to run windows-arm builder in your environment.

@bcmills do you know how to run windows-arm builder? If not, do you know who knows?

Thank you.

Alex

@zx2c4
Copy link
Contributor

@zx2c4 zx2c4 commented Jun 10, 2020

@bcmills do you know how to run windows-arm builder? If not, do you know who knows?

#36439 (comment)

@alexbrainman
Copy link
Member Author

@alexbrainman alexbrainman commented Jun 10, 2020

@bcmills do you know how to run windows-arm builder? If not, do you know who knows?

#36439 (comment)

Sounds good. Lets see what happens.

Alex

@alexbrainman
Copy link
Member Author

@alexbrainman alexbrainman commented Jun 10, 2020

Alex posted in his first message, except adding GOARM=7 to the bootstrap.bash environment.

Maybe I made mistake, and not specified GOARM=7 to bootstrap.bash. But I think it was more likely that you have more memory in your OS. If you look at the error above

Building Go toolchain2 using go_bootstrap and Go toolchain1.
# cmd/compile/internal/ssa
runtime: VirtualAlloc of 4194304 bytes failed with errno=1455
fatal error: out of memory

I think Raspberry PI just does not have enough memory for make.bat to run. Perhaps it needs a swap file or something.

Alex

@zx2c4
Copy link
Contributor

@zx2c4 zx2c4 commented Jun 10, 2020

Great. Can you try and run all.bat, and see if it pass too.

image

I wonder if shelling out to netsh.exe is a WOW64 issue, since I'm running arm32 on an arm64 system.

Anyway, there's at least one failure in there.

@zx2c4
Copy link
Contributor

@zx2c4 zx2c4 commented Jun 10, 2020

image
This is 1.14.4, by the way. As mentioned above, 1.15 has a crashing compiler due to #39465

@zx2c4
Copy link
Contributor

@zx2c4 zx2c4 commented Jun 10, 2020

image

@zx2c4
Copy link
Contributor

@zx2c4 zx2c4 commented Jun 10, 2020

image
pprof fails extremely elaborately.

@zx2c4
Copy link
Contributor

@zx2c4 zx2c4 commented Jun 10, 2020

image

@zx2c4
Copy link
Contributor

@zx2c4 zx2c4 commented Jun 10, 2020

image

@alexbrainman
Copy link
Member Author

@alexbrainman alexbrainman commented Jun 10, 2020

This is 1.14.4, by the way.

I did not expect all.bat to pass for 1.14. It used to work for go1.12 or thereabout. But all that can be fixed once we get the builder running.

Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.