这是indexloc提供的服务,不要输入任何密码
Skip to content

Panic when connecting through alloydb auth proxy - panic: runtime error: slice bounds out of range [:1157627904] with capacity 16384 #504

@andriihrachov

Description

@andriihrachov

Bug Description

alloydb proxy crashes with error, when deployed as a sidecar on kubernetes

2023/11/17 15:52:42 [********] accepted connection from 127.0.0.1:51470
panic: runtime error: slice bounds out of range [:1157627904] with capacity 16384

Example code (or command)

No response

Stacktrace

goroutine 9 [running]:
cloud.google.com/go/alloydbconn.(*Dialer).metadataExchange(0xc0000bf320, {0x12687f8?, 0xc000510000})
	/go/pkg/mod/cloud.google.com/go/alloydbconn@v1.5.0/dialer.go:337 +0x777
cloud.google.com/go/alloydbconn.(*Dialer).Dial(0xc0000bf320, {0x1263f08, 0xc0004cc000}, {0x7ffd5eaa8c14, 0x52}, {0x0, 0x0, 0x0?})
	/go/pkg/mod/cloud.google.com/go/alloydbconn@v1.5.0/dialer.go:247 +0xc34
github.com/GoogleCloudPlatform/alloydb-auth-proxy/internal/proxy.(*Client).serveSocketMount.func1()
	/go/src/alloydb-auth-proxy/internal/proxy/proxy.go:651 +0x2b1
created by github.com/GoogleCloudPlatform/alloydb-auth-proxy/internal/proxy.(*Client).serveSocketMount in goroutine 8
	/go/src/alloydb-auth-proxy/internal/proxy/proxy.go:631 +0x1da

Steps to reproduce?

  1. 1.5.0 version of gcr.io/alloydb-connectors/alloydb-auth-proxy
  2. deploy on kubernetes as a sidecar
  3. run psql to connect from a neighbor conatiner / port forward from local

Environment

GKE

Additional Details

No response

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions