[cfe-dev] Question about Clang/LLVM addresssanitizer

ZhaoKang via cfe-dev cfe-dev at lists.llvm.org
Wed Sep 21 22:12:42 PDT 2016


Hello James,

 

Yes, the failed VM's 'cat /proc/sys/vm/overcommit_memory' is exactly 2, but the correct VM's is also 2. And I dump the memory and disk below:

 

Failed one:

fangqing@[xhdengvm155043 kcc_case]$ cat /proc/sys/vm/overcommit_memory

2

 

fangqing@[xhdengvm155043 kcc_case]$ top

top - 10:23:42 up 8 days, 11:12,  5 users,  load average: 0.07, 0.02, 0.00

Tasks: 120 total,   1 running, 119 sleeping,   0 stopped,   0 zombie

Cpu(s):  1.2%us,  0.0%sy,  0.0%ni, 98.8%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

Mem:   5993176k total,  1598600k used,  4394576k free,   245492k buffers

Swap:  4128760k total,        0k used,  4128760k free,   864412k cached

 

fangqing@[xhdengvm155043 kcc_case]$ df -h .

Filesystem            Size  Used Avail Use% Mounted on

svmitfiler2-lif1:/Home/Home_xbj/fangqing

                      6.2T  4.7T  1.5T  76% /home/Fangqing

 

Correct one:

fangqing@[xhdvdieodvm102 local]$ cat /proc/sys/vm/overcommit_memory

2

 

fangqing@[xhdvdieodvm102 local]$ top

top - 10:16:52 up 36 days, 21:47, 50 users,  load average: 2.51, 2.68, 2.70

Tasks: 357 total,   4 running, 351 sleeping,   1 stopped,   1 zombie

Cpu(s): 99.7%us,  0.3%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st

Mem:  16436116k total, 16347972k used,    88144k free,    38592k buffers

Swap: 32767992k total,  2364888k used, 30403104k free, 14688384k cached

 

fangqing@[xhdvdieodvm102 kcc_case]$ df -h .

Filesystem            Size  Used Avail Use% Mounted on

svmitfiler2-lif1:/Home/Home_xbj/fangqing

                      6.2T  4.7T  1.5T  76% /home/Fangqing

 

So why?

Thanks a lot!


> -----原始邮件-----
> 发件人: "James Knight" <jyknight at google.com>
> 发送时间: 2016-09-22 11:23:07 (星期四)
> 收件人: ZhaoKang <zhaokang at mail.tsinghua.edu.cn>, "ZhaoKang via cfe-dev" <cfe-dev at lists.llvm.org>
> 抄送: "Kostya Serebryany" <kcc at google.com>
> 主题: Re: [cfe-dev] Question about Clang/LLVM addresssanitizer
> 
> 
> > On Sep 20, 2016, at 9:47 PM, ZhaoKang via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> > 
> > You mentioned that 'Some global settings in the system may for some reason reject such huge mappings.'
> > And I want to know which kinds of settings may have this effect?
> 
> cat /proc/sys/vm/overcommit_memory on your system.
> 
> The default value is 0, which means allow overcommit heuristically when it seems likely to work. 
> 
> If, however, your system has that set to 2 (which I'm guessing it does), linux will ignore the MAP_NORESERVE flag, and *always* demands you have enough ram and swap to hold everything that might ever possibly be written.
> 
> In that case, either set it back to 0, or else add 16TB or so of swapspace to your system.
> 
> Almost nobody ever sets that option to 2, because it's almost completely useless to do so, and just breaks stuff. :)



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160922/cac7f4fb/attachment.html>


More information about the cfe-dev mailing list