processutils.execute causes high CPU usage under eventlet

Bug #1444899 reported by YAMADA Hideki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.concurrency
Confirmed
Undecided
Unassigned

Bug Description

It happens when processutils.execute has large stdin data.

We can reproduce the bug with this code snippet:

---
import eventlet
eventlet.monkey_patch()

from oslo_concurrency import processutils

# 100MB data
data = '0123456789' * 10 * 1024 * 1024
processutils.execute('cat', process_input=data)
---

The result is:

---
$ time python /tmp/test.py

real 0m14.839s
user 0m12.614s
sys 0m5.145s
---

And 100% CPU usage while running.

Without eventlet:

---
$ time python /tmp/test.py

real 0m0.367s
user 0m0.208s
sys 0m0.335s
---

Changed in oslo.concurrency:
status: New → Confirmed
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.