My APM server had stopped running shortly after uploading source maps for my node application.
I tried to run my node server again and the APM server crashed again.
I used Kibana to delete the source map index.
When my application client calls apm.captureError my Elastic APM logs show
|2019-01-10T14:47:05.852Z|WARN|[stacktrace]|model/stacktrace.go:88|No Sourcemap available for Service Name: 'Client Dev', Service Version: '1.80.1d' and Path: 'http://127.0.0.1:3000/6fa5db8ad3da1080fe32f149cf5e2ba2bca689dc.js?meteor_js_resource=true'.|
|---|---|---|---|---|
|2019-01-10T14:47:05.853Z|WARN|[stacktrace]|model/stacktrace.go:88|No Sourcemap available for Service Name: 'Client Dev', Service Version: '1.80.1d' and Path: 'http://127.0.0.1:3000/6fa5db8ad3da1080fe32f149cf5e2ba2bca689dc.js?meteor_js_resource=true'.|
Which is largely ok - But when I upload the source maps again I get the following error instead:
panic: runtime error: slice bounds out of range
goroutine 29 [running]:
github.com/elastic/apm-server/sourcemap.subSlice(...)
/go/src/github.com/elastic/apm-server/sourcemap/mapper.go:112
github.com/elastic/apm-server/sourcemap.(*SmapMapper).Apply(0xc4202f3a20, 0xc4207aa100, 0x14, 0xc4206d80f0, 0x7, 0xc42026ee40, 0x59, 0x9, 0x2f388, 0x16fd380, ...)
/go/src/github.com/elastic/apm-server/sourcemap/mapper.go:87 +0x743
github.com/elastic/apm-server/model.(*StacktraceFrame).applySourcemap(0xc420411340, 0x18505a0, 0xc4202f3a20, 0xc420464230, 0x176222d, 0xb, 0x176222d, 0xb, 0xc42059c420, 0xae)
/go/src/github.com/elastic/apm-server/model/stacktrace_frame.go:166 +0x128
github.com/elastic/apm-server/model.(*Stacktrace).Transform(0xc420434930, 0xc42018a180, 0x7, 0x1519e80, 0x0)
/go/src/github.com/elastic/apm-server/model/stacktrace.go:80 +0x1de
github.com/elastic/apm-server/model/error.(*Event).addException(0xc42037f880, 0xc42018a180)
/go/src/github.com/elastic/apm-server/model/error/event.go:283 +0x22c
github.com/elastic/apm-server/model/error.(*Event).fields(0xc42037f880, 0xc42018a180, 0xc4202c45b0)
/go/src/github.com/elastic/apm-server/model/error/event.go:220 +0x91
github.com/elastic/apm-server/model/error.(*Event).Transform(0xc42037f880, 0xc42018a180, 0x9, 0x17602d8, 0x9)
/go/src/github.com/elastic/apm-server/model/error/event.go:193 +0xc9
github.com/elastic/apm-server/publish.(*publisher).processPendingReq(0xc420086180, 0xc4202ee320, 0x2, 0x2, 0xc42018a180, 0x0)
/go/src/github.com/elastic/apm-server/publish/pub.go:147 +0xe7
github.com/elastic/apm-server/publish.(*publisher).run(0xc420086180)
/go/src/github.com/elastic/apm-server/publish/pub.go:134 +0xcc
created by github.com/elastic/apm-server/publish.NewPublisher
/go/src/github.com/elastic/apm-server/publish/pub.go:91 +0x1be
Not sure what I can do from here