From 1171692a3fabeb54978b8c53ee96124707e65f76 Mon Sep 17 00:00:00 2001 From: Bartlomiej Plotka Date: Tue, 24 Nov 2020 13:01:32 +0100 Subject: [PATCH] *: Set debug.SetPanicOnFault(true) so we can recover seg faults. (#3498) Signed-off-by: Bartlomiej Plotka --- CHANGELOG.md | 12 +++++++++++- cmd/thanos/main.go | 5 +++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5922fa9c0..e2d15ecc26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,17 @@ NOTE: As semantic versioning states all 0.y.z releases can contain breaking chan We use *breaking :warning:* to mark changes that are not backward compatible (relates only to v0.y.z releases.) -## Unreleased +## [v0.17.1](https://github.com/thanos-io/thanos/releases/tag/v0.17.1) - 2020.11.24 + +### Fixed + +- [#3480](https://github.com/thanos-io/thanos/pull/3480) Query-frontend: Fixed regression. + +### Changed + +- [#3498](https://github.com/thanos-io/thanos/pull/3498) Enabled debug.SetPanicOnFault(true) which allow us to recover on queries causing SEG FAULTs (e.g unmmaped memory access). + +## [v0.17.0](https://github.com/thanos-io/thanos/releases/tag/v0.17.0) - 2020.11.18 ### Added diff --git a/cmd/thanos/main.go b/cmd/thanos/main.go index cf0b0f59b9..156e06e19b 100644 --- a/cmd/thanos/main.go +++ b/cmd/thanos/main.go @@ -11,6 +11,7 @@ import ( "os/signal" "path/filepath" "runtime" + "runtime/debug" "syscall" "github.com/go-kit/kit/log" @@ -28,6 +29,10 @@ import ( ) func main() { + // We use mmaped resources in most of the components so hardcode PanicOnFault to true. This allows us to recover (if we can e.g if queries + // are temporarily accessing unmapped memory). + debug.SetPanicOnFault(true) + if os.Getenv("DEBUG") != "" { runtime.SetMutexProfileFraction(10) runtime.SetBlockProfileRate(10)