Memory leak in Unity desktop - JetPack 2.2.1

Hy everyone,

We recently upgraded to JetPack 2.2.1 and realized there is a memory leak in the Ubuntu windows management. It is so strange to describe that I recorded a short video to show it live.
You can download the video at this link https://we.tl/p6g6bYiqbA (the link will expire on 5 September, I can repost it afterwards if needed)
Basically what happens is that every time I switch the focus from one application to another one, for example by pressing ALT+TAB, the overall memory used by the system increases by roughly 25MB each time.
This means that just by going from one application to another 10 times the memory grows by 250MB. This rapidly leads to have the full memory of the device completely occupied and the system crashes.
When the RAM usage is over 3.4GB then all applications crashes by segfault, both our own application and the GIE samples provided, therefore we have to restart the board like every hour of work or so. This is very annoing and I don’t know if the same problem may be triggered by other causes or what may happens when mounted on the robot.

The video shows the “System monitor” application measuring the RAM usage, but the tegrastats scripts give the same values. (The screen recorder is only used with the purpose of showing what happens, the behaviour is the same without it. The colors are fuzzy because I choose lowest recording quality).


When we realized this bug, we already installed a bunch of things… At the time present I cannot say if this bug will be present after a clean flash.
[url][/url]
The list of operation done on the Jetson after flashing Jetpack is roughly the following:

export ROBOT_CODE=/usr/local/src/robot

sudo mkdir -p $ROBOT_CODE
sudo chown $USER.$USER $ROBOT_CODE

sudo apt-get -y install libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get -y install --no-install-recommends libboost-all-dev
sudo apt-get -y install synaptic terminator git qgit git-gui cmake cmake-curses-gui synergy locate
sudo apt-get -y install libgflags-dev libgoogle-glog-dev liblmdb-dev
sudo apt-get -y install libace-dev libgsl0-dev libc6 python libncurses5-dev libsdl1.2-dev subversion gfortran libxmu-dev libode-dev wget unzip qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev libqt5svg5 freeglut3-dev libtinyxml-dev qtdeclarative5-qtquick2-plugin qtdeclarative5-window-plugin qtdeclarative5-qtmultimedia-plugin qtdeclarative5-controls-plugin qtdeclarative5-dialogs-plugin libgtkdataboxmm-dev libgoocanvasmm-dev qtdeclarative5-qtquick2-plugin qtdeclarative5-window-plugin qtdeclarative5-qtmultimedia-plugin qtdeclarative5-controls-plugin qtdeclarative5-dialogs-plugin libgtkdataboxmm-dev libgoocanvasmm-dev

cd $ROBOT_CODE
git clone GitHub - xianyi/OpenBLAS: OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.
git clone GitHub - robotology/yarp: YARP - Yet Another Robot Platform &
git clone GitHub - robotology/icub-main: The iCub Main Software Repository &
git clone GitHub - robotology/icub-contrib-common: Meta-package to configure contrib modules and libraries &

git clone GitHub - robotology/himrep: Hierarchical Image Representation &

git clone GitHub - robotology/segmentation: Components for image segmentation &

git clone GitHub - GiuliaP/onthefly-recognition: This demo allows to teach the iCub to visually recognize new objects "on the fly". &

cd OpenBLAS-0.2.18
make install PREFIX=./install

cd $ROBOT_CODE
cd caffe
mkdir build
cd buildLAS=Open

make install
make runtest &

Hi AlbertoCardellino,

The leak seems to be somewhere in the window manager or display software in L4T 24.1 64-bit, and we will have several memory leak fixes being included in the coming R24.2 release.

See similar topic:
[url]https://devtalk.nvidia.com/default/topic/948388/jetson-tx1/memory-leak-on-tx1-/post/4917624/#4917624[/url]

Thanks

Thank you very much for the update.
Please update me when the new release is ready, because we have a demo at the end of september with the TX1. It’ll be nice to have this fix.