Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Investigate panic on CheckHealth #111

Closed
Tracked by #102
helenosheaa opened this issue Mar 10, 2023 · 0 comments · Fixed by #115
Closed
Tracked by #102

Investigate panic on CheckHealth #111

helenosheaa opened this issue Mar 10, 2023 · 0 comments · Fixed by #115
Assignees

Comments

@helenosheaa
Copy link
Member

helenosheaa commented Mar 10, 2023

investigate panic on calling CheckHealth on a FlightSQL datasource with a "Token" authentication type:

logger=plugin.influxdata-flightsql-datasource t=2023-03-10T09:52:27.041746865Z level=error msg="Panic: runtime error: index out of range [0] with length 0 goroutine 25 [running]:
runtime/debug.Stack()
 /opt/hostedtoolcache/go/1.19.5/x64/src/runtime/debug/stack.go:24 +0x65
[github.com/influxdata/grafana-flightsql-datasource/pkg/flightsql.(*FlightSQLDatasource).query.func1()](http://github.com/influxdata/grafana-flightsql-datasource/pkg/flightsql.(*FlightSQLDatasource).query.func1())
 /home/runner/work/grafana-flightsql-datasource/grafana-flightsql-datasource/pkg/flightsql/query_data.go:107 +0x58
panic({0xe6fe40, 0xc00036f848})
 /opt/hostedtoolcache/go/1.19.5/x64/src/runtime/panic.go:884 +0x212
[google.golang.org/grpc/internal/metadata.Validate(0x1051c18](http://google.golang.org/grpc/internal/metadata.Validate(0x1051c18)?)
 /home/runner/go/pkg/mod/[google.golang.org/grpc@v1.49.0/internal/metadata/metadata.go:88](http://google.golang.org/grpc@v1.49.0/internal/metadata/metadata.go:88) +0x22e
[google.golang.org/grpc.newClientStream({0x1051c18](http://google.golang.org/grpc.newClientStream(%7B0x1051c18), 0xc00002e9f0}, 0x1738480, 0xc000348000, {0xf03b29, 0x32}, {0x0, 0x0, 0x0})
 /home/runner/go/pkg/mod/[google.golang.org/grpc@v1.49.0/stream.go:171](http://google.golang.org/grpc@v1.49.0/stream.go:171) +0xa5
[google.golang.org/grpc.invoke({0x1051c18](http://google.golang.org/grpc.invoke(%7B0x1051c18)?, 0xc00002e9f0?}, {0xf03b29?, 0x50?}, {0xe58e20, 0xc00058fda0}, {0xe71580, 0xc00013b6c0}, 0x0?, {0x0, ...})
 /home/runner/go/pkg/mod/[google.golang.org/grpc@v1.49.0/call.go:66](http://google.golang.org/grpc@v1.49.0/call.go:66) +0x7d
[google.golang.org/grpc.(*ClientConn).Invoke(0x60](http://google.golang.org/grpc.(*ClientConn).Invoke(0x60)?, {0x1051c18?, 0xc00002e9f0?}, {0xf03b29?, 0x0?}, {0xe58e20?, 0xc00058fda0?}, {0xe71580?, 0xc00013b6c0?}, {0x0, ...})
 /home/runner/go/pkg/mod/[google.golang.org/grpc@v1.49.0/call.go:37](http://google.golang.org/grpc@v1.49.0/call.go:37) +0x265
[github.com/apache/arrow/go/v10/arrow/flight/internal/flight.(*flightServiceClient).GetFlightInfo(0xc0001625e0](http://github.com/apache/arrow/go/v10/arrow/flight/internal/flight.(*flightServiceClient).GetFlightInfo(0xc0001625e0), {0x1051c18, 0xc00002e9f0}, 0x51?, {0x0, 0x0, 0x0})
 /home/runner/go/pkg/mod/[github.com/apache/arrow/go/v10@v10.0.1/arrow/flight/internal/flight/Flight_grpc.pb.go:166](http://github.com/apache/arrow/go/v10@v10.0.1/arrow/flight/internal/flight/Flight_grpc.pb.go:166) +0xce
[github.com/apache/arrow/go/v10/arrow/flight/flightsql.(*Client).getFlightInfo(..](http://github.com/apache/arrow/go/v10/arrow/flight/flightsql.(*Client).getFlightInfo(..).)
 /home/runner/go/pkg/mod/[github.com/apache/arrow/go/v10@v10.0.1/arrow/flight/flightsql/client.go:367](http://github.com/apache/arrow/go/v10@v10.0.1/arrow/flight/flightsql/client.go:367)
[github.com/apache/arrow/go/v10/arrow/flight/flightsql.flightInfoForCommand({0x1051c18](http://github.com/apache/arrow/go/v10/arrow/flight/flightsql.flightInfoForCommand(%7B0x1051c18), 0xc00002e9f0}, 0xc0001320c0, {0x1049300?, 0xc0009b5ec0?}, {0x0, 0x0, 0x0})
 /home/runner/go/pkg/mod/[github.com/apache/arrow/go/v10@v10.0.1/arrow/flight/flightsql/client.go:77](http://github.com/apache/arrow/go/v10@v10.0.1/arrow/flight/flightsql/client.go:77) +0x94
[github.com/apache/arrow/go/v10/arrow/flight/flightsql.(*Client).Execute(0x1051c18](http://github.com/apache/arrow/go/v10/arrow/flight/flightsql.(*Client).Execute(0x1051c18)?, {0x1051c18, 0xc00002e9f0}, {0xedd41a, 0x8}, {0x0, 0x0, 0x0})
 /home/runner/go/pkg/mod/[github.com/apache/arrow/go/v10@v10.0.1/arrow/flight/flightsql/client.go:92](http://github.com/apache/arrow/go/v10@v10.0.1/arrow/flight/flightsql/client.go:92) +0xf1
[github.com/influxdata/grafana-flightsql-datasource/pkg/flightsql.(*FlightSQLDatasource).query(0xc0001320e0](http://github.com/influxdata/grafana-flightsql-datasource/pkg/flightsql.(*FlightSQLDatasource).query(0xc0001320e0), {0x1051c18, 0xc000387830}, {{0xedd41a, 0x8}, 0x1, {0x0, 0x0, 0x0}, {0x0, ...}, ...})
 /home/runner/work/grafana-flightsql-datasource/grafana-flightsql-datasource/pkg/flightsql/query_data.go:114 +0x154
[github.com/influxdata/grafana-flightsql-datasource/pkg/flightsql.(*FlightSQLDatasource).CheckHealth(0xc000142040](http://github.com/influxdata/grafana-flightsql-datasource/pkg/flightsql.(*FlightSQLDatasource).CheckHealth(0xc000142040)?, {0x1051c18?, 0xc000387830?}, 0x1f?)
 /home/runner/work/grafana-flightsql-datasource/grafana-flightsql-datasource/pkg/flightsql/flightsql.go:140 +0x7b
[github.com/grafana/grafana-plugin-sdk-go/internal/automanagement.(*Manager).CheckHealth(0xc0000a72c0](http://github.com/grafana/grafana-plugin-sdk-go/internal/automanagement.(*Manager).CheckHealth(0xc0000a72c0)?, {0x1051c18, 0xc000387830}, 0xc0002ac2c0)
 /home/runner/go/pkg/mod/[github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/internal/automanagement/manager.go:47](http://github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/internal/automanagement/manager.go:47) +0x1f9
[github.com/grafana/grafana-plugin-sdk-go/backend.(*diagnosticsSDKAdapter).CheckHealth(0xc0001321a0](http://github.com/grafana/grafana-plugin-sdk-go/backend.(*diagnosticsSDKAdapter).CheckHealth(0xc0001321a0), {0x1051c18, 0xc000387830}, 0xc0002ac240)
 /home/runner/go/pkg/mod/[github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/backend/diagnostics_adapter.go:48](http://github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/backend/diagnostics_adapter.go:48) +0x19a
[github.com/grafana/grafana-plugin-sdk-go/backend/grpcplugin.(*diagnosticsGRPCServer).CheckHealth(0xc0003c1980](http://github.com/grafana/grafana-plugin-sdk-go/backend/grpcplugin.(*diagnosticsGRPCServer).CheckHealth(0xc0003c1980)?, {0x1051c18?, 0xc000387830?}, 0xc0003878c0?)
 /home/runner/go/pkg/mod/[github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/backend/grpcplugin/grpc_diagnostics.go:52](http://github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/backend/grpcplugin/grpc_diagnostics.go:52) +0x2b
[github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2._Diagnostics_CheckHealth_Handler.func1({0x1051c18](http://github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2._Diagnostics_CheckHealth_Handler.func1(%7B0x1051c18), 0xc000387830}, {0xe476a0?, 0xc0002ac240})
 /home/runner/go/pkg/mod/[github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/genproto/pluginv2/backend_grpc.pb.go:293](http://github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/genproto/pluginv2/backend_grpc.pb.go:293) +0x78
[github.com/grpc-ecosystem/go-grpc-prometheus.(*ServerMetrics).UnaryServerInterceptor.func1({0x1051c18](http://github.com/grpc-ecosystem/go-grpc-prometheus.(*ServerMetrics).UnaryServerInterceptor.func1(%7B0x1051c18), 0xc000387830}, {0xe476a0, 0xc0002ac240}, 0x7fea742c31b8?, 0xc000380180)
 /home/runner/go/pkg/mod/[github.com/grpc-ecosystem/go-grpc-prometheus@v1.2.0/server_metrics.go:107](http://github.com/grpc-ecosystem/go-grpc-prometheus@v1.2.0/server_metrics.go:107) +0x87
[github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1({0x1051c18](http://github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1(%7B0x1051c18)?, 0xc000387830?}, {0xe476a0?, 0xc0002ac240?})
 /home/runner/go/pkg/mod/[github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25](http://github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:25) +0x3a
[github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1({0x1051c18](http://github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1(%7B0x1051c18), 0xc000387830}, {0xe476a0, 0xc0002ac240}, 0xc000368ad0?, 0xdbd7c0?)
 /home/runner/go/pkg/mod/[github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:34](http://github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0/chain.go:34) +0xbe
[github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2._Diagnostics_CheckHealth_Handler({0xdc2ec0](http://github.com/grafana/grafana-plugin-sdk-go/genproto/pluginv2._Diagnostics_CheckHealth_Handler(%7B0xdc2ec0)?, 0xc00012b5b0}, {0x1051c18, 0xc000387830}, 0xc0002b4070, 0xc0001353e0)
 /home/runner/go/pkg/mod/[github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/genproto/pluginv2/backend_grpc.pb.go:295](http://github.com/grafana/grafana-plugin-sdk-go@v0.147.1-0.20230118172923-498f672537c3/genproto/pluginv2/backend_grpc.pb.go:295) +0x138
[google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002f2000](http://google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002f2000), {0x1059a60, 0xc000534340}, 0xc00036c240, 0xc000135b00, 0x1720e20, 0x0)
 /home/runner/go/pkg/mod/[google.golang.org/grpc@v1.49.0/server.go:1301](http://google.golang.org/grpc@v1.49.0/server.go:1301) +0xb2b
[google.golang.org/grpc.(*Server).handleStream(0xc0002f2000](http://google.golang.org/grpc.(*Server).handleStream(0xc0002f2000), {0x1059a60, 0xc000534340}, 0xc00036c240, 0x0)
 /home/runner/go/pkg/mod/[google.golang.org/grpc@v1.49.0/server.go:1642](http://google.golang.org/grpc@v1.49.0/server.go:1642) +0xa2f
[google.golang.org/grpc.(*Server).serveStreams.func1.2()](http://google.golang.org/grpc.(*Server).serveStreams.func1.2())
 /home/runner/go/pkg/mod/[google.golang.org/grpc@v1.49.0/server.go:938](http://google.golang.org/grpc@v1.49.0/server.go:938) +0x98
created by [google.golang.org/grpc.(*Server).serveStreams.func1](http://google.golang.org/grpc.(*Server).serveStreams.func1)
 /home/runner/go/pkg/mod/[google.golang.org/grpc@v1.49.0/server.go:936](http://google.golang.org/grpc@v1.49.0/server.go:936) +0x28a
"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant