Skip to content
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

gcore with saniteizers #1825

Open
YoavCohen opened this issue Dec 3, 2024 · 2 comments
Open

gcore with saniteizers #1825

YoavCohen opened this issue Dec 3, 2024 · 2 comments

Comments

@YoavCohen
Copy link

Hi,

In my scenario I sometimes want to using "gcore" in order to dump the memory of the running process into disk.
Unfortunately, when using sanitizers the memory dump is hugh when using this command(maybe due to shadow memory?)
Is there a way to work around this?

Thank you

@vitalybuka
Copy link
Contributor

There is use_madv_dontdump, but it's ON by default.
So either gcore ignores MADV_DONTDUMP, or sanitizer fails to annotate some parts.

@YoavCohen
Copy link
Author

Hi I'm pretty sure that asan also map memory without this flag.
my app without asan
Enter PID: 200400400000-200800400000 ---p 00000000 00:00 0 - Size: 16777216 kB (16.00 GB) - VmFlags: mr mw me dd sd
200800600000-200c00600000 ---p 00000000 00:00 0 - Size: 16777216 kB (16.00 GB) - VmFlags: mr mw me dd sd
200c00800000-201000800000 ---p 00000000 00:00 0 - Size: 16777216 kB (16.00 GB) - VmFlags: mr mw me dd sd
201400c00000-201800c00000 ---p 00000000 00:00 0 - Size: 16777216 kB (16.00 GB) - VmFlags: mr mw me dd sd
201800e00000-201c00e00000 ---p 00000000 00:00 0 - Size: 16777216 kB (16.00 GB) - VmFlags: mr mw me dd sd
201c01000000-202001000000 ---p 00000000 00:00 0 - Size: 16777216 kB (16.00 GB) - VmFlags: mr mw me dd sd
20100ba00000-201400a00000 ---p 00000000 00:00 0 - Size: 16596992 kB (15.83 GB) - VmFlags: mr mw me dd sd
200040200000-200400200000 ---p 00000000 00:00 0 - Size: 15728640 kB (15.00 GB) - VmFlags: mr mw me dd sd
7ff5f58df000-7ff60b7ff000 rw-p 00000000 00:00 0 - Size: 359552 kB (0.34 GB) - VmFlags: rd wr mr mw me ac sd
7ff617ff6000-7ff61ee00000 rw-p 00000000 00:00 0 - Size: 112680 kB (0.11 GB) - VmFlags: rd wr mr mw me ac sd

