Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14925

Memory continusely increase

From jake <chen.liu.opensource@gmail.com>
Newsgroups gnu.bash.bug
Subject Memory continusely increase
Date 2018-12-18 23:10 -0700
Message-ID <mailman.5936.1545230749.1284.bug-bash@gnu.org> (permalink)

Show all headers | View raw


Hi all,

I did a test about run a bash scriplt never quit,but met a memory usage
issue that cause used memory continuous increase.
This issue was present in bash-3.2.x, bash-4.0.x, bash-4.1.x, bash-4.2.x,
bash-4.3.x. However, This issue was disappeared in bash-4.4.0, I can't trace
which patch fixed the issue or which new feature was introduced in
bash-4.4.0.

Here is bash script:
------------------------------------------------------------------------------
#!/bin/bash

logger "Started testing"
while(true);do 
 while (true); do 
   ls > /dev/null 
 done
done
-------------------------------------------------------------------------------
root@localhost:/root> cat /proc/767/smaps |grep -A10 heap
01ba5000-01be8000 rw-p 00000000 00:00 0                                 
[heap]
Size:                268 kB
Rss:                 152 kB
Pss:                 152 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:       152 kB
Referenced:          152 kB
Swap:                  0 kB
KernelPageSize:        4 kB
----------------------------------------------------------------------------------
root@localhost:/root> cat /proc/767/smaps |grep -A10 heap
00d4c000-00e55000 rw-p 00000000 00:00 0                                 
[heap]
Size:               1060 kB
Rss:                1048 kB
Pss:                1048 kB
Shared_Clean:          0 kB
Shared_Dirty:          0 kB
Private_Clean:         0 kB
Private_Dirty:      1048 kB
Referenced:         1048 kB
Swap:                  0 kB
KernelPageSize:        4 kB
----------------------------------------------------------------------------------
Could someone help to tell me which part of changes in bash-4.4.0, that
would be give me a direction backport code changes from bash-4.4 to
bash-3.2.x and bash-4.3.x.

Thanks,
Chen.



--
Sent from: http://gnu-bash.2382.n7.nabble.com/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Memory continusely increase jake <chen.liu.opensource@gmail.com> - 2018-12-18 23:10 -0700

csiph-web