Comments (5)
access_process_vm
can only read pages that are actually resident in memory. The reads that fail are likely for pages that have either been swapped out or haven't even been populated yet.
If you want to read the memory of a process on a live system, try reading from /proc/$pid/mem
. I believe that will fault in pages as needed.
from drgn.
access_process_vm
can only read pages that are actually resident in memory. The reads that fail are likely for pages that have either been swapped out or haven't even been populated yet.If you want to read the memory of a process on a live system, try reading from
/proc/$pid/mem
. I believe that will fault in pages as needed.
Thanks for reply. But my system doesn't have swap and the kernel source says Rss:
is the size of resident memory.
fs/proc/task_mmu.c:819: SEQ_PUT_DEC("Rss: ", mss->resident);
I think 1942012 kB
are all resident pages. I also use /proc/pid/pagemap to verify the count of present pages in this vma range. It seems drgn indeed can't access many memory addresses even the page is present and can be access by crash command.
from drgn.
Huh, that does sound like a bug. I wasn't able to reproduce this on x86-64. What architecture and kernel version are you running?
from drgn.
Huh, that does sound like a bug. I wasn't able to reproduce this on x86-64. What architecture and kernel version are you running?
kernel version: 4.18.0-193.6.3.el8_2
arch: x86_64
CPU: Intel(R) Xeon(R) Platinum 8260 CPU @ 2.40GHz
I've tested multiple machines, and they all seem to have this issue, particularly when the process involves heavy memory usage. For example, I'm using drgn to scan a process with an Rss of 90G, but it can only access a small fraction of the memory pages. How can I assist in analyzing this problem?
from drgn.
Could you please run this script on one of these processes and share the output: https://gist.github.com/osandov/12d524c7c5cebfda2593b29e0b564234
Pass it the PID and optionally which address range to check (or leave off the addresses to check the entire process address space). So for your initial report, it'd look like:
sudo drgn ./test_access_remote_vm.py 2023533 0x700000000 0x8003b7000
from drgn.
Related Issues (20)
- Nearly 3-hour CI runs HOT 26
- Potential adjustments to `helpers/linux/printk.py` HOT 2
- Support searching for kernel modules without modules.dep.bin
- Smoke testing on other architectures HOT 3
- Unknown DW_AT_const_value form HOT 2
- Stop generating drgn.h HOT 2
- More convenient API for reading an array
- Remove scalar restriction on reinterpret HOT 1
- Unable to debug core dump HOT 4
- Update _PyLong_AsByteArray usage for Python 3.13
- C struct bitfield formatting depends on order of construction HOT 2
- Suggestion: pull extended LTS 4.14 from OpenELA HOT 2
- Throwing generic exceptions HOT 7
- Enable RHEL 9 Packit builds
- Backtrace from wrong CPU in kernel core dump HOT 1
- tests: tests are failing on powerpc HOT 2
- Test failure on 6.1.98-vmtest30.0tiny HOT 8
- Crashed thread does not have a stack trace HOT 9
- support Yocto build system to save the code size HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drgn.