-
Notifications
You must be signed in to change notification settings - Fork 183
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
Linux: failed to determine memory area for node: open /sys/devices/system/node/node0/memory_failure/state: no such file or directory #341
Comments
Hi @matildeY! Thanks for submitting this bug report. Do you think that the fix for a related bug will resolve this issue? I'm planning on cutting a |
hi, thanks for your answer, before submitting this bug i've tried with the main branch and the error is still present. The memoryTotalUsableBytesFromPath call is ok and does not return error |
OK, thank you for verifying that @matildeY! I will push a fix ASAP. |
The `/sys/devices/system/memory` and `/sys/devices/system/node/nodeX` subdirectories contains one or more subdirectories that begin with the word "memory" and end in a 0-based cell/block index for that memory. e.g. `/sys/devices/system/node/node0/memory63` is a directory containing information files about the 64th memory block in NUMA node 0. Previously, code that gathered total physical memory by looking at these subdirectories was using a simple glob on `memory*` to determine those memory block subdirectories. However, in some recent Linux kernels a `/sys/devices/system/memory/memory_failure` file causes that simple glob to backfire. This patch replaces the simple glob with a read of the `/sys/devices/system/memory` or `/sys/devices/system/node/nodeX` directory and regex matches on `memory\d$` to determine if the subdirectory is a memory block one. Fixes Issue #341 Signed-off-by: Jay Pipes <[email protected]>
Hi! I got the same warning when calling |
Hi @asiffer! What version of |
Thanks @jaypipes for your quick response! |
@asiffer I just cut a new release: https://github.com/jaypipes/ghw/releases/tag/v0.11.0 Wait a bit for Go mod/packaging to publish the new package and then update your go.mod. Should be good to go after that! :) |
Awesome 🤩 Thanks a lot! |
Yes the last version fixed it 👍🏻 Thanks again |
yes, it's ok for me. Thanks |
This commit uplifts the github.com/jaypipes/ghw dependency to the v0.12.0 release (released July 2023). Included in the v0.11.0 release was a fix for detecting memory areas in hardware with NUMA architecture and Linux kernels > 5.19.0 as well as ARM platforms. We are running resource-topology-exporter in our environments and ran into the aforementioned bug in ghw 0.9.0, thus this commit to uplift to a more modern ghw release. Related jaypipes/ghw#341 Signed-off-by: Jay Pipes <[email protected]>
This commit uplifts the github.com/jaypipes/ghw dependency to the v0.12.0 release (released July 2023). Included in the v0.11.0 release was a fix for detecting memory areas in hardware with NUMA architecture and Linux kernels > 5.19.0 as well as ARM platforms. We are running resource-topology-exporter in our environments and ran into the aforementioned bug in ghw 0.9.0, thus this commit to uplift to a more modern ghw release. Related jaypipes/ghw#341 Signed-off-by: Jay Pipes <[email protected]> (cherry picked from commit ea4bb57)
Doesn't seem to be fixed. I am getting this warning with 0.12.0 |
Hi, could you please give more details? e.g. which kernel version are you running? |
Failed to get topologyNodes return error
failed to determine memory area for node: open /sys/devices/system/node/node0/memory_failure/state: no such file or directory
1- since latest linux kernel there is a new directory called "memory_failure" that matches pattern defined in function
memoryTotalPhysicalBytesFromPath
and makes it failed.2- is it possible to call "memTotalPhysicalBytes" instead of "memoryTotalPhysicalBytesFromPath" in function "AreaForNode" which contains a fallback function to the syslog approach ?
The text was updated successfully, but these errors were encountered: