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

vendor/golang_org/x/net/nettest: TestTestConn runs out of memory on Plan 9 #20489

Open
0intro opened this issue May 24, 2017 · 5 comments
Open

vendor/golang_org/x/net/nettest: TestTestConn runs out of memory on Plan 9 #20489

0intro opened this issue May 24, 2017 · 5 comments
Assignees
Milestone

Comments

@0intro
Copy link
Member

@0intro 0intro commented May 24, 2017

CL 37404 added TestTestConn, which is running out of memory on Plan 9.

runtime: out of memory: cannot allocate 323485696-byte block (1029013504 in use)
fatal error: out of memory

runtime stack:
runtime.throw(0x11b06c, 0xd)
	/tmp/workdir/go/src/runtime/panic.go:596 +0x7b
runtime.largeAlloc(0x13478000, 0x100, 0x3)
	/tmp/workdir/go/src/runtime/malloc.go:816 +0xdf
runtime.mallocgc.func1()
	/tmp/workdir/go/src/runtime/malloc.go:709 +0x38
runtime.systemstack(0x103ee000)
	/tmp/workdir/go/src/runtime/asm_386.s:393 +0x5c
runtime.mstart()
	/tmp/workdir/go/src/runtime/proc.go:1116

goroutine 30390 [running]:
runtime.systemstack_switch()
	/tmp/workdir/go/src/runtime/asm_386.s:347 fp=0x103f4ddc sp=0x103f4dd8
runtime.mallocgc(0x13478000, 0x0, 0x0, 0xb)
	/tmp/workdir/go/src/runtime/malloc.go:708 +0x670 fp=0x103f4e30 sp=0x103f4ddc
runtime.growslice(0xfe140, 0x50b02000, 0xf6c6000, 0xf6c6000, 0xf6c6060, 0x212ac000, 0x4d, 0x50)
	/tmp/workdir/go/src/runtime/slice.go:140 +0x1bb fp=0x103f4e70 sp=0x103f4e30
testing.(*common).log(0x1044e240, 0x17d9e0a0, 0x4d)
	/tmp/workdir/go/src/testing/testing.go:551 +0x11f fp=0x103f4ea8 sp=0x103f4e70
testing.(*common).Errorf(0x1044e240, 0x11d4e9, 0x19, 0x103f4f18, 0x1, 0x1)
	/tmp/workdir/go/src/testing/testing.go:575 +0x5c fp=0x103f4ec8 sp=0x103f4ea8
vendor/golang_org/x/net/nettest.resyncConn(0x1044e240, 0x1a93a0, 0x107da4f8)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest.go:435 +0x158 fp=0x103f4f24 sp=0x103f4ec8
vendor/golang_org/x/net/nettest.testConcurrentMethods(0x1044e240, 0x1a93a0, 0x107da4f8, 0x1a93a0, 0x107da520)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest.go:382 +0x245 fp=0x103f4f58 sp=0x103f4f24
vendor/golang_org/x/net/nettest.timeoutWrapper(0x1044e240, 0x103ea328, 0x121b70)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest.go:56 +0x1ab fp=0x103f4fac sp=0x103f4f58
vendor/golang_org/x/net/nettest.testConn.func11(0x1044e240)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest_go17.go:23 +0x31 fp=0x103f4fbc sp=0x103f4fac
testing.tRunner(0x1044e240, 0x107da450)
	/tmp/workdir/go/src/testing/testing.go:747 +0xa5 fp=0x103f4fe8 sp=0x103f4fbc
runtime.goexit()
	/tmp/workdir/go/src/runtime/asm_386.s:1635 +0x1 fp=0x103f4fec sp=0x103f4fe8
created by testing.(*T).Run
	/tmp/workdir/go/src/testing/testing.go:789 +0x250

goroutine 1 [chan receive]:
testing.(*T).Run(0x1044e000, 0x11acd8, 0xc, 0x121b2c, 0x998d1)
	/tmp/workdir/go/src/testing/testing.go:790 +0x267
testing.runTests.func1(0x1044e000)
	/tmp/workdir/go/src/testing/testing.go:1004 +0x50
testing.tRunner(0x1044e000, 0x10411eec)
	/tmp/workdir/go/src/testing/testing.go:747 +0xa5
