Liru/tumblr-downloader

Error on HighSierra

Opened this issue · 1 comments

geins commented

Running 1.5.3-debug, precompiled version from GitHub/tumblr-downloader-darwin-amd64.zip.
On MacOS HighSierra 10.13, I get following error. Same Version did it's job on ElCapitan.

Thank You!

panic: sync: inconsistent mutex state

goroutine 25 [running]:
sync.(*Mutex).Lock(0xc82008c000)
	/usr/lib/go/src/sync/mutex.go:74 +0x16d
math/rand.(*lockedSource).Int63(0xc82008c000, 0x0)
	/usr/lib/go/src/math/rand/rand.go:239 +0x28
math/rand.(*Rand).Int63(0xc82005e3c0, 0x6cea5)
	/usr/lib/go/src/math/rand/rand.go:46 +0x39
math/rand.(*Rand).Int(0xc82005e3c0, 0x0)
	/usr/lib/go/src/math/rand/rand.go:56 +0x21
math/rand.Int(0xc8200ac098)
	/usr/lib/go/src/math/rand/rand.go:183 +0x23
net.exchange(0xc82005ff30, 0xd, 0xc82008cec0, 0x19, 0xc82005001c, 0x12a05f200, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/dnsclient_unix.go:143 +0x3ec
net.tryOneName(0xc82009e480, 0xc82008cec0, 0x19, 0x1c, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/lib/go/src/net/dnsclient_unix.go:176 +0x425
net.goLookupIPOrder.func1(0xc82009e480, 0xc82005faf0, 0xc8200969c0, 0x1c)
	/usr/lib/go/src/net/dnsclient_unix.go:452 +0x59
created by net.goLookupIPOrder
	/usr/lib/go/src/net/dnsclient_unix.go:454 +0x3ba

goroutine 1 [select]:
net/http.(*Transport).getConn(0xc82008e120, 0xc8200d2000, 0x0, 0xc820094900, 0x5, 0xc82008cc60, 0x12, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/http/transport.go:554 +0x663
net/http.(*Transport).RoundTrip(0xc82008e120, 0xc8200d2000, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/http/transport.go:228 +0x4ac
net/http.send(0xc8200d2000, 0x835408, 0xc82008e120, 0xc820094940, 0x0, 0x0)
	/usr/lib/go/src/net/http/client.go:220 +0x52c
net/http.(*Client).send(0x5bb7e0, 0xc8200d2000, 0x3e, 0x0, 0x0)
	/usr/lib/go/src/net/http/client.go:143 +0x15a
net/http.(*Client).doFollowingRedirects(0x5bb7e0, 0xc8200d2000, 0x48d660, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/http/client.go:380 +0xbc0
net/http.(*Client).Get(0x5bb7e0, 0xc820094900, 0x3e, 0xc820065040, 0x0, 0x0)
	/usr/lib/go/src/net/http/client.go:306 +0xaa
net/http.Get(0xc820094900, 0x3e, 0xc82003b9f0, 0x0, 0x0)
	/usr/lib/go/src/net/http/client.go:281 +0x45
main.newUser(0xc82005f7c0, 0xa, 0x0, 0x0, 0x0)
	/home/liru/go/src/github.com/liru/tumblr-downloader/user.go:60 +0x2ef
main.readUserFile(0x0, 0x0, 0x0, 0x0, 0x0)
	/home/liru/go/src/github.com/liru/tumblr-downloader/main.go:84 +0x344
main.getUsersToDownload(0x0, 0x0, 0x0)
	/home/liru/go/src/github.com/liru/tumblr-downloader/main.go:103 +0xb2
main.main()
	/home/liru/go/src/github.com/liru/tumblr-downloader/main.go:156 +0x9e

goroutine 17 [syscall]:
os/signal.loop()
	/usr/lib/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
	/usr/lib/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 18 [runnable]:
syscall.Syscall(0x5, 0xc82011a1e0, 0x1000000, 0x0, 0x7, 0x0, 0x0)
	/usr/lib/go/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.Open(0xc82011a1c0, 0x14, 0x1000000, 0xc800000000, 0x0, 0x0, 0x0)
	/usr/lib/go/src/syscall/zsyscall_darwin_amd64.go:903 +0xa0
os.OpenFile(0xc82011a1c0, 0x14, 0x0, 0x0, 0xc820040c78, 0x0, 0x0)
	/usr/lib/go/src/os/file_unix.go:93 +0x120
os.Open(0xc82011a1c0, 0x14, 0x9, 0x0, 0x0)
	/usr/lib/go/src/os/file.go:246 +0x48
main.GetAllCurrentFiles()
	/home/liru/go/src/github.com/liru/tumblr-downloader/walker.go:152 +0x21a
main.main.func1(0xc8200964e0)
	/home/liru/go/src/github.com/liru/tumblr-downloader/main.go:151 +0xe3
created by main.main
	/home/liru/go/src/github.com/liru/tumblr-downloader/main.go:154 +0x99

goroutine 19 [select]:
net.lookupIPDeadline(0xc82008cc60, 0xe, 0xe7791f71e, 0x0, 0x5bb940, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/lookup.go:109 +0x6a5
net.internetAddrList(0x3ee928, 0x3, 0xc82008cc60, 0x12, 0xe7791f71e, 0x0, 0x5bb940, 0x0, 0x0, 0x0, ...)
	/usr/lib/go/src/net/ipsock.go:252 +0x6ee
net.resolveAddrList(0x3ecb18, 0x4, 0x3ee928, 0x3, 0xc82008cc60, 0x12, 0xe7791f71e, 0x0, 0x5bb940, 0x0, ...)
	/usr/lib/go/src/net/dial.go:153 +0x466
net.(*Dialer).Dial(0xc8200603c0, 0x3ee928, 0x3, 0xc82008cc60, 0x12, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/dial.go:209 +0x124
net.(*Dialer).Dial-fm(0x3ee928, 0x3, 0xc82008cc60, 0x12, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/http/transport.go:38 +0x6e
net/http.(*Transport).dial(0xc82008e120, 0x3ee928, 0x3, 0xc82008cc60, 0x12, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/http/transport.go:499 +0x79
net/http.(*Transport).dialConn(0xc82008e120, 0x0, 0xc820094900, 0x5, 0xc82008cc60, 0x12, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/http/transport.go:596 +0x19a9
net/http.(*Transport).getConn.func4(0xc82008e120, 0x0, 0xc820094900, 0x5, 0xc82008cc60, 0x12, 0xc820096600)
	/usr/lib/go/src/net/http/transport.go:549 +0x66
created by net/http.(*Transport).getConn
	/usr/lib/go/src/net/http/transport.go:551 +0x265

goroutine 21 [chan receive]:
net.goLookupIPOrder(0xc82008cc60, 0xe, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/dnsclient_unix.go:457 +0x444
net.lookupIP(0xc82008cc60, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/lookup_unix.go:73 +0x153
net.glob.func15(0x48d588, 0xc82008cc60, 0xe, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/hook.go:10 +0x4d
net.lookupIPDeadline.func1(0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/lookup.go:106 +0x71
internal/singleflight.(*Group).doCall(0x5baf60, 0xc8200606e0, 0xc82008cc60, 0xe, 0xc82008ccc0)
	/usr/lib/go/src/internal/singleflight/singleflight.go:93 +0x2c
created by internal/singleflight.(*Group).DoChan
	/usr/lib/go/src/internal/singleflight/singleflight.go:86 +0x3ed

goroutine 24 [runnable]:
syscall.Getsockname(0x6, 0x0, 0x0, 0x835a00, 0xc820136020)
	/usr/lib/go/src/syscall/syscall_bsd.go:296
net.(*netFD).dial(0xc820144000, 0x8359b8, 0x0, 0x8359b8, 0xc820138000, 0xe7791f717, 0x759d600, 0x5bb940, 0x0, 0x0)
	/usr/lib/go/src/net/sock_posix.go:146 +0x3b1
net.socket(0x3eeac0, 0x3, 0x2, 0x2, 0x0, 0xc820138000, 0x8359b8, 0x0, 0x8359b8, 0xc820138000, ...)
	/usr/lib/go/src/net/sock_posix.go:89 +0x411
net.internetSocket(0x3eeac0, 0x3, 0x8359b8, 0x0, 0x8359b8, 0xc820138000, 0xe7791f717, 0xc80759d600, 0x5bb940, 0x2, ...)
	/usr/lib/go/src/net/ipsock_posix.go:160 +0x141
net.dialUDP(0x3eeac0, 0x3, 0x0, 0xc820138000, 0xe7791f717, 0xc80759d600, 0x5bb940, 0xc820132020, 0x0, 0x0)
	/usr/lib/go/src/net/udpsock_posix.go:192 +0x11b
net.dialSingle(0xc820134080, 0x835928, 0xc820138000, 0xe7791f717, 0x759d600, 0x5bb940, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/dial.go:367 +0x815
net.dialSerial.func1(0xe7791f717, 0x759d600, 0x5bb940, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/dial.go:336 +0x75
net.dial(0x3eeac0, 0x3, 0x835928, 0xc820138000, 0xc82013f828, 0xe7791f717, 0x759d600, 0x5bb940, 0x0, 0x0, ...)
	/usr/lib/go/src/net/fd_unix.go:40 +0x60
net.dialSerial(0xc820134080, 0xc820132020, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/dial.go:338 +0x760
net.(*Dialer).Dial(0xc82013fcb8, 0x3eeac0, 0x3, 0xc820132000, 0xd, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/dial.go:232 +0x50f
net.(*Dialer).dialDNS(0xc82013fcb8, 0x3eeac0, 0x3, 0xc820132000, 0xd, 0x0, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/dnsclient_unix.go:110 +0x144
net.exchange(0xc820132000, 0xd, 0xc82008cec0, 0x19, 0xc820130001, 0x12a05f200, 0x0, 0x0, 0x0)
	/usr/lib/go/src/net/dnsclient_unix.go:135 +0x25a
net.tryOneName(0xc82009e480, 0xc82008cec0, 0x19, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/usr/lib/go/src/net/dnsclient_unix.go:176 +0x425
net.goLookupIPOrder.func1(0xc82009e480, 0xc82005faf0, 0xc8200969c0, 0x1)
	/usr/lib/go/src/net/dnsclient_unix.go:452 +0x59
created by net.goLookupIPOrder
	/usr/lib/go/src/net/dnsclient_unix.go:454 +0x3ba
Liru commented

I'm partially sure this is because the version of Go that I used to compile the program is relatively old, and doesn't have support for the new internal OSX functions. A recompile with something newer should fix it.

It'll come out with some minor bugfixes when I have time, maybe sometime later this week.