exportarr: panic: runtime error: index out of range

Details

K3s v1.25.7+k3s1, baremetal under Ubuntu 22.04

Lidarr: 1.1.3.2982, Exportarr v1.2.4, overall this is running fine but every few hours exportarr crashes with a panic with exit code 2 and the pod is restarted. Had a few of these before I started to collect logs.

What did you expect to happen:

Expect exportarr to be able to handle errors internally without crashing the pod.

Anything else you would like to add:

Hopefully these help:

Lidarr:

2023-03-26T20:12:18.347680528-04:00 2023-03-27T00:12:18.347Z    INFO    Sending HTTP request    {"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/album?artistid=32"}
2023-03-26T20:12:18.366066745-04:00 2023-03-27T00:12:18.365Z    INFO    Sending HTTP request    {"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/trackfile?artistid=33"}
2023-03-26T20:12:18.414992006-04:00 2023-03-27T00:12:18.414Z    INFO    Sending HTTP request    {"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/album?artistid=33"}
2023-03-26T20:12:18.614266055-04:00 panic: runtime error: index out of range [1256610] with length 1256610
2023-03-26T20:12:18.614363679-04:00 
2023-03-26T20:12:18.614384438-04:00 goroutine 2434400 [running]:
2023-03-26T20:12:18.614407200-04:00 encoding/json.(*decodeState).skip(0xc0001448e8)
2023-03-26T20:12:18.614422018-04:00     /usr/local/go/src/encoding/json/decode.go:269 +0xad
2023-03-26T20:12:18.614436325-04:00 encoding/json.(*decodeState).value(0xc0001448e8, {0x0?, 0x0?, 0xc0009ca8f8?})
2023-03-26T20:12:18.614448969-04:00     /usr/local/go/src/encoding/json/decode.go:378 +0x59
2023-03-26T20:12:18.614462334-04:00 encoding/json.(*decodeState).object(0xc0001448e8, {0x9b05e0?, 0xc000100b30?, 0xb?})
2023-03-26T20:12:18.614475699-04:00     /usr/local/go/src/encoding/json/decode.go:775 +0xd45
2023-03-26T20:12:18.614486659-04:00 encoding/json.(*decodeState).value(0xc0001448e8, {0x9b05e0?, 0xc000100b30?, 0x12?})
2023-03-26T20:12:18.614501537-04:00     /usr/local/go/src/encoding/json/decode.go:374 +0x45
2023-03-26T20:12:18.614518068-04:00 encoding/json.(*decodeState).array(0xc0001448e8, {0x9284a0?, 0xc0004522d0?, 0xc00019b2d0?})
2023-03-26T20:12:18.614531393-04:00     /usr/local/go/src/encoding/json/decode.go:562 +0x65b
2023-03-26T20:12:18.614541602-04:00 encoding/json.(*decodeState).value(0xc0001448e8, {0x9284a0?, 0xc0004522d0?, 0xc00019b320?})
2023-03-26T20:12:18.614550830-04:00     /usr/local/go/src/encoding/json/decode.go:364 +0x7e
2023-03-26T20:12:18.614568343-04:00 encoding/json.(*decodeState).unmarshal(0xc0001448e8, {0x9284a0?, 0xc0004522d0?})
2023-03-26T20:12:18.614579013-04:00     /usr/local/go/src/encoding/json/decode.go:181 +0x168
2023-03-26T20:12:18.614589002-04:00 encoding/json.(*Decoder).Decode(0xc0001448c0, {0x9284a0, 0xc0004522d0})
2023-03-26T20:12:18.614602567-04:00     /usr/local/go/src/encoding/json/stream.go:73 +0x191
2023-03-26T20:12:18.614614058-04:00 github.com/onedr0p/exportarr/internal/client.(*Client).DoRequest(0xc00019c000, {0x9fedf7, 0x5}, {0x9284a0, 0xc0004522d0}, {0xc00019b6b0, 0x1, 0xc00031906b?})
2023-03-26T20:12:18.614623627-04:00     /build/internal/client/client.go:87 +0x45a
2023-03-26T20:12:18.614634296-04:00 github.com/onedr0p/exportarr/internal/collector/lidarr.(*lidarrCollector).Collect(0xc0002d4fc0, 0xc00088a2a0?)
2023-03-26T20:12:18.614643514-04:00     /build/internal/collector/lidarr/music.go:185 +0x934
2023-03-26T20:12:18.614652731-04:00 github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
2023-03-26T20:12:18.614662389-04:00     /go/pkg/mod/github.com/prometheus/client_golang@v1.14.0/prometheus/registry.go:456 +0x10d
2023-03-26T20:12:18.614675484-04:00 created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
2023-03-26T20:12:18.614686174-04:00     /go/pkg/mod/github.com/prometheus/client_golang@v1.14.0/prometheus/registry.go:548 +0xc09

Lidarr:

