Skip to content

Commit

Permalink
Add gating if system doesnt support hung_task_panic
Browse files Browse the repository at this point in the history
Summary:
D66163794 introduced a fix for yv4 systems, but this change
broke the conveyor for flashy as the conveyor tests on older platforms
where this tunable option doesnt exist:

https://www.internalfb.com/conveyor/openbmc/flashy/releases

```
2024/12/06 05:49:41.832|4512|MainThread|D|paramiko_utils: 2024/12/06 05:49:41 {Err:Failed to write to hang_task_panic file '/proc/sys/kernel/hung_task_panic': open /proc/sys/kernel/hung_task_panic: no such file or directory
github.com/facebook/openbmc/tools/flashy/checks_and_remediations/common.disableHangPanic
	/data/sandcastle/boxes/trunk-git-openbmc/tools/flashy/checks_and_remediations/common/15_disable_hang_panic.go:42
main.main
	/data/sandcastle/boxes/trunk-git-openbmc/tools/flashy/flashy.go:139
runtime.main
	/data/sandcastle/temp/skycastle/tmp.Fi68Iq6JqJ/go1.19.4/go/src/runtime/proc.go:250
runtime.goexit
	/data/sandcastle/temp/skycastle/tmp.Fi68Iq6JqJ/go1.19.4/go/src/runtime/asm_arm.s:831}
```

Test Plan:
it builds and...

eyes

Reviewed By: amithash

Differential Revision: D66903075

fbshipit-source-id: 3c1cb130cf2876a84bff30b96089bd64242b6e4f
  • Loading branch information
Pete O_o authored and facebook-github-bot committed Dec 6, 2024
1 parent 57dc458 commit 6db7632
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
package common

import (
"log"
"os"
"time"

"github.com/facebook/openbmc/tools/flashy/lib/fileutils"
Expand All @@ -35,6 +37,10 @@ const disableHangPanicFilePath = "/proc/sys/kernel/hung_task_panic"

// disableHangPanic disables the "hung_task_panic".
func disableHangPanic(stepParams step.StepParams) step.StepExitError {
if _, err := os.Stat(disableHangPanicFilePath); errors.Is(err, os.ErrNotExist) {
log.Printf("%v does not exist. not proceeding with disableHungPanic", disableHangPanicFilePath)
return nil
}
err := fileutils.WriteFileWithTimeout(
disableHangPanicFilePath, []byte("0"), 0644, 30*time.Second,
)
Expand Down

0 comments on commit 6db7632

Please sign in to comment.