RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 958868 - Downstream added "timeout=None" keyword argument causes regression in eventlet
Summary: Downstream added "timeout=None" keyword argument causes regression in eventlet
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python
Version: 6.4
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: 6.5
Assignee: Bohuslav "Slavek" Kabrda
QA Contact: Jan Kepler
URL:
Whiteboard:
: 958867 (view as bug list)
Depends On:
Blocks: 966991
TreeView+ depends on / blocked
 
Reported: 2013-05-02 14:51 UTC by Mark McLoughlin
Modified: 2013-11-21 09:14 UTC (History)
12 users (show)

Fixed In Version: python-2.6.6-37.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-21 09:14:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1582 0 normal SHIPPED_LIVE Moderate: python security, bug fix, and enhancement update 2013-11-20 21:39:43 UTC

Description Mark McLoughlin 2013-05-02 14:51:32 UTC
The summary refers to the OpenStack community's perception of RHEL6 because of the issue described below.

   1) We backported a patch to RHEL6 from Python 3 which added an
      optional 'timeout' argument to subprocess.Popen:
 
         http://pkgs.devel.redhat.com/cgit/rpms/python/commit/?h=rhel-6.3&id=fc9a3f0e07

      This might sound innocuous but it means the wait() function get 
      called with a timeout argument
 
   2) eventlet overrides this function, but doesn't know about the 
      timeout argument, so it fails
 
   3) eventlet doesn't yet support Python 3, so the only time this issue 
      crops up is if you use eventlet on RHEL6
 
   4) We've fixed eventlet in EPEL6, but the issue still remains if you 
      install eventlet from upstream
 
   5) When OpenStack runs CI tests on RHEL, it does indeed install 
      eventlet from upstream and has to manually patch eventlet with 
      this tiny patch

You can see how this issue continually rears its head:

  https://review.openstack.org/28014
  http://lists.openstack.org/pipermail/openstack-dev/2013-May/008459.html
  https://review.openstack.org/28020
  https://review.openstack.org/28021
  https://review.openstack.org/28022
  https://review.openstack.org/28024
  https://review.openstack.org/28025

Since the issue is about upstream's CI which uses eventlet from pypi, rather than installing a python-eventlet package ... one way of resolving this issue is fixing eventlet upstream:

  https://bitbucket.org/eventlet/eventlet/pull-request/30/add-dummy-timeout-parameter-to/diff

It seems perfectly doable to me that we could get a workaround patch into eventlet, but the RHEL python maintainers seem more keen to expedite a fix for python itself in RHEL

The RHEL patch would be along the lines of:

 -        sts = self.wait(timeout=self._remaining_time(endtime))
 +        if 'timeout' in self.wait.func_code.co_varnames:
 +            sts = self.wait(timeout=self._remaining_time(endtime))
 +        else:
 +            self.wait()

Comment 1 Dave Malcolm 2013-05-02 14:54:37 UTC
(In reply to comment #0)
> It seems perfectly doable to me that we could get a workaround patch into
> eventlet, but the RHEL python maintainers seem more keen to expedite a fix
> for python itself in RHEL
We have commit rights to RHEL

Comment 2 Mark McLoughlin 2013-05-02 14:55:36 UTC
*** Bug 958867 has been marked as a duplicate of this bug. ***

Comment 4 Dave Malcolm 2013-05-02 15:04:07 UTC
(In reply to comment #2)
> *** Bug 958867 has been marked as a duplicate of this bug. ***

Note that bug 958867 has a minimal reproducer for this behavior.

That said, testing for this bug should include the case of using upstream eventlet.

Comment 7 Bohuslav "Slavek" Kabrda 2013-05-03 13:50:56 UTC
I can confirm that we can fix this issue in RHEL 6.
This is a regression on side of RHEL, so it makes perfect sense to fix it there, rather then pushing RHEL-specific patch into upstream eventlet.

Comment 11 Zane Bitter 2013-05-08 14:14:59 UTC
It would probably be wise to also remove the subprocess_timeout.patch fix from python-eventlet in RHEL 6.5. That would ensure that any code using a combination of eventlet and timeouts will fail immediately even with RHEL's packaged eventlet. With both patches in, eventlet will just silently ignore the timeout parameter and wait forever if anybody attempts to use it with timeouts.

Comment 12 Bohuslav "Slavek" Kabrda 2013-05-09 07:29:40 UTC
It doesn't seem we have eventlet in rhel 6, isn't it in epel?
Anyway, I don't see why we should make this fail. Why would timeout get ignored with both patches in? The Python patch only ignores timeout if it wasn't used by calling function.

Comment 13 Zane Bitter 2013-05-13 10:42:33 UTC
Sorry, my mistake. s/RHEL/EPEL/

We don't want to create a situation where timeouts appear to work, but do nothing. If a user monkey-patches with EPEL python-eventlet and then requests a wait with timeout, then no error will occur, but the wait will never time out. Users will likely regard this (correctly, IMHO) as a bug. Attempting this should raise an error, because it is not supported - eventlet does not have timeouts. Therefore eventlet should not accept and ignore a non-None timeout parameter.

Comment 17 Mark McLoughlin 2013-06-05 20:20:57 UTC
It looks like eventlet upstream are going to go ahead and add a workaround for this bug: https://github.com/eventlet/eventlet/pull/34

Comment 20 errata-xmlrpc 2013-11-21 09:14:43 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.

http://rhn.redhat.com/errata/RHSA-2013-1582.html


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