with asan
Enter PID: 2008fff7000-10007fff8000 rw-p 00000000 00:00 0 - Size: 15032123396 kB (14335.75 GB) - VmFlags: rd wr mr mw me nr dd sd nh
8fff7000-2008fff7000 ---p 00000000 00:00 0 - Size: 2147483648 kB (2048.00 GB) - VmFlags: mr mw me nr sd
631e00010000-640000000000 ---p 00000000 00:00 0 - Size: 947912640 kB (904.00 GB) - VmFlags: mr mw me nr sd
62ee00010000-631000000000 ---p 00000000 00:00 0 - Size: 142606272 kB (136.00 GB) - VmFlags: mr mw me nr sd
600000000000-602000000000 ---p 00000000 00:00 0 - Size: 134217728 kB (128.00 GB) - VmFlags: mr mw me nr sd
604e00010000-606000000000 ---p 00000000 00:00 0 - Size: 75497408 kB (72.00 GB) - VmFlags: mr mw me nr sd
608e00010000-60a000000000 ---p 00000000 00:00 0 - Size: 75497408 kB (72.00 GB) - VmFlags: mr mw me nr sd
62be00010000-62d000000000 ---p 00000000 00:00 0 - Size: 75497408 kB (72.00 GB) - VmFlags: mr mw me nr sd
61b000010000-61be00000000 ---p 00000000 00:00 0 - Size: 58720192 kB (56.00 GB) - VmFlags: mr mw me nr sd
61c000010000-61ce00000000 ---p 00000000 00:00 0 - Size: 58720192 kB (56.00 GB) - VmFlags: mr mw me nr sd
61d000010000-61de00000000 ---p 00000000 00:00 0 - Size: 58720192 kB (56.00 GB) - VmFlags: mr mw me nr sd
61e000010000-61ee00000000 ---p 00000000 00:00 0 - Size: 58720192 kB (56.00 GB) - VmFlags: mr mw me nr sd
61f000010000-61fe00000000 ---p 00000000 00:00 0 - Size: 58720192 kB (56.00 GB) - VmFlags: mr mw me nr sd
620000010000-620e00000000 ---p 00000000 00:00 0 - Size: 58720192 kB (56.00 GB) - VmFlags: mr mw me nr sd
622000010000-622e00000000 ---p 00000000 00:00 0 - Size: 58720192 kB (56.00 GB) - VmFlags: mr mw me nr sd
607000020000-607e00000000 ---p 00000000 00:00 0 - Size: 58720128 kB (56.00 GB) - VmFlags: mr mw me nr sd
626000020000-626e00000000 ---p 00000000 00:00 0 - Size: 58720128 kB (56.00 GB) - VmFlags: mr mw me nr sd
62b000020000-62be00000000 ---p 00000000 00:00 0 - Size: 58720128 kB (56.00 GB) - VmFlags: mr mw me nr sd
60a000030000-60ae00000000 ---p 00000000 00:00 0 - Size: 58720064 kB (56.00 GB) - VmFlags: mr mw me nr sd
627000030000-627e00000000 ---p 00000000 00:00 0 - Size: 58720064 kB (56.00 GB) - VmFlags: mr mw me nr sd
628000030000-628e00000000 ---p 00000000 00:00 0 - Size: 58720064 kB (56.00 GB) - VmFlags: mr mw me nr sd
60d000040000-60de00000000 ---p 00000000 00:00 0 - Size: 58720000 kB (56.00 GB) - VmFlags: mr mw me nr sd
60e000040000-60ee00000000 ---p 00000000 00:00 0 - Size: 58720000 kB (56.00 GB) - VmFlags: mr mw me nr sd
60f000040000-60fe00000000 ---p 00000000 00:00 0 - Size: 58720000 kB (56.00 GB) - VmFlags: mr mw me nr sd
610000040000-610e00000000 ---p 00000000 00:00 0 - Size: 58720000 kB (56.00 GB) - VmFlags: mr mw me nr sd
60b000050000-60be00000000 ---p 00000000 00:00 0 - Size: 58719936 kB (56.00 GB) - VmFlags: mr mw me nr sd
602000070000-602e00000000 ---p 00000000 00:00 0 - Size: 58719808 kB (56.00 GB) - VmFlags: mr mw me nr sd
613000070000-613e00000000 ---p 00000000 00:00 0 - Size: 58719808 kB (56.00 GB) - VmFlags: mr mw me nr sd
614000080000-614e00000000 ---p 00000000 00:00 0 - Size: 58719744 kB (56.00 GB) - VmFlags: mr mw me nr sd
616000080000-616e00000000 ---p 00000000 00:00 0 - Size: 58719744 kB (56.00 GB) - VmFlags: mr mw me nr sd
617000080000-617e00000000 ---p 00000000 00:00 0 - Size: 58719744 kB (56.00 GB) - VmFlags: mr mw me nr sd
618000080000-618e00000000 ---p 00000000 00:00 0 - Size: 58719744 kB (56.00 GB) - VmFlags: mr mw me nr sd
61a000080000-61ae00000000 ---p 00000000 00:00 0 - Size: 58719744 kB (56.00 GB) - VmFlags: mr mw me nr sd
623000080000-623e00000000 ---p 00000000 00:00 0 - Size: 58719744 kB (56.00 GB) - VmFlags: mr mw me nr sd
62a000090000-62ae00000000 ---p 00000000 00:00 0 - Size: 58719680 kB (56.00 GB) - VmFlags: mr mw me nr sd
6250000b0000-625e00000000 ---p 00000000 00:00 0 - Size: 58719552 kB (56.00 GB) - VmFlags: mr mw me nr sd
6060000c0000-606e00000000 ---p 00000000 00:00 0 - Size: 58719488 kB (56.00 GB) - VmFlags: mr mw me nr sd
62e0000c0000-62ee00000000 ---p 00000000 00:00 0 - Size: 58719488 kB (56.00 GB) - VmFlags: mr mw me nr sd
6080000f0000-608e00000000 ---p 00000000 00:00 0 - Size: 58719296 kB (56.00 GB) - VmFlags: mr mw me nr sd
60c000170000-60ce00000000 ---p 00000000 00:00 0 - Size: 58718784 kB (56.00 GB) - VmFlags: mr mw me nr sd
6290001f0000-629e00000000 ---p 00000000 00:00 0 - Size: 58718272 kB (56.00 GB) - VmFlags: mr mw me nr sd
631000200000-631e00000000 ---p 00000000 00:00 0 - Size: 58718208 kB (56.00 GB) - VmFlags: mr mw me nr sd
604000220000-604e00000000 ---p 00000000 00:00 0 - Size: 58718080 kB (56.00 GB) - VmFlags: mr mw me nr sd
611000280000-611e00000000 ---p 00000000 00:00 0 - Size: 58717696 kB (56.00 GB) - VmFlags: mr mw me nr sd
6030002d0000-603e00000000 ---p 00000000 00:00 0 - Size: 58717376 kB (56.00 GB) - VmFlags: mr mw me nr sd
612000300000-612e00000000 ---p 00000000 00:00 0 - Size: 58717184 kB (56.00 GB) - VmFlags: mr mw me nr sd
624000450000-624e00000000 ---p 00000000 00:00 0 - Size: 58715840 kB (56.00 GB) - VmFlags: mr mw me nr sd
619000a80000-619e00000000 ---p 00000000 00:00 0 - Size: 58709504 kB (55.99 GB) - VmFlags: mr mw me nr sd
615001220000-615e00000000 ---p 00000000 00:00 0 - Size: 58701696 kB (55.98 GB) - VmFlags: mr mw me nr sd
6210023c0000-621e00000000 ---p 00000000 00:00 0 - Size: 58683648 kB (55.97 GB) - VmFlags: mr mw me nr sd
62d0106f0000-62de00000000 ---p 00000000 00:00 0 - Size: 58451008 kB (55.74 GB) - VmFlags: mr mw me nr sd
200400400000-200800400000 ---p 00000000 00:00 0 - Size: 16777216 kB (16.00 GB) - VmFlags: mr mw me dd sd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants