Skip to content

Commit 0dd664d

Browse files
authored
Cut v1.11.1 (#3616)
* Fix kernel_hung for no data (#3613) Return an ErrNoData for the kernel_hung collector if the file does not exist. Fixes: #3612 Signed-off-by: Ben Kochie <superq@gmail.com> * Release v1.11.1 (#3615) * [BUGFIX] Fix kernel_hung for no data #3613 Signed-off-by: Ben Kochie <superq@gmail.com> --------- Signed-off-by: Ben Kochie <superq@gmail.com>
1 parent 14fddfc commit 0dd664d

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
* [ENHANCEMENT]
66
* [BUGFIX]
77

8+
## 1.11.1 / 2026-04-07
9+
10+
* [BUGFIX] Fix kernel_hung for no data #3613
11+
812
## 1.11.0 / 2026-04-04
913

1014
* [CHANGE] Adds distroless container image. #3592

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.0
1+
1.11.1

collector/kernel_hung_linux.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
package collector
1717

1818
import (
19+
"errors"
1920
"fmt"
2021
"log/slog"
22+
"os"
2123

2224
"github.com/prometheus/client_golang/prometheus"
2325
"github.com/prometheus/procfs"
@@ -54,6 +56,10 @@ var (
5456
func (c *kernelHungCollector) Update(ch chan<- prometheus.Metric) error {
5557
kernelHung, err := c.fs.KernelHung()
5658
if err != nil {
59+
if errors.Is(err, os.ErrNotExist) {
60+
c.logger.Debug("hung_task_detect_count does not exist")
61+
return ErrNoData
62+
}
5763
return err
5864
}
5965

0 commit comments

Comments
 (0)