testing.runTests(0x103e8070, 0x1b8120, 0x1, 0x1, 0x0)
	/tmp/workdir/go/src/testing/testing.go:1002 +0x23f
testing.(*M).Run(0x1045bf98, 0x10414070)
	/tmp/workdir/go/src/testing/testing.go:921 +0xcc
main.main()
	vendor/golang_org/x/net/nettest/_test/_testmain.go:44 +0xc5

goroutine 6 [chan receive]:
testing.(*T).Run(0x1044e090, 0x1197f1, 0x3, 0x103ea308, 0x5134be)
	/tmp/workdir/go/src/testing/testing.go:790 +0x267
vendor/golang_org/x/net/nettest.TestTestConn(0x1044e090)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest_test.go:76 +0xef
testing.tRunner(0x1044e090, 0x121b2c)
	/tmp/workdir/go/src/testing/testing.go:747 +0xa5
created by testing.(*T).Run
	/tmp/workdir/go/src/testing/testing.go:789 +0x250

goroutine 7 [chan receive]:
testing.(*T).Run(0x1044e1b0, 0x11b943, 0x11, 0x107da450, 0x303da101)
	/tmp/workdir/go/src/testing/testing.go:790 +0x267
vendor/golang_org/x/net/nettest.testConn(0x1044e1b0, 0x103ea328)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest_go17.go:23 +0x3c6
vendor/golang_org/x/net/nettest.TestConn(0x1044e1b0, 0x103ea328)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest.go:37 +0x28
vendor/golang_org/x/net/nettest.TestTestConn.func1(0x1044e1b0)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest_test.go:123 +0x82
testing.tRunner(0x1044e1b0, 0x103ea308)
	/tmp/workdir/go/src/testing/testing.go:747 +0xa5
created by testing.(*T).Run
	/tmp/workdir/go/src/testing/testing.go:789 +0x250

goroutine 30393 [chan receive]:
internal/poll.(*asyncIO).Wait(...)
	/tmp/workdir/go/src/internal/poll/fd_io_plan9.go:84
internal/poll.(*FD).Read(0x10430460, 0x107db210, 0x10607c00, 0x400, 0x400, 0x0, 0x0, 0x0)
	/tmp/workdir/go/src/internal/poll/fd_plan9.go:73 +0x106
net.(*netFD).Read(0x10430460, 0x10607c00, 0x400, 0x400, 0x400, 0x0, 0x0)
	/tmp/workdir/go/src/net/fd_plan9.go:85 +0xb2
net.(*conn).Read(0x107da520, 0x10607c00, 0x400, 0x400, 0x0, 0x0, 0x0)
	/tmp/workdir/go/src/net/net.go:176 +0x55
go.(*struct { io.Reader }).Read(0x107da558, 0x10607c00, 0x400, 0x400, 0x400, 0x0, 0x0)
	<autogenerated>:1 +0x44
io.copyBuffer(0x1a7aa0, 0x107da550, 0x1a7a80, 0x107da558, 0x10607c00, 0x400, 0x400, 0x109affc4, 0x107da558, 0x107da558, ...)
	/tmp/workdir/go/src/io/io.go:390 +0xd8
io.CopyBuffer(0x1a7aa0, 0x107da550, 0x1a7a80, 0x107da558, 0x10607c00, 0x400, 0x400, 0x0, 0x103d4c40, 0x103d4c40, ...)
	/tmp/workdir/go/src/io/io.go:371 +0x5c
vendor/golang_org/x/net/nettest.chunkedCopy(0x1a7880, 0x107da520, 0x3043e0f0, 0x107da520, 0x103f4f60, 0x8)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest.go:449 +0xe6
created by vendor/golang_org/x/net/nettest.testConcurrentMethods
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest.go:344 +0x9a

goroutine 31115 [syscall, locked to thread]:
syscall.Syscall6(0x8, 0x10607c00, 0x400, 0xffffffff, 0xffffffff, 0x0, 0x0, 0x1, 0x1, 0x0, ...)
	/tmp/workdir/go/src/syscall/asm_plan9_386.s:54 +0x5
syscall.Pread(0x8, 0x10607c00, 0x400, 0x400, 0xffffffff, 0xffffffff, 0x103ee000, 0x55239, 0x549d8)
	/tmp/workdir/go/src/syscall/zsyscall_plan9_386.go:218 +0x5c
syscall.Read(0x8, 0x10607c00, 0x400, 0x400, 0x0, 0x0, 0x0)
	/tmp/workdir/go/src/syscall/syscall_plan9.go:124 +0x48
os.fixCount(...)
	/tmp/workdir/go/src/os/file_plan9.go:249
os.(*File).read(0x107da508, 0x10607c00, 0x400, 0x400, 0x0, 0x14c3, 0x0)
	/tmp/workdir/go/src/os/file_plan9.go:249 +0x3c
os.(*File).Read(0x107da508, 0x10607c00, 0x400, 0x400, 0xffffffff, 0x0, 0x0)
	/tmp/workdir/go/src/os/file.go:103 +0x5d
os.(*File).Read-fm(0x10607c00, 0x400, 0x400, 0x400, 0x0, 0x0)
	/tmp/workdir/go/src/net/fd_plan9.go:85 +0x37
internal/poll.newAsyncIO.func1(0x107de3e0, 0x107db210, 0x10607c00, 0x400, 0x400)
	/tmp/workdir/go/src/internal/poll/fd_io_plan9.go:54 +0xc0
created by internal/poll.newAsyncIO
	/tmp/workdir/go/src/internal/poll/fd_io_plan9.go:43 +0xaf

goroutine 31112 [chan send]:
vendor/golang_org/x/net/nettest.resyncConn.func1(0x1a93a0, 0x107da4f8, 0x107e0880)
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest.go:426 +0x79
created by vendor/golang_org/x/net/nettest.resyncConn
	/tmp/workdir/go/src/vendor/golang_org/x/net/nettest/conntest.go:424 +0x8f
FAIL	vendor/golang_org/x/net/nettest	25.967s

See https://build.golang.org/log/91d479d449f2d4e18ff585e87fcf0867a4fd2ea7

@0intro 0intro added the OS-Plan9 label May 24, 2017
@0intro 0intro added this to the Go1.9 milestone May 24, 2017
@0intro 0intro self-assigned this May 24, 2017
@0intro 0intro changed the title vendor/golang_org/x/net/nettest: TestTestConn times out on Plan 9 vendor/golang_org/x/net/nettest: TestTestConn runs out of memory on Plan 9 May 24, 2017
@0intro

This comment has been minimized.

Copy link
Member Author

@0intro 0intro commented May 25, 2017

The issue happens in testConcurrentMethods. It doesn't always fail, but it gets much better with a lower value of n.

@0intro

This comment has been minimized.

Copy link
Member Author

@0intro 0intro commented May 25, 2017

This might be related to an issue in the implementation of deadlines on Plan 9. However, this is a bit difficult to debug from the very bad Internet connection here.

I propose we temporarily skip the test, so I can investigate it later, once I'll be back home.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented May 25, 2017

CL https://golang.org/cl/44130 mentions this issue.

@bradfitz

This comment has been minimized.

Copy link
Contributor

@bradfitz bradfitz commented May 25, 2017

Skipping on plan9 is fine for now. Be sure to reference the relevant bug(s) in the commit that disables it.

gopherbot pushed a commit to golang/net that referenced this issue May 25, 2017
This test is running out of memory on Plan 9.

Updates golang/go#20489.

Change-Id: I79cdea9c31f396b6ef5c47474674ad736362b232
Reviewed-on: https://go-review.googlesource.com/44130
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@dsnet

This comment has been minimized.

Copy link
Member

@dsnet dsnet commented May 25, 2017

A part of me feels bad for breaking Plan 9, but another part of is intrigued that the nettest may have unearthed an issue :P

@bradfitz bradfitz modified the milestones: Go1.9Maybe, Go1.9 Jun 14, 2017
@bradfitz bradfitz modified the milestones: Go1.10, Go1.9Maybe Jun 28, 2017
@bradfitz bradfitz modified the milestones: Go1.10, Unplanned Dec 13, 2017
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
4 participants
You can’t perform that action at this time.