Uncaught GreenletExit in ProcessLauncher if wait called after greenlet kill

Bug #1282206 reported by Carl Baldwin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
ChangBo Guo(gcb)
Icehouse
Fix Released
High
Matt Riedemann
neutron
Fix Released
Undecided
Unassigned
oslo-incubator
Fix Released
Undecided
Unassigned

Bug Description

I'm running wait in ProcessLauncher in a green thread. I attempted to kill the green thread and then call wait so that the process launcher object can reap its child processes cleanly. This resulted in a trace resulting from a GreenletExit exception being thrown.

The eventlet documentation states multiple times that GreenletExit is thrown after .kill() has been called to kill a thread. I think ProcessLauncher should expect this and deal with it.

Tags: oslo
Revision history for this message
Carl Baldwin (carl-baldwin) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/74831

Changed in neutron:
assignee: nobody → Carl Baldwin (carl-baldwin)
status: New → In Progress
Maru Newby (maru)
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo-incubator (master)

Reviewed: https://review.openstack.org/76380
Committed: https://git.openstack.org/cgit/openstack/oslo-incubator/commit/?id=a6fec438abe61d40fc4fb6907ea1fefd4dd93e22
Submitter: Jenkins
Branch: master

commit a6fec438abe61d40fc4fb6907ea1fefd4dd93e22
Author: Carl Baldwin <email address hidden>
Date: Tue Feb 25 22:28:10 2014 +0000

    Reap child processes gracefully if greenlet thread gets killed

    If ProcessLauncher is run from within a thread we should be able to
    call wait after the thread is killed to reap the child processes.
    Catching this exception and then proceeding to the cleanup phase
    accomplishes this.

    Closes-Bug: #1282206
    Change-Id: I9c863864c25c0478b720fc57cf0dccbe9bc9d9f6

Changed in oslo:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in oslo:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in oslo:
milestone: icehouse-3 → 2014.1
Revision history for this message
Matt Riedemann (mriedem) wrote :

This was never synced to any projects in Icehouse, the Neutron patch was abandoned.

Changed in neutron:
status: In Progress → New
assignee: Carl Baldwin (carl-baldwin) → nobody
tags: removed: havana-backport-potential
Revision history for this message
Matt Riedemann (mriedem) wrote :

Nova cherry pick to stable/icehouse here: https://review.openstack.org/#/c/94271/

Matt Riedemann (mriedem)
tags: added: oslo
Matt Riedemann (mriedem)
Changed in nova:
status: New → In Progress
assignee: nobody → Matt Riedemann (mriedem)
Revision history for this message
Alan Pevec (apevec) wrote :

Was this synced to trunk in Juno?

Changed in nova:
importance: Undecided → High
Revision history for this message
Matt Riedemann (mriedem) wrote :

@Alan, yeah it's in nova on master for Juno via this change: https://review.openstack.org/#/c/77267/

Changed in nova:
status: In Progress → Fix Committed
assignee: Matt Riedemann (mriedem) → ChangBo Guo(gcb) (glongwave)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/icehouse)

Reviewed: https://review.openstack.org/94271
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=705ad64518c76629b9bc7bfb42cb2974667bdf56
Submitter: Jenkins
Branch: stable/icehouse

commit 705ad64518c76629b9bc7bfb42cb2974667bdf56
Author: Carl Baldwin <email address hidden>
Date: Tue Feb 25 22:28:10 2014 +0000

    Reap child processes gracefully if greenlet thread gets killed

    If ProcessLauncher is run from within a thread we should be able to
    call wait after the thread is killed to reap the child processes.
    Catching this exception and then proceeding to the cleanup phase
    accomplishes this.

    Conflicts:
     nova/openstack/common/service.py

    Closes-Bug: #1282206
    Change-Id: I9c863864c25c0478b720fc57cf0dccbe9bc9d9f6
    (cherry picked from commit a6fec438abe61d40fc4fb6907ea1fefd4dd93e22)

Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-1 → 2014.2
Revision history for this message
Rossella Sblendido (rossella-o) wrote :

Fix for Neutron was released https://review.openstack.org/#/c/98259/

Changed in neutron:
status: New → Fix Released
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.