How to increase the heap capacity

52 views
Skip to first unread message

Yuanzhou Yang

unread,
Jan 13, 2022, 12:31:44 AM1/13/22
to DynamoRIO Users
I have occurred an OOM issue when I am running my clients with some applications. And according to the output of -rstats_to_stderr and -debug -loglevel 1 it seems the Lib Dup reached 8G of heap. Is there any way to increase this heap memory limit? Here is the output of -rstats_to_stderr and -debug -loglevel 1.
2721641839491_.pic_hd.jpg
2761642051866_.pic_hd.jpg

kirill uhanov

unread,
Jan 13, 2022, 5:23:48 AM1/13/22
to DynamoRIO Users

Hi.
We had the same issues in our tools.
you could try to increase DynamoRIO code cache and heap sizes '-vm_size 2G -vmheap_size 32G'
But in real we had much more complex issue. We set some system settings on machine to exclude OOM issue
Also thread includes swap increasing suggestions or chnaging overcommit settings
Kirill 
четверг, 13 января 2022 г. в 08:31:44 UTC+3, yyan...@hawk.iit.edu:

Derek Bruening

unread,
Jan 13, 2022, 12:35:59 PM1/13/22
to dynamor...@googlegroups.com
For OOM please look carefully at the OOM message from DR as it contains codes which describe what kind of OOM it is.  Without knowing the kind, blindly increasing limits may not do anything.  Even once known, there are multiple types of limits that can lead to that failure (as Kirill pointed out).

For the heap, the initial reservation (8G by default for 64-bit) is *not* a hard limit and allocation will continue past that point (though there are possible performance issues: issue #2115), so unless the application is taking up all of the address space (it's possible for 32-bit) you are not going to see OOM involving the heap address space.  Thus, increasing -vmheap_size is probably not going to accomplish anything toward eliminating OOM.  You might see a commit limit hit on a heap allocation coming from system overcommit settings or mmap limits (again see Kirill's thread).

--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/eb3a5d56-ee16-48f2-a8b2-5f3659fd41c5n%40googlegroups.com.

Yuanzhou Yang

unread,
Jan 15, 2022, 12:56:39 PM1/15/22
to DynamoRIO Users

Hi Kirill,

Thanks for your suggestion. I have tried to change the vm_size, vmheap_size, and also the vm.max_map_count and it really works! Thanks again for your help!

Yuanzhou Yang

unread,
Jan 15, 2022, 1:04:25 PM1/15/22
to DynamoRIO Users

Hi Derek,

My OOM message is Out of memory.  Program aborted.  Source C, type 0x0000000000000001, code 0x000000000000000c.>. And now my problem is solved by Kirill's solutions. Thanks for your help anyway!

Derek Bruening

unread,
Jan 15, 2022, 3:32:30 PM1/15/22
to dynamor...@googlegroups.com
On Sat, Jan 15, 2022 at 1:04 PM 'Yuanzhou Yang' via DynamoRIO Users <dynamor...@googlegroups.com> wrote:

Hi Derek,

My OOM message is Out of memory.  Program aborted.  Source C, type 0x0000000000000001, code 0x000000000000000c.>. And now my problem is solved by Kirill's solutions. Thanks for your help anyway!

That's a *commit limit*, not a reservation limit, so increasing -vm_size or -vmheap_size are not going to help (and as already mentioned -vmheap_size is not relevant to 64-bit OOM).
I assume what you hit was the system max_map_count limit and increasing that is what solved it, not changing any DR options.
 

kirill uhanov

unread,
Jan 15, 2022, 4:24:29 PM1/15/22
to DynamoRIO Users
Glad to hear that our solution works for you too
Kirill
суббота, 15 января 2022 г. в 20:56:39 UTC+3, yyan...@hawk.iit.edu:

Yuanzhou Yang

unread,
Jan 15, 2022, 6:29:52 PM1/15/22
to DynamoRIO Users

Got it, it seems like I only need to change the max_map_count, thanks for your detailed explanation!
Reply all
Reply to author
Forward
0 new messages