Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic in pgxpool healthcheck #2260

Open
ihasdapie opened this issue Feb 22, 2025 · 0 comments
Open

Panic in pgxpool healthcheck #2260

ihasdapie opened this issue Feb 22, 2025 · 0 comments
Labels

Comments

@ihasdapie
Copy link

ihasdapie commented Feb 22, 2025

Describe the bug

I ran into a panic in runtime in my https://github.com/Permify/permify deployment inside this library. I haven't ever seen permify panic before, and saw that the panic was in the healthcheck in this library and so figured it might be worthwhile reporting. I have no clear way of reproducing this issue.

/home/runner/go/pkg/mod/github.com/jackc/pgx/[email protected]/pgxpool/pool.go:273 +0x370
created by github.com/jackc/pgx/v5/pgxpool.NewWithConfig in goroutine 1
/home/runner/go/pkg/mod/github.com/jackc/pgx/[email protected]/pgxpool/pool.go:275 +0x32
github.com/jackc/pgx/v5/pgxpool.NewWithConfig.func3()
/home/runner/go/pkg/mod/github.com/jackc/pgx/[email protected]/pgxpool/pool.go:415 +0xdd
github.com/jackc/pgx/v5/pgxpool.(*Pool).backgroundHealthCheck(0xc0001486c0)
/home/runner/go/pkg/mod/github.com/jackc/pgx/[email protected]/pgxpool/pool.go:430 +0x34
github.com/jackc/pgx/v5/pgxpool.(*Pool).checkHealth(0xc0001486c0)
/home/runner/go/pkg/mod/github.com/jackc/pgx/[email protected]/pgxpool/pool.go:449 +0x45
github.com/jackc/pgx/v5/pgxpool.(*Pool).checkConnsHealth(0xc0001486c0)
/home/runner/go/pkg/mod/github.com/jackc/puddle/[email protected]/pool.go:592 +0x1bc
github.com/jackc/puddle/v2.(*Pool[...]).AcquireAllIdle(0x19e1260)
goroutine 109 [running]:
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x1073b5c]
panic: runtime error: invalid memory address or nil pointer dereference

To Reproduce

Expected behavior
no panic

Actual behavior
a panic

Version

  • Go: $ go version -> 1.24.0
  • PostgreSQL: PostgreSQL 15.7 on aarch64-unknown-linux-gnu, compiled by gcc (GCC) 7.3.1 20180712 (Red Hat 7.3.1-6), 64-bit
  • pgx 5.7.2, puddle 2.2.2

Additional context
Add any other context about the problem here.

@ihasdapie ihasdapie added the bug label Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant