Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Exceeded available file handles on OSX. Error message should reflect this. #1044

Closed
jonomacd opened this issue Aug 21, 2017 · 4 comments
Closed

Comments

@jonomacd
Copy link

jonomacd commented Aug 21, 2017

UPDATE: Please see comment below. The real issue is running out of file handlers.

What version of Go (go version) and dep (git describe --tags) are you using?

go version go1.8.3 darwin/amd64
dep version v0.3.0-36-g044c4ef

What dep command did you run?

dep ensure -update cloud.google.com/go

It hung for about an hour, then I did a SIGQUIT to dump the stack:

SIGQUIT: quit
PC=0x10571bb m=0 sigcode=0

goroutine 0 [idle]:
runtime.mach_semaphore_wait(0x200001303, 0x0, 0x7fff5fbff8a8, 0x1031477, 0xc4208b1380, 0x17073e0, 0x7fff5fbff8b0, 0x10515d3, 0xffffffffffffffff, 0x0, ...)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/sys_darwin_amd64.s:415 +0xb
runtime.semasleep1(0xffffffffffffffff, 0x0)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/os_darwin.go:413 +0x4b
runtime.semasleep.func1()
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/os_darwin.go:432 +0x33
runtime.systemstack(0x7fff5fbff8d8)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/asm_amd64.s:343 +0xab
runtime.semasleep(0xffffffffffffffff, 0x0)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/os_darwin.go:433 +0x4d
runtime.notesleep(0x1707a70)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/lock_sema.go:166 +0xb2
runtime.stopm()
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/proc.go:1650 +0xad
runtime.findrunnable(0xc42001d300, 0x0)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/proc.go:2102 +0x2e4
runtime.schedule()
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/proc.go:2222 +0x14c
runtime.park_m(0xc4208b1860)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/proc.go:2285 +0xab
runtime.mcall(0x7fff5fbffab0)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/asm_amd64.s:269 +0x5b

goroutine 1 [semacquire, 87 minutes]:
sync.runtime_notifyListWait(0xc42012c0a0, 0xc400000000)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/sema.go:298 +0x10b
sync.(*Cond).Wait(0xc42012c090)
	/usr/local/Cellar/go/1.8.3/libexec/src/sync/cond.go:57 +0x89
