etix/mirrorbits

Crash in ftp scanner

lazka opened this issue · 2 comments

lazka commented

Using c5f884e, I get this regularly.

mirrorbits_1     | panic: time: missing Location in call to Date
mirrorbits_1     | 
mirrorbits_1     | goroutine 86 [running]:
mirrorbits_1     | time.Date(0x7df, 0x9, 0x10, 0x6, 0x26, 0x22, 0x0, 0x0, 0x15, 0x8, ...)
mirrorbits_1     | 	/usr/lib/go-1.13/src/time/time.go:1368 +0x62c
mirrorbits_1     | time.parse(0xb520ec, 0x12, 0xc0004ba004, 0xe, 0x0, 0x0, 0x1, 0xd5, 0xc0004ba004, 0xe, ...)
mirrorbits_1     | 	/usr/lib/go-1.13/src/time/format.go:1184 +0x292f
mirrorbits_1     | time.ParseInLocation(...)
mirrorbits_1     | 	/usr/lib/go-1.13/src/time/format.go:821
mirrorbits_1     | github.com/etix/goftp.(*ServerConn).LastModificationDate(0xc0002b8140, 0xc00053c4c0, 0x3b, 0xc000555ad8, 0x1f, 0xc00053c4c0, 0x3b, 0x0)
mirrorbits_1     | 	/root/go/pkg/mod/github.com/etix/goftp@v0.0.0-20170217140226-0c13163a1028/ftp.go:584 +0x1df
mirrorbits_1     | github.com/etix/mirrorbits/scan.(*FTPScanner).walkFtp(0xc0001ee180, 0xc0002b8140, 0xc000703c20, 0x0, 0x3e8, 0xc000426480, 0x1c, 0xc000264600, 0x1c, 0xc0003b0256, ...)
mirrorbits_1     | 	/mirrorbits/scan/ftp.go:129 +0x53f
mirrorbits_1     | github.com/etix/mirrorbits/scan.(*FTPScanner).walkFtp(0xc0001ee180, 0xc0002b8140, 0xc000703c20, 0x0, 0x3e8, 0xc0003b0240, 0x17, 0xc000264600, 0x17, 0xc00070600e, ...)
mirrorbits_1     | 	/mirrorbits/scan/ftp.go:160 +0x1d9
mirrorbits_1     | github.com/etix/mirrorbits/scan.(*FTPScanner).walkFtp(0xc0001ee180, 0xc0002b8140, 0xc000703c20, 0x0, 0x3e8, 0xc000706000, 0xf, 0xc000264600, 0xc0000b2094, 0x1f, ...)
mirrorbits_1     | 	/mirrorbits/scan/ftp.go:160 +0x1d9
mirrorbits_1     | github.com/etix/mirrorbits/scan.(*FTPScanner).Scan(0xc0001ee180, 0xc0000b2390, 0x22, 0xc00044a010, 0x6, 0xc47360, 0xc0001ee160, 0xc000264600, 0x0, 0x0, ...)
mirrorbits_1     | 	/mirrorbits/scan/ftp.go:97 +0x56c
mirrorbits_1     | github.com/etix/mirrorbits/scan.Scan(0xc34b01, 0xc000023080, 0xc0000c6a50, 0xc0000b2390, 0x22, 0x47, 0xc000264600, 0x0, 0x0, 0x0)
mirrorbits_1     | 	/mirrorbits/scan/scan.go:140 +0x810
mirrorbits_1     | github.com/etix/mirrorbits/daemon.(*monitor).syncLoop(0xc000346000)
mirrorbits_1     | 	/mirrorbits/daemon/monitor.go:453 +0x808
mirrorbits_1     | created by github.com/etix/mirrorbits/daemon.(*monitor).MonitorLoop
mirrorbits_1     | 	/mirrorbits/daemon/monitor.go:215 +0x29f
msys2-repo_mirrorbits_1 exited with code 2

Howdy,

This reply helped me a lot https://stackoverflow.com/a/62159987/12444153

I simply added tzdata and it's fixed. (I did not try on Debian, but guess it's the same as with Alpine)

ott commented

This appears to be an issue in the Go implementation that was used and did expect tzdata to be present.

@lazka Can you close this issue?