gtfierro / giles

Golang implementation of sMAP archiver
GNU General Public License v3.0
8 stars 2 forks source link

Miscellaneous crashes #38

Closed gtfierro closed 9 years ago

gtfierro commented 9 years ago
2015/04/13 17:14:07 http: panic serving [2001:470:4956:1:358e:d654:6a9e:b23c]:59759: interface conversion: interface is nil, not string
goroutine 102083 [running]:
net/http.func·011()
/usr/local/go/src/net/http/server.go:1130 +0xbb
github.com/gtfierro/giles/archiver.(*MongoStore).GetUnitOfTime(0xc208042180, 0xc208130f90, 0x24, 0x24)
/home/gabe/go/src/github.com/gtfierro/giles/archiver/mongo_metadata.go:292 +0x4a5
github.com/gtfierro/giles/archiver.(*Coalescer).GetStreamBuf(0xc20801e6e0, 0xc208130f90, 0x24, 0x0)
/home/gabe/go/src/github.com/gtfierro/giles/archiver/coalesce.go:56 +0x13e
github.com/gtfierro/giles/archiver.(*Coalescer).Add(0xc20801e6e0, 0xc208125b90)
/home/gabe/go/src/github.com/gtfierro/giles/archiver/coalesce.go:72 +0x102
github.com/gtfierro/giles/archiver.(*Archiver).AddData(0xc2080363c0, 0xc208130e10, 0xc208178dea, 0x3, 0x0, 0x0)
/home/gabe/go/src/github.com/gtfierro/giles/archiver/archiver.go:201 +0x67d
github.com/gtfierro/giles/httphandler.AddReadingHandler(0xc2080363c0, 0x7fd39462aad8, 0xc20805d360, 0xc208175520, 0xc208178e40, 0x1, 0x1)
/home/gabe/go/src/github.com/gtfierro/giles/httphandler/handlers.go:97 +0x2ce
github.com/gtfierro/giles/httphandler.func·001(0x7fd39462aad8, 0xc20805d360, 0xc208175520, 0xc208178e40, 0x1, 0x1)
/home/gabe/go/src/github.com/gtfierro/giles/httphandler/handlers.go:56 +0x6d
github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc20801e740, 0x7fd39462aad8, 0xc20805d360, 0xc208175520)
/home/gabe/go/src/github.com/julienschmidt/httprouter/router.go:281 +0x188
net/http.(*ServeMux).ServeHTTP(0xc208038750, 0x7fd39462aad8, 0xc20805d360, 0xc208175520)
/usr/local/go/src/net/http/server.go:1541 +0x17d
net/http.serverHandler.ServeHTTP(0xc208042660, 0x7fd39462aad8, 0xc20805d360, 0xc208175520)
/usr/local/go/src/net/http/server.go:1703 +0x19a
net/http.(*conn).serve(0xc20805d2c0)
/usr/local/go/src/net/http/server.go:1204 +0xb57
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:1751 +0x35e
mccormickt12 commented 9 years ago

smap = {"/g_driver/1" : { "Metadata" : { "SourceName" : "Super test", "Location" : "Innovation Lab" }, "Properties": { "UnitofMeasure": "Unit", }, "Readings" : [[1351043674000, 0], [1351043675000, 1]], "uuid" : "02132190-e20c-11e4-b6c7-0800274223f7" } }

gtfierro commented 9 years ago

The above error causes the republisher 271 problem

2015/04/13 18:42:44 http: panic serving 169.229.223.190:46403: runtime error: slice bounds out of range                                                                                                                                       │················
goroutine 2589 [running]:                                                                                                                                                                                                                     │················
net/http.func·011()                                                                                                                                                                                                                           │················
        /usr/local/go/src/net/http/server.go:1130 +0xbb                                                                                                                                                                                       │················
github.com/gtfierro/giles/archiver.(*Republisher).EvaluateQuery(0xc208042360, 0xc2080923e0, 0x1f)                                                                                                                                             │················
        /home/gabe/go/src/github.com/gtfierro/giles/archiver/republish.go:271 +0x1749                                                                                                                                                         │················
github.com/gtfierro/giles/archiver.(*Republisher).MetadataChange(0xc208042360, 0xc208010f50)                                                                                                                                                  │················
        /home/gabe/go/src/github.com/gtfierro/giles/archiver/republish.go:214 +0x1d3                                                                                                                                                          │················
github.com/gtfierro/giles/archiver.(*Archiver).AddData(0xc2080363c0, 0xc2080e1770, 0xc20825ef2a, 0x8, 0x0, 0x0)                                                                                                                               │················
        /home/gabe/go/src/github.com/gtfierro/giles/archiver/archiver.go:192 +0x6a0                                                                                                                                                           │················
github.com/gtfierro/giles/httphandler.AddReadingHandler(0xc2080363c0, 0x7fb2c43c8c40, 0xc20805d9a0, 0xc208031a00, 0xc20825ef80, 0x1, 0x1)                                                                                                     │················
        /home/gabe/go/src/github.com/gtfierro/giles/httphandler/handlers.go:97 +0x2ce                                                                                                                                                         │················
github.com/gtfierro/giles/httphandler.func·001(0x7fb2c43c8c40, 0xc20805d9a0, 0xc208031a00, 0xc20825ef80, 0x1, 0x1)                                                                                                                            │················
        /home/gabe/go/src/github.com/gtfierro/giles/httphandler/handlers.go:56 +0x6d                                                                                                                                                          │················
github.com/julienschmidt/httprouter.(*Router).ServeHTTP(0xc2080920e0, 0x7fb2c43c8c40, 0xc20805d9a0, 0xc208031a00)                                                                                                                             │················
        /home/gabe/go/src/github.com/julienschmidt/httprouter/router.go:281 +0x188                                                                                                                                                            │················
net/http.(*ServeMux).ServeHTTP(0xc2080387e0, 0x7fb2c43c8c40, 0xc20805d9a0, 0xc208031a00)                                                                                                                                                      │················
        /usr/local/go/src/net/http/server.go:1541 +0x17d                                                                                                                                                                                      │················
net/http.serverHandler.ServeHTTP(0xc2080426c0, 0x7fb2c43c8c40, 0xc20805d9a0, 0xc208031a00)                                                                                                                                                    │················
        /usr/local/go/src/net/http/server.go:1703 +0x19a                                                                                                                                                                                      │················
net/http.(*conn).serve(0xc20805d900)                                                                                                                                                                                                          │················
        /usr/local/go/src/net/http/server.go:1204 +0xb57                                                                                                                                                                                      │················
created by net/http.(*Server).Serve                                                                                                                                                                                                           │················
        /usr/local/go/src/net/http/server.go:1751 +0x35e    
gtfierro commented 9 years ago

Fixed in 46565f1f7e05818d771a13ec1d7e847bd58223a4