Wind River Support Network

HomeDefectsLIN7-7542
Fixed

LIN7-7542 : memory increasing when looping in shell script

Created: Feb 22, 2017    Updated: Sep 8, 2018
Resolved Date: Mar 3, 2017
Found In Version: 7.0.0.22
Fix Version: 7.0.0.23
Severity: Standard
Applicable for: Wind River Linux 7
Component/s: Userspace

Description

Increase of memory usage by running bash script.

Steps to Reproduce

1. Use a WRL 5 plaform project and boot up a target

2. Use the following script on the target to reproduce the issue:
#!/bin/bash
while [ 1 ];
do
        prompt="hello:";
        read -e -n 500 -p "$prompt " command;
        echo $command;
done

3. Use the attached InputData.txt file. Copy paste the content of InputData.txt file while script from step 2 is running. Please see below example:
root@localhost:~# ./script.sh
hello: {}]Wo{]Wuk[u}}o_]{Core,bin,dev,e{w{_om}{Core,bin,dev,e{tc,xport},gep3_firmware,home,l{ib{,64},ogs},m{edia,nt},opt,proc,root{,_fs_from},s{bin,ys},tmp,usr,}k{Core,bin,dev,e{tc,xport
... trimmed output ...

4. In a different console( e.g.: ssh console) run the following command in order to observe memory:
top -b | grep script.sh

5. In order to see the memory value increasing repeat the copy paste several times while the script from step 2 is running (please find attached my top.log file)

Other Downloads


Live chat
Online