-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SmartOS LX Zone] List Index out of range (/proc/[pid]/stat) #2455
Comments
Definitively a bug. Can you paste the traceback? |
Yes, here it is, A fix for this would be a marvelous thing which will allow for running for docker containers (example frigate) which now fail.
|
Fixed in 70b6787. Please reopen if it's not fixed. |
While you're at it, since it seems you have an "exotic" system (it's weird this is discovered so far in psutil lifetime): could you run the full test suite? Maybe there are other corner cases / bugs that only you can experience on your particular setup. You can run tests with |
Wow, this was a quick fix for the blkio_ticks. Thank you. I managed to get the tests to run, attaching the output. |
Mmm that's a lot of failures. From the errors I can see that SmartOS (Illumos?) does not implement many things that usually are taken for granted on a Linux system (process CPU affinity and IO affinity, EINVAL for querying a zombie process, process rlimit() behaving differently, etc.). I would say that some of these look like bugs which should be fixed in SmartOS / Illumos rather than in psutil. Fixing all of these would require adding specific cases in the code, as in I know nothing about SmartOS / Illumos. How much used is it (aka: is it worth investing time into it?)? What's the use case for SmartOS / Illumos (e.g. why one would want to use that rather than Linux)? |
Illumos is used as a base for OmniOS, SmartOS and OpenIdiana etc.... SmartOS is a powerful, niche operating system based on the Illumos kernel (a derivative of OpenSolaris/Oracle Solaris), now maintained by MNX. It’s designed primarily for cloud infrastructure, high-availability server environments, and advanced storage solutions. Another key player in the Illumos ecosystem is OmniOS, which is known for providing enterprise-grade server and storage solutions, and Triton Datacenter by MNX. Key Features: Use Cases: |
So I think if there are some major breaking incompatibilities, like this one was, it is maybe worth to fix them. I will also go to Illumos and report these bugs/ommisions they have different behavior that expected in the LX Zone. I did not happen to hit on any of them up until now when I got a docker container (Frigate) which is using pstuils to do it. |
Quick analysis of
|
Summary
Description
I’ve been using psutil in a SmartOS LX zone environment, and I’ve encountered an issue where the /proc/[pid]/stat file provides fewer fields than expected (52 fields on a standard Linux system). Specifically, psutil raises an
IndexError: list index out of range
when attempting to access certain fields like blkio_ticks (field 40), which aren’t present in the LX zone's /proc implementation.Would it be possible to implement more graceful handling for these cases? For example, if a field is missing, psutil could return 0 instead of raising an exception. This way, applications that depend on psutil can continue to function, even in environments where the /proc filesystem may not provide all the expected fields.
I believe this would help improve compatibility across different platforms, especially in environments like SmartOS LX zones that partially emulate Linux.
The text was updated successfully, but these errors were encountered: