# Panic: runtime error: slice bounds out of range

**URL:** <https://community.influxdata.com/t/panic-runtime-error-slice-bounds-out-of-range/38804>\
**Category:** Tasks\
**Created:** [October 16, 2024, 10:32pm UTC](https://community.influxdata.com/t/panic-runtime-error-slice-bounds-out-of-range/38804 "2024-10-16T22:32:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinh\_lee](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@vinh\_lee](https://community.influxdata.com/u/vinh_lee)\
**Post date:** [October 16, 2024, 10:32pm UTC](https://community.influxdata.com/t/panic-runtime-error-slice-bounds-out-of-range/38804/1 "2024-10-16T22:32:08Z")

</div>

Hi all,  
I am using Influxdb OSSV2, I have been writing a task to check my database status. The task was running fine until 2 or 3 days later, when I checked my task it showed me an error “Failed to get runs: failed to find runs: panic: runtime error: slice bounds out of range”.  
Has anyone been through this error? May I have some advice?

Thank you all.

 ![image](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/3X/4/7/47d168b31f28225595311a8245939c1ef1ffe732.png)

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [October 21, 2024, 3:41pm UTC](https://community.influxdata.com/t/panic-runtime-error-slice-bounds-out-of-range/38804/2 "2024-10-21T15:41:27Z")

</div>

Hello @vinh_lee,  
Can you please share some of the logs from the db?  
Im seeing this type of issue frequently:

> <https://github.com/influxdata/influxdb/issues/6468>
>
> \### Bug report
> 
> \_\_System info: \_\_ \[Linux: 3.10.0-327.13.1.el7.x86\_64, influxdb-0….12.2-1.x86\_64\]
> 
> \*\*Steps to reproduce:\*\*
> 1. I ran out of space in /var/lib/ (where I had influxdb).
> 2. Now I cannot start influxdb.
> 
> \*\*Expected behavior:\*\* \[influxdb should start\]
> 
> \*\*Actual behavior:\*\* \[Cannot start influxdb\]
> 
> \*\*Additional info:\*\* \[Include gist of relevant config, logs, etc.\]
> 
> influxdb.log states:
> \[tsm1\] 2016/04/25 12:52:12 /d0/influxdb/data/\_internal/monitor/23 database index loaded in 3.312297ms
> \[store\] 2016/04/25 12:52:12 /d0/influxdb/data/\_internal/monitor/23 opened in 15.019705488s
> \[tsm1\] 2016/04/25 12:52:17 /d0/influxdb/data/regression/default/12 database index loaded in 20.03670118s
> \[store\] 2016/04/25 12:52:17 /d0/influxdb/data/regression/default/12 opened in 20.087676684s
> panic: runtime error: slice bounds out of range
> 
> goroutine 20 \[running\]:
> github.com/influxdata/influxdb/tsdb/engine/tsm1.(\_WriteWALEntry).UnmarshalBinary(0xc208139a68, 0xc20d8aa000, 0xb1, 0x100000, 0x0, 0x0)
> /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/wal.go:593 +0x68f
> github.com/influxdata/influxdb/tsdb/engine/tsm1.(\_WALSegmentReader).Next(0xc2093560c0, 0xc20c9e1c00)
> /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/wal.go:804 +0x7be
> github.com/influxdata/influxdb/tsdb/engine/tsm1.func·001(0x0, 0x0)
> /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache.go:444 +0x3a1
> github.com/influxdata/influxdb/tsdb/engine/tsm1.(\_CacheLoader).Load(0xc208146320, 0xc208082e80, 0x0, 0x0)
> /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/cache.go:466 +0x10f
> github.com/influxdata/influxdb/tsdb/engine/tsm1.(\_Engine).reloadCache(0xc208176fd0, 0x0, 0x0)
> /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/engine.go:663 +0xe2
> github.com/influxdata/influxdb/tsdb/engine/tsm1.(\_Engine).Open(0xc208176fd0, 0x0, 0x0)
> /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/engine.go:159 +0x1dd
> github.com/influxdata/influxdb/tsdb.func·004(0x0, 0x0)
> /root/go/src/github.com/influxdata/influxdb/tsdb/shard.go:149 +0x26a
> github.com/influxdata/influxdb/tsdb.(\_Shard).Open(0xc208050fc0, 0x0, 0x0)
> /root/go/src/github.com/influxdata/influxdb/tsdb/shard.go:159 +0x6f
> github.com/influxdata/influxdb/tsdb.func·009(0xc208031c20, 0xc20801f952, 0xa, 0xc2080ecf1d, 0x7, 0xc2080ed165, 0x2)
> /root/go/src/github.com/influxdata/influxdb/tsdb/store.go:162 +0x65f
> created by github.com/influxdata/influxdb/tsdb.(\*Store).loadShards
> /root/go/src/github.com/influxdata/influxdb/tsdb/store.go:170 +0xac8
> 
> \_Please note, the quickest way to fix a bug is to open a Pull Request.\_

If the logs show similar activity it could be do to shard issues.

---

<div class="post-metadata">

**Author:** ![vinh\_lee](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@vinh\_lee](https://community.influxdata.com/u/vinh_lee)\
**Post date:** [October 21, 2024, 10:41pm UTC](https://community.influxdata.com/t/panic-runtime-error-slice-bounds-out-of-range/38804/3 "2024-10-21T22:41:46Z")

</div>

Hi @Anaisdg  
Thank you so much for your reply.  
Tbh, I don’t know what to show you from the log because there are so many. Also, it only happens to some tasks that I created, my influxdb is working fine so I don’t think the post can help me.

Moreover, I noticed that even though the error is still there, the task is still working properly without any failure, and I can still have the logic performed inside the task. I suspect the error happens when we click directly on the task and it navigates us to the Influxdb UI where all the task logs need to be rendered and displayed.

So far, this does not bother me much, but it would be better if these bugs get fixed in the future.

---

<div class="post-metadata">

**Author:** ![davidby-influx](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/davidby-influx/32/20357_2.png) [@davidby-influx](https://community.influxdata.com/u/davidby-influx)\
**Post date:** [June 9, 2025, 9:18pm UTC](https://community.influxdata.com/t/panic-runtime-error-slice-bounds-out-of-range/38804/4 "2025-06-09T21:18:29Z")

</div>

In the logs, we are most interested in the stack trace from the panic.
