Python process continuously doing epoll in introspect code

Bug #1584160 reported by Sachin Bansal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.0
Fix Committed
High
Sundaresan Rajangam
R3.1
Fix Committed
High
Sundaresan Rajangam
Trunk
Fix Committed
High
Sundaresan Rajangam

Bug Description

root@nodeb2:/var/log/contrail# ps -aux | grep contrail-schema
contrail 8268 0.1 0.0 207996 50820 ? Sl May18 0:48 /usr/bin/python /usr/bin/contrail-schema --conf_file /etc/contrail/contrail-schema.conf --conf_file /etc/contrail/contrail-keystone-auth.conf --conf_file /etc/contrail/contrail-database.conf
root 16210 0.0 0.0 10464 932 pts/14 S+ 04:25 0:00 grep --color=auto contrail-schema
root@nodeb2:/var/log/contrail# strace -p 8268
Process 8268 attached
epoll_wait(4, {}, 64, 290) = 0
epoll_wait(4, {}, 64, 1) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=12, u64=176093659148}}) = -1 EEXIST (File exists)
epoll_wait(4, {}, 64, 499) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=12, u64=176093659148}}) = -1 EEXIST (File exists)
epoll_wait(4, {}, 64, 499) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=12, u64=176093659148}}) = -1 EEXIST (File exists)
epoll_wait(4, {}, 64, 499) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=12, u64=176093659148}}) = -1 EEXIST (File exists)
epoll_wait(4, {}, 64, 499) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=12, u64=176093659148}}) = -1 EEXIST (File exists)
epoll_wait(4, {}, 64, 499) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=12, u64=176093659148}}) = -1 EEXIST (File exists)
epoll_wait(4, {}, 64, 499) = 0
epoll_ctl(4, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=12, u64=176093659148}}) = -1 EEXIST (File exists)
epoll_wait(4, {}, 64, 113) = 0
epoll_wait(4, {}, 64, 1) = 0

Jeba Paulaiyan (jebap)
tags: added: config
information type: Proprietary → Public
Raj Reddy (rajreddy)
tags: added: analytics
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/24716
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/24718
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/24716
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/24718
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/24716
Committed: http://github.org/Juniper/contrail-sandesh/commit/8a0b129e482cfba1801ca92b4f36dd736c2bfe41
Submitter: Zuul
Branch: master

commit 8a0b129e482cfba1801ca92b4f36dd736c2bfe41
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Oct 6 00:45:15 2016 -0700

Use gevent.WSGIServer for http introspect

Presently, pysandesh uses WSGIServer defined in wsgiref.simple_server
for http introspect, whose poll_interval is 0.5 seconds by default.
The poll_interval is used to check for server shutdown. Therefore, if
the poll_interval is set to None, it requires external trigger such as
connection to the socket to wakeup the select loop. Polling reduces the
responsiveness and wastes cpu cycle. Use gevent.WSGIServer for
http introspect to avoid the polling issue.

Change-Id: Ic8cf8ec815c422be0d65e77247c67e7002bc91ad
Closes-Bug: #1584160

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/24718
Committed: http://github.org/Juniper/contrail-sandesh/commit/d5b954786dd7fbb92e629032f3ce8f1872f43387
Submitter: Zuul
Branch: R3.1

commit d5b954786dd7fbb92e629032f3ce8f1872f43387
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Oct 6 00:45:15 2016 -0700

Use gevent.WSGIServer for http introspect

Presently, pysandesh uses WSGIServer defined in wsgiref.simple_server
for http introspect, whose poll_interval is 0.5 seconds by default.
The poll_interval is used to check for server shutdown. Therefore, if
the poll_interval is set to None, it requires external trigger such as
connection to the socket to wakeup the select loop. Polling reduces the
responsiveness and wastes cpu cycle. Use gevent.WSGIServer for
http introspect to avoid the polling issue.

Change-Id: Ic8cf8ec815c422be0d65e77247c67e7002bc91ad
Closes-Bug: #1584160
(cherry picked from commit 8a0b129e482cfba1801ca92b4f36dd736c2bfe41)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.0

Review in progress for https://review.opencontrail.org/24773
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/24773
Committed: http://github.org/Juniper/contrail-sandesh/commit/a661ecab988f136c507fdf96de2d9a2650070a54
Submitter: Zuul
Branch: R3.0

commit a661ecab988f136c507fdf96de2d9a2650070a54
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Oct 6 00:45:15 2016 -0700

Use gevent.WSGIServer for http introspect

Presently, pysandesh uses WSGIServer defined in wsgiref.simple_server
for http introspect, whose poll_interval is 0.5 seconds by default.
The poll_interval is used to check for server shutdown. Therefore, if
the poll_interval is set to None, it requires external trigger such as
connection to the socket to wakeup the select loop. Polling reduces the
responsiveness and wastes cpu cycle. Use gevent.WSGIServer for
http introspect to avoid the polling issue.

Change-Id: Ic8cf8ec815c422be0d65e77247c67e7002bc91ad
Closes-Bug: #1584160
(cherry picked from commit 8a0b129e482cfba1801ca92b4f36dd736c2bfe41)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.