Closed Tri0L closed 3 years ago
The problem is reproduced and occurs when invalid UTF-8 appear in label value.
The segfault is already fixed in master branch (here), as a part of implementation of another feature. Bugfix will be later (on this week I hope).
p.s. You can try to build pgscv from master and check the issue is still occur - you should see just an error (with no segfault) about failed metric.
For now, I've decided to keep current behavior - if an invalid UTF8 string found, just throw an error, skip metric and continue.
Performing strings validation for UTF8 (and discard invalid) will lead to the same behavior - throw error and skip metric. Also, I concerned about how pgSCV is working with non-UTF8 Postgres, this requires a bit more time for testing.
As a workaround for such cases, should reset pg_stat_statements and pass queries with valid UTF8 from application side.
@Tri0L There is 0.6.0-rc1 has been released. Please try to reproduce the bug.
Errors and Logs
Desktop (please complete the following information):
pgscv v0.5.0 fedf3587d389750f2dd1e721ea5e16a63de98868-release
]PostgreSQL 11.7 (Ubuntu 11.7-2.pgdg16.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609, 64-bit
]