# SHOW TAG VALUES throws invalid memory address or nil pointer dereference

**URL:** <https://community.influxdata.com/t/show-tag-values-throws-invalid-memory-address-or-nil-pointer-dereference/4421>\
**Category:** Systems\
**Tags:** influxdb, grafana\
**Created:** [March 18, 2018, 7:35am UTC](https://community.influxdata.com/t/show-tag-values-throws-invalid-memory-address-or-nil-pointer-dereference/4421 "2018-03-18T07:35:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ittai](https://avatars.discourse-cdn.com/v4/letter/i/b782af/32.png) [@Ittai](https://community.influxdata.com/u/Ittai)\
**Post date:** [March 18, 2018, 7:35am UTC](https://community.influxdata.com/t/show-tag-values-throws-invalid-memory-address-or-nil-pointer-dereference/4421/1 "2018-03-18T07:35:24Z")

</div>

Hi,  
I’m running grafana (v4.6.3) and influxdb (1.5.0) on two docker containers.  
I’ve created a dashboard on Grafana with a template that queries Influx for tag values.  
SHOW TAG VALUES WITH KEY=“action.primaryOssName” where “action.primaryVendor” =~ /^$vendor$/

Sometimes, I can’t quite point out when, the template will stop show options and return:  
`{"results":[{"statement_id":-1,"error":"SHOW TAG VALUES WITH KEY = \"action.primaryOssName\" WHERE \"action.primaryVendor\" =~ /^.*$/ [panic:runtime error: invalid memory address or nil pointer dereference]"}]}`

I ran ‘docker logs’ on the influxdb container and found the following error logs:

`ts=2018-03-18T05:41:51.130106Z lvl=info msg="Executing query" log_id=06uNqYgl000 service=query query="SHOW TAG VALUES ON cellwize WITH KEY = \"action.primaryOssName\" WHERE (\"action.primaryVendor\" =~ /^.*$/) AND (_tagKey = 'action.primaryOssName')"`

```
ts=2018-03-18T05:41:51.130412Z lvl=error msg="SHOW TAG VALUES WITH KEY = \"action.primaryOssName\" WHERE \"action.primaryVendor\" =~ /^.*$/ [panic:runtime error: invalid memory address or nil pointer dereference] goroutine 3125843 [running]:
runtime/debug.Stack(0xc5d867d2a0, 0xc5b6d76960, 0x59)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
github.com/influxdata/influxdb/query.(*QueryExecutor).recover(0xc42018d7a0, 0xc5d867d2a0, 0xc5b6f04ea0)
/go/src/github.com/influxdata/influxdb/query/query_executor.go:451 +0xaf
panic(0xce4120, 0x1302970)
/usr/local/go/src/runtime/panic.go:491 +0x283
github.com/influxdata/influxdb/tsdb.(*MeasurementFields).HasField(0x0, 0xc508eaef00, 0x14, 0x10)
/go/src/github.com/influxdata/influxdb/tsdb/shard.go:1408 +0x26
github.com/influxdata/influxdb/tsdb.IndexSet.seriesByBinaryExprIterator(0xc52455ad80, 0x1, 0x8, 0xc4201913b0, 0xc428833080, 0xc, 0x10, 0xc421a21a10, 0x0, 0x0, ...)
/go/src/github.com/influxdata/influxdb/tsdb/index.go:1833 +0xdd2
github.com/influxdata/influxdb/tsdb.IndexSet.seriesByExprIterator(0xc52455ad80, 0x1, 0x8, 0xc4201913b0, 0xc428833080, 0xc, 0x10, 0x12cae00, 0xc421a21a10, 0x0, ...)
/go/src/github.com/influxdata/influxdb/tsdb/index.go:1786 +0x476
github.com/influxdata/influxdb/tsdb.IndexSet.tagValuesByKeyAndExpr(0xc52455ad80, 0x1, 0x8, 0xc4201913b0, 0x12ce9c0, 0x1336238, 0xc428833080, 0xc, 0x10, 0xc617b143f0, ...)
/go/src/github.com/influxdata/influxdb/tsdb/index.go:2144 +0x1a0
github.com/influxdata/influxdb/tsdb.IndexSet.MeasurementTagKeyValuesByExpr(0xc52455ad80, 0x1, 0x8, 0xc4201913b0, 0x12ce9c0, 0x1336238, 0xc428833080, 0xc, 0x10, 0xc617b143f0, ...)
/go/src/github.com/influxdata/influxdb/tsdb/index.go:2293 +0xca1
github.com/influxdata/influxdb/tsdb.(*Store).TagValues(0xc42017e300, 0x12ce9c0, 0x1336238, 0xc62992b040, 0x8, 0x8, 0x12cae00, 0xc421a218c0, 0x8, 0x20, ...)
/go/src/github.com/influxdata/influxdb/tsdb/store.go:1517 +0x946
github.com/influxdata/influxdb/coordinator.LocalTSDBStore.TagValues(0xc42017e300, 0x12ce9c0, 0x1336238, 0xc62992b040, 0x8, 0x8, 0x12cae00, 0xc421a218c0, 0x32f2d7fe, 0x109d537404, ...)
<autogenerated>:1 +0x97
github.com/influxdata/influxdb/coordinator.(*StatementExecutor).executeShowTagValues(0xc420238a80, 0xc52455ab80, 0xc6977b9c48, 0xdf7588, 0xf)
/go/src/github.com/influxdata/influxdb/coordinator/statement_executor.go:1066 +0x840
github.com/influxdata/influxdb/coordinator.(*StatementExecutor).ExecuteStatement(0xc420238a80, 0x12ce780, 0xc52455ab80, 0x0, 0x19dc, 0xc72df8b3b0, 0xc5b6f04ea0, 0xc5b6d768a0, 0xc45257d5ee, 0x8, ...)
/go/src/github.com/influxdata/influxdb/coordinator/statement_executor.go:194 +0x2937
github.com/influxdata/influxdb/query.(*QueryExecutor).executeQuery(0xc42018d7a0, 0xc5d867d2a0, 0xc45257d5ee, 0x8, 0x12ce9c0, 0x1336238, 0x2710, 0x1, 0x0, 0x0, ...)
/go/src/github.com/influxdata/influxdb/query/query_executor.go:389 +0xae8
created by github.com/influxdata/influxdb/query.(*QueryExecutor).ExecuteQuery
/go/src/github.com/influxdata/influxdb/query/query_executor.go:285 +0xc3
" log_id=06uNqYgl000 service=query
```

---

<div class="post-metadata">

**Author:** ![mark](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/mark/32/778_2.png) [@mark](https://community.influxdata.com/u/mark)\
**Post date:** [March 19, 2018, 3:36pm UTC](https://community.influxdata.com/t/show-tag-values-throws-invalid-memory-address-or-nil-pointer-dereference/4421/2 "2018-03-19T15:36:58Z")

</div>

This will be fixed in 1.5.1: [nil pointer dereference with certain SHOW TAG VALUES qeuries · Issue #9548 · influxdata/influxdb · GitHub](https://github.com/influxdata/influxdb/issues/9548)

---

<div class="post-metadata">

**Author:** ![prasadasokan](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@prasadasokan](https://community.influxdata.com/u/prasadasokan)\
**Post date:** [April 18, 2018, 2:16pm UTC](https://community.influxdata.com/t/show-tag-values-throws-invalid-memory-address-or-nil-pointer-dereference/4421/3 "2018-04-18T14:16:08Z")

</div>

We have updated our influx to 1.5.2 and still see the error. Couldn’t paste the error message here as there is a limit for a new user ☹

---

<div class="post-metadata">

**Author:** ![mark](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/mark/32/778_2.png) [@mark](https://community.influxdata.com/u/mark)\
**Post date:** [April 18, 2018, 3:32pm UTC](https://community.influxdata.com/t/show-tag-values-throws-invalid-memory-address-or-nil-pointer-dereference/4421/4 "2018-04-18T15:32:45Z")

</div>

Can you paste the error into a [gist](https://gist.github.com/) or put it on a pastebin/whatever and link it back here?

---

<div class="post-metadata">

**Author:** ![prasadasokan](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@prasadasokan](https://community.influxdata.com/u/prasadasokan)\
**Post date:** [April 18, 2018, 5:08pm UTC](https://community.influxdata.com/t/show-tag-values-throws-invalid-memory-address-or-nil-pointer-dereference/4421/5 "2018-04-18T17:08:01Z")

</div>

Sorry Mark. False alarm. After upgrade to 1.5.2, failed to restart influxdb.