2023-03-28T01:04:38.148186848-04:00 2023-03-28T05:04:38.148Z    INFO    Sending HTTP request    {"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/album?artistid=232"}
2023-03-28T01:04:38.168539022-04:00 2023-03-28T05:04:38.168Z    INFO    Sending HTTP request    {"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/trackfile?artistid=233"}
2023-03-28T01:04:38.199373212-04:00 2023-03-28T05:04:38.199Z    INFO    Sending HTTP request    {"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/album?artistid=233"}
2023-03-28T01:04:38.273298470-04:00 panic: runtime error: index out of range [528268] with length 528268
2023-03-28T01:04:38.273414538-04:00 
2023-03-28T01:04:38.273452439-04:00 goroutine 2317028 [running]:
2023-03-28T01:04:38.273480541-04:00 encoding/json.(*decodeState).skip(0xc0001203e8)
2023-03-28T01:04:38.273513734-04:00     /usr/local/go/src/encoding/json/decode.go:269 +0xad
2023-03-28T01:04:38.273550242-04:00 encoding/json.(*decodeState).value(0xc0001203e8, {0x0?, 0x0?, 0xc00076620a?})
2023-03-28T01:04:38.273582463-04:00     /usr/local/go/src/encoding/json/decode.go:378 +0x59
2023-03-28T01:04:38.273617629-04:00 encoding/json.(*decodeState).object(0xc0001203e8, {0x9b05e0?, 0xc00016e060?, 0xb?})
2023-03-28T01:04:38.273651643-04:00     /usr/local/go/src/encoding/json/decode.go:775 +0xd45
2023-03-28T01:04:38.273690345-04:00 encoding/json.(*decodeState).value(0xc0001203e8, {0x9b05e0?, 0xc00016e060?, 0x3?})
2023-03-28T01:04:38.273716504-04:00     /usr/local/go/src/encoding/json/decode.go:374 +0x45
2023-03-28T01:04:38.273737654-04:00 encoding/json.(*decodeState).array(0xc0001203e8, {0x9284a0?, 0xc0003421f8?, 0xc00022f2d0?})
2023-03-28T01:04:38.273757872-04:00     /usr/local/go/src/encoding/json/decode.go:562 +0x65b
2023-03-28T01:04:38.273777429-04:00 encoding/json.(*decodeState).value(0xc0001203e8, {0x9284a0?, 0xc0003421f8?, 0xc00022f320?})
2023-03-28T01:04:38.273818286-04:00     /usr/local/go/src/encoding/json/decode.go:364 +0x7e
2023-03-28T01:04:38.273843683-04:00 encoding/json.(*decodeState).unmarshal(0xc0001203e8, {0x9284a0?, 0xc0003421f8?})
2023-03-28T01:04:38.273874932-04:00     /usr/local/go/src/encoding/json/decode.go:181 +0x168
2023-03-28T01:04:38.273897785-04:00 encoding/json.(*Decoder).Decode(0xc0001203c0, {0x9284a0, 0xc0003421f8})
2023-03-28T01:04:38.273918003-04:00     /usr/local/go/src/encoding/json/stream.go:73 +0x191
2023-03-28T01:04:38.273938050-04:00 github.com/onedr0p/exportarr/internal/client.(*Client).DoRequest(0xc000000000, {0x9fedf7, 0x5}, {0x9284a0, 0xc0003421f8}, {0xc00022f6b0, 0x1, 0xc0002ff06b?})
2023-03-28T01:04:38.273957577-04:00     /build/internal/client/client.go:87 +0x45a
2023-03-28T01:04:38.273977474-04:00 github.com/onedr0p/exportarr/internal/collector/lidarr.(*lidarrCollector).Collect(0xc0002c0460, 0xc00049c180?)
2023-03-28T01:04:38.273996841-04:00     /build/internal/collector/lidarr/music.go:185 +0x934
2023-03-28T01:04:38.274016317-04:00 github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
2023-03-28T01:04:38.274036034-04:00     /go/pkg/mod/github.com/prometheus/client_golang@v1.14.0/prometheus/registry.go:456 +0x10d
2023-03-28T01:04:38.274055451-04:00 created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
2023-03-28T01:04:38.274075158-04:00     /go/pkg/mod/github.com/prometheus/client_golang@v1.14.0/prometheus/registry.go:548 +0xc09

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

Been stable. Closing issue, appreciate the support.

No errors logged yet… typical. works great when you watch.

Chugging away…

2023-03-28T17:14:13.035Z	INFO	Sending HTTP request	{"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/album?artistid=522"}
2023-03-28T17:14:13.066Z	INFO	Sending HTTP request	{"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/trackfile?artistid=523"}
2023-03-28T17:14:13.101Z	INFO	Sending HTTP request	{"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/album?artistid=523"}
2023-03-28T17:14:13.143Z	INFO	Sending HTTP request	{"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/trackfile?artistid=524"}
2023-03-28T17:14:13.176Z	INFO	Sending HTTP request	{"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/album?artistid=524"}
2023-03-28T17:14:13.191Z	INFO	Sending HTTP request	{"url": "http://lidarr.nzb.svc.cluster.local:80/api/v1/wanted/missing"}

whoops! Sorry about that, forgot to make that image public. You should be able to pull it now.

oh sorry, I was on mobile and it didn’t scroll at first. Now I see it all 😃