sosreport / sos

A unified tool for collecting system logs and other debug information
http://sos.rtfd.org
GNU General Public License v2.0
508 stars 544 forks source link

[processor] plugin timing out on turbostat #3753

Closed TurboTurtle closed 1 month ago

TurboTurtle commented 1 month ago

I saw this during my sanity test run before cutting 4.8.0, but it wasn't an obvious fix and also doesn't appear to be directly a fault of sos so I didn't hold the release for it.

The processor plugin is timing out for me locally on the turbostat --debug sleep 10 command. Running this manually shows similar-ish behavior. The command runs and does not exit until I hit enter (regardless of how long I wait to do so), at which point it exits "successfully" with an error:

turbostat: get_rapl_counters: failed to read perf_data (8 1): Success

I've not found anything immediately online related to this, so I'm not sure if it's a known fault condition, or if it's something specific to my personal desktop, and for what it's worth I am running a relatively old AMD Ryzen 5 2600.

Is anyone familiar with turbostat and what might cause this behavior, or how to potentially safeguard against it? If not, I'll just slap a timeout on the add_cmd_output call for slightly longer than the 10 second sleep so we don't have to wait the full 5 minute plugin timeout if this gets hit elsewhere.

pmoravec commented 1 month ago

Running it with add_cmd_output's option Foreground=True doesn't help, I suppose. +1 for adding, say, 15s timeout.

(I dont know the tool and I am failing to reproduce myself)