github.com/golang/dep/internal/gps.(*supervisor).wait(0xc42012c070)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:703 +0x57
github.com/golang/dep/internal/gps.(*SourceMgr).doRelease(0xc4204702a0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:363 +0x41
github.com/golang/dep/internal/gps.(*SourceMgr).Release.func1()
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:353 +0x2a
sync.(*Once).Do(0xc4204702e8, 0xc420c1b990)
	/usr/local/Cellar/go/1.8.3/libexec/src/sync/once.go:44 +0xbe
github.com/golang/dep/internal/gps.(*SourceMgr).Release(0xc4204702a0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:353 +0x64
main.(*ensureCommand).Run(0xc420145780, 0xc42006d770, 0xc420086170, 0x1, 0x1, 0x16d1500, 0xc42079cac0)
	/Users/jono/src/github.com/golang/dep/cmd/dep/ensure.go:181 +0x3b8
main.(*Config).Run(0xc42006efc0, 0xc42006efc0)
	/Users/jono/src/github.com/golang/dep/cmd/dep/main.go:158 +0x855
main.main()
	/Users/jono/src/github.com/golang/dep/cmd/dep/main.go:45 +0x253

goroutine 17 [syscall, 87 minutes, locked to thread]:
runtime.goexit()
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/asm_amd64.s:2197 +0x1

goroutine 20 [syscall, 87 minutes]:
os/signal.signal_recv(0x0)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/sigqueue.go:116 +0xff
os/signal.loop()
	/usr/local/Cellar/go/1.8.3/libexec/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.1
	/usr/local/Cellar/go/1.8.3/libexec/src/os/signal/signal_unix.go:28 +0x41

goroutine 34 [select, 87 minutes, locked to thread]:
runtime.gopark(0x14f2b48, 0x0, 0x14d711e, 0x6, 0x18, 0x2)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/proc.go:271 +0x13a
runtime.selectgoImpl(0xc420029750, 0x0, 0x18)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/select.go:423 +0x1364
runtime.selectgo(0xc420029750)
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/select.go:238 +0x1c
runtime.ensureSigM.func1()
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/signal_unix.go:434 +0x265
runtime.goexit()
	/usr/local/Cellar/go/1.8.3/libexec/src/runtime/asm_amd64.s:2197 +0x1

goroutine 35 [select, 87 minutes]:
github.com/golang/dep/internal/gps.(*SourceMgr).HandleSignals.func1(0xc4204702a0, 0xc420470300, 0xc420470480)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:272 +0x26f
created by github.com/golang/dep/internal/gps.(*SourceMgr).HandleSignals
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:308 +0xb1

goroutine 104 [chan receive, 87 minutes]:
github.com/golang/dep/internal/gps.(*monitoredCmd).run(0xc42079a8e0, 0x16d7c00, 0xc420700a50, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:118 +0x339
github.com/golang/dep/internal/gps.(*monitoredCmd).combinedOutput(0xc42079a8e0, 0x16d7c00, 0xc420700a50, 0xc420c42000, 0x1a, 0x30, 0xc420c42000, 0x1a)
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:130 +0x6b
github.com/golang/dep/internal/gps.(*gitSource).listVersions(0xc4203721b0, 0x16d7c00, 0xc420700a50, 0x1010fe8, 0x10, 0x1471ea0, 0xc420aa7701, 0xc4203721c0)
	/Users/jono/src/github.com/golang/dep/internal/gps/vcs_source.go:167 +0x358
github.com/golang/dep/internal/gps.maybeGitSource.try.func1(0x16d7c00, 0xc420700a50, 0x16d7900, 0xc4203f2140)
	/Users/jono/src/github.com/golang/dep/internal/gps/maybe_source.go:106 +0x71
github.com/golang/dep/internal/gps.(*supervisor).do(0xc42012c070, 0x16d7940, 0xc420070638, 0x14d9a21, 0xc, 0x1, 0xc420aa78e8, 0xc42000e068, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:631 +0xd5
github.com/golang/dep/internal/gps.maybeGitSource.try(0xc4203c2600, 0x16d7940, 0xc420070638, 0xc420145900, 0x13, 0x16daa60, 0xc42049eec0, 0xc42012c070, 0x0, 0x0, ...)
	/Users/jono/src/github.com/golang/dep/internal/gps/maybe_source.go:110 +0x212
github.com/golang/dep/internal/gps.maybeSources.try(0xc420011c80, 0x4, 0x4, 0x16d7940, 0xc420070638, 0xc420145900, 0x13, 0x16daa60, 0xc42049eec0, 0xc42012c070, ...)
	/Users/jono/src/github.com/golang/dep/internal/gps/maybe_source.go:35 +0xf1
github.com/golang/dep/internal/gps.(*maybeSources).try(0xc42079b3a0, 0x16d7940, 0xc420070638, 0xc420145900, 0x13, 0x16daa60, 0xc42049eec0, 0xc42012c070, 0x100ebe3, 0xc420aa7b80, ...)
	<autogenerated>:216 +0xc7
github.com/golang/dep/internal/gps.(*sourceGateway).require(0xc4206ad500, 0x16d7940, 0xc420070638, 0x1, 0x40, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source.go:489 +0x243
github.com/golang/dep/internal/gps.(*sourceGateway).sourceURL(0xc4206ad500, 0x16d7940, 0xc420070638, 0x0, 0x0, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source.go:457 +0xbc
github.com/golang/dep/internal/gps.(*sourceCoordinator).getSourceGatewayFor(0xc4204701e0, 0x16d7940, 0xc420070638, 0xc420296200, 0x1f, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source.go:156 +0xcc3
github.com/golang/dep/internal/gps.(*SourceMgr).ListPackages(0xc4204702a0, 0xc420296200, 0x1f, 0x0, 0x0, 0x16d9fe0, 0xc420220cf0, 0x0, 0x0, 0x0, ...)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:400 +0x9a
github.com/golang/dep/internal/gps.(*bridge).breakLock.func1(0xc4202f76b0, 0xc420296200, 0x1f, 0x0, 0x0, 0x16d9fe0, 0xc420220cf0)
	/Users/jono/src/github.com/golang/dep/internal/gps/bridge.go:210 +0xc9
created by github.com/golang/dep/internal/gps.(*bridge).breakLock
	/Users/jono/src/github.com/golang/dep/internal/gps/bridge.go:211 +0x240

goroutine 494 [syscall, 87 minutes]:
syscall.Syscall(0x3, 0xd, 0xc420aca000, 0x8000, 0x1, 0x42, 0x1e6c778)
	/usr/local/Cellar/go/1.8.3/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0xd, 0xc420aca000, 0x8000, 0x8000, 0x1e6c778, 0x1, 0x101000000000000)
	/usr/local/Cellar/go/1.8.3/libexec/src/syscall/zsyscall_darwin_amd64.go:973 +0x55
syscall.Read(0xd, 0xc420aca000, 0x8000, 0x8000, 0x1b00e10, 0x0, 0xc4208b6e28)
	/usr/local/Cellar/go/1.8.3/libexec/src/syscall/syscall_unix.go:162 +0x49
os.(*File).read(0xc420480248, 0xc420aca000, 0x8000, 0x8000, 0x143a4a0, 0xc4208b6e01, 0xc420aca000)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/file_unix.go:165 +0x6a
os.(*File).Read(0xc420480248, 0xc420aca000, 0x8000, 0x8000, 0x8000, 0x8000, 0x1005ecb)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/file.go:101 +0x76
io.copyBuffer(0x16d0fc0, 0xc4202c2000, 0x16d1dc0, 0xc420480248, 0xc420aca000, 0x8000, 0x8000, 0xc420b31678, 0x0, 0x0)
	/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:390 +0x100
io.Copy(0x16d0fc0, 0xc4202c2000, 0x16d1dc0, 0xc420480248, 0x14360e0, 0xc420b31620, 0xc4208b6fb0)
	/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:360 +0x68
os/exec.(*Cmd).writerDescriptor.func1(0x14360e0, 0xc420b31620)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:254 +0x4d
os/exec.(*Cmd).Start.func1(0xc4206cd1e0, 0xc4202dac00)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:371 +0x27
created by os/exec.(*Cmd).Start
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:372 +0x4e4

goroutine 416 [syscall, 87 minutes]:
syscall.Syscall(0x3, 0x2f, 0xc420bb2000, 0x8000, 0xc420bb2000, 0x1bb0740, 0xc42051bd70)
	/usr/local/Cellar/go/1.8.3/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x2f, 0xc420bb2000, 0x8000, 0x8000, 0x1b782d0, 0x1002f01, 0x10100c420a43608)
	/usr/local/Cellar/go/1.8.3/libexec/src/syscall/zsyscall_darwin_amd64.go:973 +0x55
syscall.Read(0x2f, 0xc420bb2000, 0x8000, 0x8000, 0x1b00960, 0x0, 0xc420a43628)
	/usr/local/Cellar/go/1.8.3/libexec/src/syscall/syscall_unix.go:162 +0x49
os.(*File).read(0xc42000e080, 0xc420bb2000, 0x8000, 0x8000, 0x143a4a0, 0xc420a43601, 0xc420bb2000)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/file_unix.go:165 +0x6a
os.(*File).Read(0xc42000e080, 0xc420bb2000, 0x8000, 0x8000, 0x8000, 0x8000, 0x1005e60)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/file.go:101 +0x76
io.copyBuffer(0x16d0fc0, 0xc4202d0630, 0x16d1dc0, 0xc42000e080, 0xc420bb2000, 0x8000, 0x8000, 0xc4206575b8, 0x0, 0x0)
	/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:390 +0x100
io.Copy(0x16d0fc0, 0xc4202d0630, 0x16d1dc0, 0xc42000e080, 0x14360e0, 0xc420657560, 0xc420a437b0)
	/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:360 +0x68
os/exec.(*Cmd).writerDescriptor.func1(0x14360e0, 0xc420657560)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:254 +0x4d
os/exec.(*Cmd).Start.func1(0xc42069c160, 0xc42079aa20)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:371 +0x27
created by os/exec.(*Cmd).Start
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:372 +0x4e4

goroutine 111 [chan receive, 87 minutes]:
github.com/golang/dep/internal/gps.(*monitoredCmd).run(0xc42079af40, 0x16d7c00, 0xc420700c80, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:118 +0x339
github.com/golang/dep/internal/gps.(*monitoredCmd).combinedOutput(0xc42079af40, 0x16d7c00, 0xc420700c80, 0xc420c42300, 0x1a, 0x30, 0xc420c42300, 0x1a)
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:130 +0x6b
github.com/golang/dep/internal/gps.(*gitSource).listVersions(0xc4203723c0, 0x16d7c00, 0xc420700c80, 0x1010fe8, 0x10, 0x1471ea0, 0xc420ae9701, 0xc4203723d0)
	/Users/jono/src/github.com/golang/dep/internal/gps/vcs_source.go:167 +0x358
github.com/golang/dep/internal/gps.maybeGitSource.try.func1(0x16d7c00, 0xc420700c80, 0x16d7900, 0xc4203f2140)
	/Users/jono/src/github.com/golang/dep/internal/gps/maybe_source.go:106 +0x71
github.com/golang/dep/internal/gps.(*supervisor).do(0xc42012c070, 0x16d7940, 0xc420070638, 0x14d9a21, 0xc, 0x1, 0xc420ae9910, 0xc42000e098, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:631 +0xd5
github.com/golang/dep/internal/gps.maybeGitSource.try(0xc420a6bb80, 0x16d7940, 0xc420070638, 0xc420145900, 0x13, 0x16daa60, 0xc4205b8080, 0xc42012c070, 0x0, 0x0, ...)
	/Users/jono/src/github.com/golang/dep/internal/gps/maybe_source.go:110 +0x212
github.com/golang/dep/internal/gps.maybeSources.try(0xc4205b8040, 0x4, 0x4, 0x16d7940, 0xc420070638, 0xc420145900, 0x13, 0x16daa60, 0xc4205b8080, 0xc42012c070, ...)
	/Users/jono/src/github.com/golang/dep/internal/gps/maybe_source.go:35 +0xf1
github.com/golang/dep/internal/gps.(*maybeSources).try(0xc4202f3a80, 0x16d7940, 0xc420070638, 0xc420145900, 0x13, 0x16daa60, 0xc4205b8080, 0xc42012c070, 0x105c834, 0xc42051fba8, ...)
	<autogenerated>:216 +0xc7
github.com/golang/dep/internal/gps.(*sourceGateway).require(0xc420471ec0, 0x16d7940, 0xc420070638, 0x1, 0x40, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source.go:489 +0x243
github.com/golang/dep/internal/gps.(*sourceGateway).sourceURL(0xc420471ec0, 0x16d7940, 0xc420070638, 0x0, 0x0, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source.go:457 +0xbc
github.com/golang/dep/internal/gps.(*sourceCoordinator).getSourceGatewayFor(0xc4204701e0, 0x16d7940, 0xc420070638, 0xc420203ba0, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source.go:156 +0xcc3
github.com/golang/dep/internal/gps.(*SourceMgr).SyncSourceFor(0xc4204702a0, 0xc420203ba0, 0x1c, 0x0, 0x0, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:475 +0x8b
github.com/golang/dep/internal/gps.(*bridge).breakLock.func1(0xc4202f76b0, 0xc420203ba0, 0x1c, 0x0, 0x0, 0x16d9fe0, 0xc420220d40)
	/Users/jono/src/github.com/golang/dep/internal/gps/bridge.go:207 +0x68
created by github.com/golang/dep/internal/gps.(*bridge).breakLock
	/Users/jono/src/github.com/golang/dep/internal/gps/bridge.go:211 +0x240

goroutine 495 [chan receive, 87 minutes]:
os/exec.(*Cmd).Wait(0xc4206cd1e0, 0x0, 0x1055dc1)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:443 +0x118
github.com/golang/dep/internal/gps.(*monitoredCmd).run.func1(0xc420b31920, 0xc420534960, 0xc420230c88)
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:80 +0x2e
created by github.com/golang/dep/internal/gps.(*monitoredCmd).run
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:82 +0x14e

goroutine 417 [chan receive, 87 minutes]:
os/exec.(*Cmd).Wait(0xc42069c160, 0x0, 0x1055dc1)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:443 +0x118
github.com/golang/dep/internal/gps.(*monitoredCmd).run.func1(0xc42006f320, 0xc42079a8e0, 0xc420244f48)
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:80 +0x2e
created by github.com/golang/dep/internal/gps.(*monitoredCmd).run
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:82 +0x14e

goroutine 151 [chan receive, 87 minutes]:
github.com/golang/dep/internal/gps.(*monitoredCmd).run(0xc420534960, 0x16d7c00, 0xc4207a43c0, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:118 +0x339
github.com/golang/dep/internal/gps.(*monitoredCmd).combinedOutput(0xc420534960, 0x16d7c00, 0xc4207a43c0, 0xc420c25800, 0x1a, 0x30, 0xc420c25800, 0x1a)
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:130 +0x6b
github.com/golang/dep/internal/gps.(*gitSource).listVersions(0xc420373020, 0x16d7c00, 0xc4207a43c0, 0x1010fe8, 0x10, 0x1471ea0, 0xc420b2f701, 0xc420373030)
	/Users/jono/src/github.com/golang/dep/internal/gps/vcs_source.go:167 +0x358
github.com/golang/dep/internal/gps.maybeGitSource.try.func1(0x16d7c00, 0xc4207a43c0, 0x16d7900, 0xc4203f2140)
	/Users/jono/src/github.com/golang/dep/internal/gps/maybe_source.go:106 +0x71
github.com/golang/dep/internal/gps.(*supervisor).do(0xc42012c070, 0x16d7940, 0xc420070638, 0x14d9a21, 0xc, 0x1, 0xc420b2f910, 0xc42008a568, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:631 +0xd5
github.com/golang/dep/internal/gps.maybeGitSource.try(0xc420b13300, 0x16d7940, 0xc420070638, 0xc420145900, 0x13, 0x16daa60, 0xc420b32100, 0xc42012c070, 0x0, 0x0, ...)
	/Users/jono/src/github.com/golang/dep/internal/gps/maybe_source.go:110 +0x212
github.com/golang/dep/internal/gps.maybeSources.try(0xc420b320c0, 0x4, 0x4, 0x16d7940, 0xc420070638, 0xc420145900, 0x13, 0x16daa60, 0xc420b32100, 0xc42012c070, ...)
	/Users/jono/src/github.com/golang/dep/internal/gps/maybe_source.go:35 +0xf1
github.com/golang/dep/internal/gps.(*maybeSources).try(0xc42036ab20, 0x16d7940, 0xc420070638, 0xc420145900, 0x13, 0x16daa60, 0xc420b32100, 0xc42012c070, 0x105c834, 0xc420a22ba8, ...)
	<autogenerated>:216 +0xc7
github.com/golang/dep/internal/gps.(*sourceGateway).require(0xc42006eba0, 0x16d7940, 0xc420070638, 0x1, 0x40, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source.go:489 +0x243
github.com/golang/dep/internal/gps.(*sourceGateway).sourceURL(0xc42006eba0, 0x16d7940, 0xc420070638, 0x0, 0x0, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source.go:457 +0xbc
github.com/golang/dep/internal/gps.(*sourceCoordinator).getSourceGatewayFor(0xc4204701e0, 0x16d7940, 0xc420070638, 0xc42034c580, 0x1d, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source.go:156 +0xcc3
github.com/golang/dep/internal/gps.(*SourceMgr).SyncSourceFor(0xc4204702a0, 0xc42034c580, 0x1d, 0x0, 0x0, 0x0, 0x0)
	/Users/jono/src/github.com/golang/dep/internal/gps/source_manager.go:475 +0x8b
github.com/golang/dep/internal/gps.(*bridge).breakLock.func1(0xc4202f76b0, 0xc42034c580, 0x1d, 0x0, 0x0, 0x16da160, 0xc420202d00)
	/Users/jono/src/github.com/golang/dep/internal/gps/bridge.go:207 +0x68
created by github.com/golang/dep/internal/gps.(*bridge).breakLock
	/Users/jono/src/github.com/golang/dep/internal/gps/bridge.go:211 +0x240

goroutine 514 [chan receive, 87 minutes]:
os/exec.(*Cmd).Wait(0xc42069c2c0, 0x14360e0, 0xc4207120c0)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:443 +0x118
github.com/golang/dep/internal/gps.(*monitoredCmd).run.func1(0xc420716960, 0xc42079af40, 0xc42021b7b8)
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:80 +0x2e
created by github.com/golang/dep/internal/gps.(*monitoredCmd).run
	/Users/jono/src/github.com/golang/dep/internal/gps/cmd.go:82 +0x14e

goroutine 433 [syscall, 87 minutes]:
syscall.Syscall(0x3, 0x49, 0xc420a14000, 0x8000, 0x1, 0x42, 0x1e6ae88)
	/usr/local/Cellar/go/1.8.3/libexec/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0x49, 0xc420a14000, 0x8000, 0x8000, 0x1e6ae88, 0x1b00401, 0x101000000000000)
	/usr/local/Cellar/go/1.8.3/libexec/src/syscall/zsyscall_darwin_amd64.go:973 +0x55
syscall.Read(0x49, 0xc420a14000, 0x8000, 0x8000, 0x1b004b0, 0x0, 0x14f2b01)
	/usr/local/Cellar/go/1.8.3/libexec/src/syscall/syscall_unix.go:162 +0x49
os.(*File).read(0xc42000e0f8, 0xc420a14000, 0x8000, 0x8000, 0x143a4a0, 0xc420a69601, 0xc420a14000)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/file_unix.go:165 +0x6a
os.(*File).Read(0xc42000e0f8, 0xc420a14000, 0x8000, 0x8000, 0x8000, 0x8000, 0xc4207121d8)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/file.go:101 +0x76
io.copyBuffer(0x16d0fc0, 0xc4202d0b70, 0x16d1dc0, 0xc42000e0f8, 0xc420a14000, 0x8000, 0x8000, 0xc4205fb180, 0x1, 0x1)
	/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:390 +0x100
io.Copy(0x16d0fc0, 0xc4202d0b70, 0x16d1dc0, 0xc42000e0f8, 0xc420712180, 0xc420a697a8, 0xc4205fb101)
	/usr/local/Cellar/go/1.8.3/libexec/src/io/io.go:360 +0x68
os/exec.(*Cmd).writerDescriptor.func1(0xc420712180, 0xc420a697a8)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:254 +0x4d
os/exec.(*Cmd).Start.func1(0xc42069c2c0, 0xc42079b120)
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:371 +0x27
created by os/exec.(*Cmd).Start
	/usr/local/Cellar/go/1.8.3/libexec/src/os/exec/exec.go:372 +0x4e4

rax    0xe
rbx    0x1707960
rcx    0x7fff5fbff850
rdx    0x7fff5fbff8d8
rdi    0x1303
rsi    0x1
rbp    0x7fff5fbff888
rsp    0x7fff5fbff850
r8     0x2
r9     0x2
r10    0xc4202347c0
r11    0x286
r12    0xc420b31f20
r13    0x0
r14    0xc420b31ec0
r15    0x0
rip    0x10571bb
rflags 0x286
cs     0x7
fs     0x0
gs     0x0

What did you expect to see?

I expected it to update the cloud.google.com/go package.

What did you see instead?

The command hung for a good hour before I did a SIGQUIT to dump the stack

I have tried to update this library a number of times now. It really isn't happy about it and hanging is the most extreme example.

Other issues I have seen trying to update cloud.google.com/go:

$ dep ensure -update cloud.google.com/go
ensure Solve(): No versions of github.com/bradfitz/slice met constraints:
	master: unable to deduce repository and source type for "go4.org": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://go4.org?go-get=1": Get http://go4.org?go-get=1: dial tcp: lookup go4.org: no such host
	master: unable to deduce repository and source type for "go4.org": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://go4.org?go-get=1": Get http://go4.org?go-get=1: dial tcp: lookup go4.org: no such host

Then running it again straight after:

$ dep ensure -update cloud.google.com/go
ensure Solve(): No versions of github.com/bradfitz/slice met constraints:
	master: Could not introduce github.com/bradfitz/slice@master, as its subpackage github.com/bradfitz/slice does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	master: Could not introduce github.com/bradfitz/slice@master, as its subpackage github.com/bradfitz/slice does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)

After this the $GOPATH/pkg/dep/ is in a bad state. Many directories have all of the go files deleted. For example:

$ cd $GOPATH/pkg/dep/sources/https---git.luolix.top-alexcesaro-statsd
$ ls
$ git status
HEAD detached at 7fea3f0
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	deleted:    .travis.yml
	deleted:    CHANGELOG.md
	deleted:    LICENSE
	deleted:    README.md
	deleted:    conn.go
	deleted:    doc.go
	deleted:    examples_test.go
	deleted:    options.go
	deleted:    statsd.go
	deleted:    statsd_test.go

no changes added to commit (use "git add" and/or "git commit -a")

These deletes have happened to loads of files in the dep folder.

To me, this smells like a network issue with some bad network error handling in dep. The trouble is I don't think I have a bad network connection. All other network operations I do appear to be fine. I am not sure why http://go4.org?go-get=1 seems unhappy with me.

After deleting the $GOPATH/pkg/dep folder and trying again:

$ dep ensure
$ dep ensure -v -update cloud.google.com/go 
Root project is "github.com/[removed]/core"
 441 transitively valid internal packages
 95 external packages imported from 71 projects
(0)   ✓ select (root)
(1)	? attempt cloud.google.com/go with 4 pkgs; 15 versions to try
(1)	    try cloud.google.com/go@v0.11.0
(1)	✓ select cloud.google.com/go@v0.11.0 w/13 pkgs
(2)	? attempt github.com/TomiHiltunen/geohash-golang with 1 pkgs; at least 1 versions to try
(2)	    try github.com/TomiHiltunen/geohash-golang@master
(2)	✓ select github.com/TomiHiltunen/geohash-golang@master w/1 pkgs
(3)	? attempt github.com/DataDog/datadog-go with 1 pkgs; at least 1 versions to try
(3)	    try github.com/DataDog/datadog-go@94b37b603fe4425010c27ee250fed81a00ae583b
(3)	✓ select github.com/DataDog/datadog-go@94b37b603fe4425010c27ee250fed81a00ae583b w/1 pkgs
(4)	? attempt github.com/alexcesaro/statsd with 1 pkgs; at least 1 versions to try
(4)	    try github.com/alexcesaro/statsd@v2.0.0
(4)	✓ select github.com/alexcesaro/statsd@v2.0.0 w/1 pkgs
(5)	? attempt github.com/avct/uasurfer with 1 pkgs; at least 1 versions to try
(5)	    try github.com/avct/uasurfer@a27c4e4249e7361e683e87b125f113215f705023
(5)	✓ select github.com/avct/uasurfer@a27c4e4249e7361e683e87b125f113215f705023 w/1 pkgs
(6)	? attempt github.com/bitly/go-nsq with 1 pkgs; at least 1 versions to try
(6)	    try github.com/bitly/go-nsq@v1.0.6
(6)	✓ select github.com/bitly/go-nsq@v1.0.6 w/1 pkgs
(7)	? attempt github.com/ant0ine/go-json-rest with 2 pkgs; at least 1 versions to try
(7)	    try github.com/ant0ine/go-json-rest@3a807d6d8d36e0f9175d6c292030fce09bcbb2db
(7)	✓ select github.com/ant0ine/go-json-rest@3a807d6d8d36e0f9175d6c292030fce09bcbb2db w/3 pkgs
(8)	? attempt github.com/ctessum/macreader with 1 pkgs; at least 1 versions to try
(8)	    try github.com/ctessum/macreader@master
(8)	✓ select github.com/ctessum/macreader@master w/1 pkgs
(9)	? attempt github.com/bitly/go-hostpool with 1 pkgs; at least 1 versions to try
(9)	    try github.com/bitly/go-hostpool@d0e59c22a56e8dadfed24f74f452cea5a52722d2
(9)	✓ select github.com/bitly/go-hostpool@d0e59c22a56e8dadfed24f74f452cea5a52722d2 w/1 pkgs
(10)  ? attempt github.com/golang/protobuf with 5 pkgs; at least 1 versions to try
(10)      try github.com/golang/protobuf@8ee79997227bf9b34611aee7946ae64735e6fd93
(10)  ✓ select github.com/golang/protobuf@8ee79997227bf9b34611aee7946ae64735e6fd93 w/6 pkgs
(11)  ? attempt github.com/davegardnerisme/phonegeocode with 1 pkgs; at least 1 versions to try
(11)      try github.com/davegardnerisme/phonegeocode@master
(11)  ✓ select github.com/davegardnerisme/phonegeocode@master w/1 pkgs
(12)  ? attempt github.com/google/go-cmp with 2 pkgs; at least 1 versions to try
(12)      try github.com/google/go-cmp@v0.1.0
(12)  ✓ select github.com/google/go-cmp@v0.1.0 w/5 pkgs
(13)  ? attempt github.com/emirpasic/gods with 1 pkgs; at least 1 versions to try
(13)      try github.com/emirpasic/gods@v1.9.0
(13)  ✓ select github.com/emirpasic/gods@v1.9.0 w/4 pkgs
(14)  ? attempt github.com/bmizerany/assert with 1 pkgs; at least 1 versions to try
(14)      try github.com/bmizerany/assert@master
(14)  ✓ select github.com/bmizerany/assert@master w/1 pkgs
(15)  ? attempt github.com/bluele/slack with 1 pkgs; at least 1 versions to try
(15)      try github.com/bluele/slack@3b1fffcc45b37a2644a23eb7dc434d4d9f0987ba
(15)  ✓ select github.com/bluele/slack@3b1fffcc45b37a2644a23eb7dc434d4d9f0987ba w/1 pkgs
(16)  ? attempt github.com/hashicorp/errwrap with 1 pkgs; at least 1 versions to try
(16)      try github.com/hashicorp/errwrap@master
(16)  ✓ select github.com/hashicorp/errwrap@master w/1 pkgs
(17)  ? attempt github.com/extrame/xls with 1 pkgs; at least 1 versions to try
(17)      try github.com/extrame/xls@da346a5ffb8b5f1eaa464c02703b9f5b557e02cb
(17)  ✓ select github.com/extrame/xls@da346a5ffb8b5f1eaa464c02703b9f5b557e02cb w/1 pkgs
(18)  ? attempt github.com/extrame/ole2 with 1 pkgs; at least 1 versions to try
(18)      try github.com/extrame/ole2@ebc59eca74fc183a8f177127cee1cdf6b87dafce
(18)  ✓ select github.com/extrame/ole2@ebc59eca74fc183a8f177127cee1cdf6b87dafce w/1 pkgs
(19)  ? attempt github.com/jacobstr/confer with 1 pkgs; at least 1 versions to try
(19)      try github.com/jacobstr/confer@0.1.0-7-g9a227d3
(20)  ✗   github.com/jacobstr/confer at 0.1.0-7-g9a227d3 has problem subpkg(s):
(20)    	github.com/jacobstr/confer has err (*build.NoGoError); required by (root).
(19)      try github.com/jacobstr/confer@0.1.0
(20)  ✗   github.com/jacobstr/confer@0.1.0 not allowed by constraint 0.1.0-7-g9a227d3:
(20)      0.1.0-7-g9a227d3 from (root)
(19)      try github.com/jacobstr/confer@master
(20)  ✗   github.com/jacobstr/confer@master not allowed by constraint 0.1.0-7-g9a227d3:
(20)      0.1.0-7-g9a227d3 from (root)
(19)      try github.com/jacobstr/confer@allsettings-leaves
(20)  ✗   github.com/jacobstr/confer@allsettings-leaves not allowed by constraint 0.1.0-7-g9a227d3:
(20)      0.1.0-7-g9a227d3 from (root)
(19)      try github.com/jacobstr/confer@deep_access
(20)  ✗   github.com/jacobstr/confer@deep_access not allowed by constraint 0.1.0-7-g9a227d3:
(20)      0.1.0-7-g9a227d3 from (root)
(19)      try github.com/jacobstr/confer@helpers
(20)  ✗   github.com/jacobstr/confer@helpers not allowed by constraint 0.1.0-7-g9a227d3:
(20)      0.1.0-7-g9a227d3 from (root)
(19)      try github.com/jacobstr/confer@merge-assertions
(20)  ✗   github.com/jacobstr/confer@merge-assertions not allowed by constraint 0.1.0-7-g9a227d3:
(20)      0.1.0-7-g9a227d3 from (root)
(19)      try github.com/jacobstr/confer@overhaul
(20)  ✗   github.com/jacobstr/confer@overhaul not allowed by constraint 0.1.0-7-g9a227d3:
(20)      0.1.0-7-g9a227d3 from (root)
(19)    ← no more versions of github.com/jacobstr/confer to try; begin backtrack
(18)  ← backtrack: no more versions of github.com/extrame/ole2 to try
(17)  ← backtrack: no more versions of github.com/extrame/xls to try
(16)  ← backtrack: no more versions of github.com/hashicorp/errwrap to try
(15)  ← backtrack: no more versions of github.com/bluele/slack to try
(14)  ← backtrack: no more versions of github.com/bmizerany/assert to try
(13)  ← backtrack: no more versions of github.com/emirpasic/gods to try
(12)  ← backtrack: no more versions of github.com/google/go-cmp to try
(11)  ← backtrack: no more versions of github.com/davegardnerisme/phonegeocode to try
(10)  ← backtrack: no more versions of github.com/golang/protobuf to try
(9)	← backtrack: no more versions of github.com/bitly/go-hostpool to try
(8)	← backtrack: no more versions of github.com/ctessum/macreader to try
(7)	← backtrack: no more versions of github.com/ant0ine/go-json-rest to try
(6)	← backtrack: no more versions of github.com/bitly/go-nsq to try
(5)	← backtrack: no more versions of github.com/avct/uasurfer to try
(4)	← backtrack: no more versions of github.com/alexcesaro/statsd to try
(3)	← backtrack: no more versions of github.com/DataDog/datadog-go to try
(2)	← backtrack: no more versions of github.com/TomiHiltunen/geohash-golang to try
(1)	← backtrack: no more versions of cloud.google.com/go to try
  ✗ solving failed

Solver wall times by segment:
     b-list-versions: 26.260252562s
         b-list-pkgs:  12.24513357s
              b-gmal: 11.170462093s
     b-source-exists: 10.283322524s
  b-deduce-proj-root:  1.008334384s
         select-root:  165.740336ms
             satisfy:    9.910892ms
         select-atom:    8.374537ms
            unselect:     6.17791ms
            new-atom:    2.161259ms
           backtrack:     237.802µs
          b-pair-rev:      86.114µs
               other:      42.168µs
           b-matches:      29.414µs

  TOTAL: 1m1.160265565s

ensure Solve(): No versions of github.com/jacobstr/confer met constraints:
	0.1.0-7-g9a227d3: Could not introduce github.com/jacobstr/confer@0.1.0-7-g9a227d3, as its subpackage github.com/jacobstr/confer does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
	0.1.0: Could not introduce github.com/jacobstr/confer@0.1.0, as it is not allowed by constraint 0.1.0-7-g9a227d3 from project github.com/[removed]/core.
	master: Could not introduce github.com/jacobstr/confer@master, as it is not allowed by constraint 0.1.0-7-g9a227d3 from project github.com/[removed]/core.
	allsettings-leaves: Could not introduce github.com/jacobstr/confer@allsettings-leaves, as it is not allowed by constraint 0.1.0-7-g9a227d3 from project github.com/[removed]/core.
	deep_access: Could not introduce github.com/jacobstr/confer@deep_access, as it is not allowed by constraint 0.1.0-7-g9a227d3 from project github.com/[removed]/core.
	helpers: Could not introduce github.com/jacobstr/confer@helpers, as it is not allowed by constraint 0.1.0-7-g9a227d3 from project github.com/[removed]/core.
	merge-assertions: Could not introduce github.com/jacobstr/confer@merge-assertions, as it is not allowed by constraint 0.1.0-7-g9a227d3 from project github.com/[removed]/core.
	overhaul: Could not introduce github.com/jacobstr/confer@overhaul, as it is not allowed by constraint 0.1.0-7-g9a227d3 from project github.com/[removed]/core.

And finally running it again gives the no host found error (Sorry for wall of text, I want to give you as much detail as possible):

$ dep ensure -v -update cloud.google.com/go 
Root project is "github.com/[removed]/core"
 441 transitively valid internal packages
 95 external packages imported from 71 projects
(0)   ✓ select (root)
(1)	? attempt cloud.google.com/go with 4 pkgs; 15 versions to try
(1)	    try cloud.google.com/go@v0.11.0
(1)	✓ select cloud.google.com/go@v0.11.0 w/13 pkgs
(2)	? attempt github.com/DataDog/datadog-go with 1 pkgs; at least 1 versions to try
(2)	    try github.com/DataDog/datadog-go@94b37b603fe4425010c27ee250fed81a00ae583b
(2)	✓ select github.com/DataDog/datadog-go@94b37b603fe4425010c27ee250fed81a00ae583b w/1 pkgs
(3)	? attempt github.com/TomiHiltunen/geohash-golang with 1 pkgs; at least 1 versions to try
(3)	    try github.com/TomiHiltunen/geohash-golang@master
(3)	✓ select github.com/TomiHiltunen/geohash-golang@master w/1 pkgs
(4)	? attempt github.com/avct/uasurfer with 1 pkgs; at least 1 versions to try
(4)	    try github.com/avct/uasurfer@a27c4e4249e7361e683e87b125f113215f705023
(4)	✓ select github.com/avct/uasurfer@a27c4e4249e7361e683e87b125f113215f705023 w/1 pkgs
(5)	? attempt github.com/bmizerany/assert with 1 pkgs; at least 1 versions to try
(5)	    try github.com/bmizerany/assert@master
(5)	✓ select github.com/bmizerany/assert@master w/1 pkgs
(6)	? attempt github.com/ant0ine/go-json-rest with 2 pkgs; at least 1 versions to try
(6)	    try github.com/ant0ine/go-json-rest@3a807d6d8d36e0f9175d6c292030fce09bcbb2db
(7)	✗   github.com/ant0ine/go-json-rest at 3a807d6d8d36e0f9175d6c292030fce09bcbb2db has problem subpkg(s):
(7)	  	github.com/ant0ine/go-json-rest/rest has err (*build.NoGoError); required by (root).
(6)	    try github.com/ant0ine/go-json-rest@v3.3.2
(6)	✓ select github.com/ant0ine/go-json-rest@v3.3.2 w/2 pkgs
(7)	? attempt github.com/alexcesaro/statsd with 1 pkgs; at least 1 versions to try
(7)	    try github.com/alexcesaro/statsd@v2.0.0
(7)	✓ select github.com/alexcesaro/statsd@v2.0.0 w/1 pkgs
(8)	? attempt github.com/bitly/go-hostpool with 1 pkgs; at least 1 versions to try
(8)	    try github.com/bitly/go-hostpool@d0e59c22a56e8dadfed24f74f452cea5a52722d2
(8)	✓ select github.com/bitly/go-hostpool@d0e59c22a56e8dadfed24f74f452cea5a52722d2 w/1 pkgs
(9)	? attempt github.com/ctessum/macreader with 1 pkgs; at least 1 versions to try
(9)	    try github.com/ctessum/macreader@master
(9)	✓ select github.com/ctessum/macreader@master w/1 pkgs
(10)  ? attempt github.com/bradfitz/slice with 1 pkgs; at least 1 versions to try
(10)      try github.com/bradfitz/slice@master
(10)  ✗   unable to deduce repository and source type for "go4.org": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://go4.org?go-get=1": Get http://go4.org?go-get=1: dial tcp: lookup go4.org: no such host
(10)      try github.com/bradfitz/slice@master
(10)  ✗   unable to deduce repository and source type for "go4.org": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://go4.org?go-get=1": Get http://go4.org?go-get=1: dial tcp: lookup go4.org: no such host
(10)    ← no more versions of github.com/bradfitz/slice to try; begin backtrack
(9)	← backtrack: no more versions of github.com/ctessum/macreader to try
(8)	← backtrack: no more versions of github.com/bitly/go-hostpool to try
(7)	← backtrack: no more versions of github.com/alexcesaro/statsd to try
(6)	← backtrack: no more versions of github.com/ant0ine/go-json-rest to try
(5)	← backtrack: no more versions of github.com/bmizerany/assert to try
(4)	← backtrack: no more versions of github.com/avct/uasurfer to try
(3)	← backtrack: no more versions of github.com/TomiHiltunen/geohash-golang to try
(2)	← backtrack: no more versions of github.com/DataDog/datadog-go to try
(1)	← backtrack: no more versions of cloud.google.com/go to try
  ✗ solving failed

Solver wall times by segment:
     b-list-versions: 12.930784495s
         b-list-pkgs:  6.864671742s
              b-gmal:  3.813989062s
     b-source-exists:  2.641914002s
  b-deduce-proj-root:  1.018874311s
         select-root:   68.703408ms
             satisfy:    5.048794ms
            new-atom:     3.49103ms
         select-atom:    3.313766ms
            unselect:    2.194438ms
           backtrack:      92.852µs
               other:      16.248µs

  TOTAL: 27.353094148s

ensure Solve(): No versions of github.com/bradfitz/slice met constraints:
	master: unable to deduce repository and source type for "go4.org": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://go4.org?go-get=1": Get http://go4.org?go-get=1: dial tcp: lookup go4.org: no such host
	master: unable to deduce repository and source type for "go4.org": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://go4.org?go-get=1": Get http://go4.org?go-get=1: dial tcp: lookup go4.org: no such host

It seems to oscillate between a network error and no buildable go code while it fully hung one time. I still don't know how to update my package. Any help would be appreciated.

Thanks!

@jonomacd
Copy link
Author

I think this might be hitting a file handle limit on mac os. We have a fairly large project (one repo for many services) which means we have a large number of dependancies. I ran:

ulimit -n 1000

And reran the update. It has now worked correctly.

It seems the main issue here is the error message which does not point you at a file handle issue so it is challenging to know what is going wrong. I would argue that this is also not great for users to have to up their file handle limit. I don't know what the code is doing such that it needs so many file handles but perhaps doing a bit less in parallel is in order.

@jonomacd jonomacd changed the title Error updating cloud.google.com/go. Hangs or deletes files out of pkg/dep UPDATE: Found Issue. Ran out of file handlers. Error message should reflect this. Aug 25, 2017
@sdboyer sdboyer changed the title UPDATE: Found Issue. Ran out of file handlers. Error message should reflect this. Exceeded available file handles on OSX. Error message should reflect this. Aug 26, 2017
@sdboyer
Copy link
Member

sdboyer commented Aug 27, 2017

hi, welcome! thanks for the issue.

yeah, OSX has a really, ridiculously low default limit on open file handles per process (256). by far the easiest solution here is cranking that up.

i suspect it would be prohibitively difficult for us to check on the ulimit being the problematic condition at the moment that an error occurs. however, it might be feasible for us to sniff the final error when dep is exiting, and if it seems like it might be ulimit related, check that value and report that the user might want to increase it.

maybe. i've no idea what interacting with ulimits from code looks like 😄

@jonomacd
Copy link
Author

It took me quite some time to diagnose and caused much frustration. The kind of frustration that puts people off and gives a bad impression. Now that I know the issue though, I'm fine with it. If it had said it was a file handle problem, I would have just upped it an been done with it. I say it would be a very good idea to try to detect this error as lots of organisations have large projects these days.

Better yet, if you can increase the file limits for your process (not sure if you can do that) such that this won't happen at all, that would be the best solution.

@sdboyer
Copy link
Member

sdboyer commented Aug 30, 2017

i looked around a bit on this, and found that it seems there isn't even a non-portable call that we can rely on to dynamically determine the maximum number of open file handles from within a running process. For Linux, we could sniff /proc, but the APIs for doing this vary wildly from platform to platform. it seems like it'd be a losing battle to try to do anything dynamic.

instead, i think we should take this as an indication that we need to institute some coarse-grained controls over the amount of concurrent behavior we allow the system to trigger in general. right now, when we trigger concurrent activity, we tend to just do it without - we'll happily kick off a goroutine for everything that we see as needing doing, and just wait until they all finish, ultimately leaving it up to the OS to decide how access to disk and network resources are meted out.

rather than refactor those invocation points (which would make things a lot more complicated in a lot of places), we should grab central points of control and impose limits on the amount of concurrency (basically, goroutines) that we allow. there might be a few outliers, but i think there's really one central point of control we can use for all of this, and in doing so probably take care of most of the problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants