unit test intermittent failure

Bug #1519160 reported by Armando Migliaccio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Hong Hui Xiao
Changed in neutron:
status: New → Confirmed
tags: added: gate-failure
tags: added: unittest
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Wonder if this is the culprit:

https://review.openstack.org/#/c/234770

Revision history for this message
Hong Hui Xiao (xiaohhui) wrote :

I scan the code and think it might be caused by the following reason.

The _wait_process is blocked by other GreenThreads(too many threads for the test machine) . So, when the failing_process exit, the _wait_process is still not be executed. Therefore, the call_count is 0.

I can simulate the error by using spawn_after at [1]. I will propose a patch to address this problem.

[1] https://github.com/openstack/neutron/blob/master/neutron/agent/linux/async_process.py#L148

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/249232

Changed in neutron:
assignee: nobody → Hong Hui Xiao (xiaohhui)
status: Confirmed → In Progress
Revision history for this message
John Schwarz (jschwarz) wrote :

I can confirm the culprit is the patchset Armando linked to. Lets merge Hong's patch to see if it fixes the errors.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/249232
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=dcd0498c17ae860c55a92f9f31b3e3fa0460b78e
Submitter: Jenkins
Branch: master

commit dcd0498c17ae860c55a92f9f31b3e3fa0460b78e
Author: Hong Hui Xiao <email address hidden>
Date: Tue Nov 24 09:01:48 2015 -0500

    Wait for the watch process in test case

    Because the _watch_process and the failing_process are asynchronous,
    there might be a chance that failing_process exit and _watch_process
    is not executed.

    If the _watch_process is blocked, the method that will be asserted
    will not be called. This will fail the UT, but it is intermittent.

    Change-Id: Ic951c1b91c5a10462f548544a5e8d482c52ad665
    Closes-Bug: #1519160

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b1

This issue was fixed in the openstack/neutron 8.0.0.0b1 development milestone.

Changed in neutron:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/277347

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/liberty)

Reviewed: https://review.openstack.org/277347
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=306636e64dc884484aad772dd6994299d30c2a06
Submitter: Jenkins
Branch: stable/liberty

commit 306636e64dc884484aad772dd6994299d30c2a06
Author: Hong Hui Xiao <email address hidden>
Date: Tue Nov 24 09:01:48 2015 -0500

    Wait for the watch process in test case

    Because the _watch_process and the failing_process are asynchronous,
    there might be a chance that failing_process exit and _watch_process
    is not executed.

    If the _watch_process is blocked, the method that will be asserted
    will not be called. This will fail the UT, but it is intermittent.

    Change-Id: Ic951c1b91c5a10462f548544a5e8d482c52ad665
    Closes-Bug: #1519160
    Related-Bug: #1543040
    Related Bug: #1506021
    (cherry picked from commit dcd0498c17ae860c55a92f9f31b3e3fa0460b78e)

tags: added: in-stable-liberty
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.0.4

This issue was fixed in the openstack/neutron 7.0.4 release.

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.