Bug 1723597 - [OSP14] Memory leak in Pyroute2
Summary: [OSP14] Memory leak in Pyroute2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-pyroute2
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: zstream
: 14.0 (Rocky)
Assignee: Rodolfo Alonso
QA Contact: Candido Campos
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-24 22:39 UTC by Candido Campos
Modified: 2019-09-03 15:22 UTC (History)
9 users (show)

Fixed In Version: python-pyroute2-0.5.2-3.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1728188 (view as bug list)
Environment:
Last Closed: 2019-09-03 15:22:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
logs l3 agent privsep-helper logs (238.39 KB, application/gzip)
2019-06-27 00:01 UTC, Candido Campos
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 668676 0 'None' 'ABANDONED' '[WIP] Bump Pyroute2 version to 0.5.2' 2019-12-03 06:19:33 UTC
RDO 21323 0 None None None 2019-07-09 08:06:26 UTC
Red Hat Product Errata RHBA-2019:2619 0 None None None 2019-09-03 15:22:17 UTC

Internal Links: 1487766

Description Candido Campos 2019-06-24 22:39:43 UTC
Description of problem:
Memory leak in privsep-helper(neutron agents) when create/destroy action are executed.



Version-Release number of selected component (if applicable):


How reproducible:
(overcloud) [stack@undercloud-0 ~]$ cat core_puddle_version 
2019-06-10.3(overcloud) [stack@undercloud-0 ~]$ cat /etc/rhosp-release 
Red Hat OpenStack Platform release 14.0.3 RC (Rocky)


Steps to Reproduce:
1. Deploy Osp 14
2.create the next scripts:
(overcloud) [stack@undercloud-0 ~]$ cat create2.sh 
set -x

ips=(0 10.0.0.215 10.0.0.249 10.0.0.223 10.0.0.222 10.0.0.218 10.0.0.247 10.0.0.210 10.0.0.220 10.0.0.246 10.0.0.213 10.0.0.224 10.0.0.212 10.0.0.217 10.0.0.221 10.0.0.216)
ips=(0 10.0.0.220 10.0.0.216 10.0.0.235 10.0.0.232 10.0.0.245 10.0.0.226 10.0.0.217 10.0.0.211 10.0.0.221 10.0.0.230 10.0.0.248 10.0.0.228 10.0.0.223 10.0.0.212 10.0.0.225)
openstack network create net_$1
openstack subnet create --network net_$1  --dns-nameserver 10.0.0.1 --gateway 10.$1.0.1  --subnet-range 10.$1.0.0/16 net_$1
openstack router create router_$1
openstack router add subnet router_$1 net_$1
#openstack router set router_$1 --external-gateway public

#openstack server create --flavor cirros --image cirros   --nic net-id=net$1 --security-group test --key-name mykey vm$1

#openstack server add floating ip vm$1 ${ips[$1]}

#ping ${ips[$1]} -c 10
(overcloud) [stack@undercloud-0 ~]$ cat delete2.sh

#openstack server delete vm$1
openstack router remove subnet router_$1 net_$1 
openstack network delete net_$1
openstack router delete router_$1


 

3. Execute:


for j in $(seq 1 10); do for i in  $(seq 1 10) ; do ./create2.sh $i ; done ; for i in  $(seq 1 10) ; do ./delete2.sh $i ; done ;echo "####LOOP $j ####" ;done

Chech the memory usage of the privsep-helper in the controllers:

[root@controller-1 heat-admin]# top -c -p 125052 -p 278912

top - 22:37:22 up 9 days,  4:59,  1 user,  load average: 4.45, 3.71, 3.77
Tasks:   2 total,   0 running,   2 sleeping,   0 stopped,   0 zombie
%Cpu(s): 19.8 us,  4.1 sy,  0.0 ni, 75.2 id,  0.0 wa,  0.0 hi,  0.8 si,  0.0 st
KiB Mem : 32779936 total,  3150768 free, 16209200 used, 13419968 buff/cache
KiB Swap:        0 total,        0 free,        0 used. 15146444 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                                                      
 125052 root      20   0 2497576   2.2g   2468 S   0.0  7.2  76:06.44 /usr/bin/python2 /bin/privsep-helper --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-fi+ 
 278912 root      20   0 1048908 897004   2468 S   0.0  2.7  13:55.34 /usr/bin/python2 /bin/privsep-helper --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-fi+ 

The important colunm is RES

Actual results:

Memory usage increases in every loop.

Expected results:

Memory usage should be stable


Additional info:

Comment 3 Candido Campos 2019-06-27 00:01:13 UTC
Created attachment 1584990 [details]
logs l3 agent privsep-helper logs

Comment 11 Alfredo Moralejo 2019-07-09 08:06:27 UTC
python-pyroute2 has been bumped in RDO Rocky in https://review.rdoproject.org/r/#/c/21323/

Comment 23 errata-xmlrpc 2019-09-03 15:22:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2619


Note You need to log in before you can comment on or make changes to this bug.