uniterV0Suite.TearDownTest: The handle is invalid

Bug #1566303 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Invalid
Undecided
Unassigned
1.25
Fix Released
Critical
Dave Cheney

Bug Description

As seen in
    http://reports.vapour.ws/releases/issue/5703b849749a5655fcd11d18

uniterV0Suite.TearDownTest: The handle is invalid

c:/users/admini~1/appdata/local/temp/tmpergcf4/gogo/src/github.com/juju/juju/testing/base_windows.go:50:
    c.Assert(err, jc.ErrorIsNil)
... value syscall.Errno = 0x6 ("The handle is invalid.")

This issue was consistently seen in windows unit tests. This is the first failure. What ever went wrong in the test topples many other tests.

Curtis Hovey (sinzui)
Changed in juju-core:
status: Triaged → Incomplete
Curtis Hovey (sinzui)
description: updated
tags: added: blocker
Revision history for this message
Dave Cheney (dave-cheney) wrote :

The underlying cause is the feature tests run in parallel, and all try to mutate one registry key.

The logic is roughly

program A creates registry key (as it doesn't exist), and records the fact that it must _delete_ the registry key.
program B trys to create a registry key, finds that it already exists, so it records the old value, then updates it, and makes a not to restore the old value.
program A deletes the registry key, as when it started the key did not exist, so it's behaviour is to remove the key.
Program b trys to restore the state of the existing key, and finds the key deleted.
Test fails.

This pattern is unsafe, we have to rewrite it to not use a singleton registry key.

Revision history for this message
Martin Packman (gz) wrote :

CI just tested rev c1d1428e348275b05c3fac38538249e00a779c4a which includes the changes made in:

https://github.com/juju/juju/pull/5043

The test still fails, with a different but not much more useful error:

<http://reports.vapour.ws/releases/3879/job/run-unit-tests-win2012-amd64/attempt/2243>

FAIL: package_test.go:1: uniterV0Suite.TearDownTest

c:/users/admini~1/appdata/local/temp/tmpacbnl8/gogo/src/github.com/juju/juju/testing/base_windows.go:72:
    c.Assert(err, jc.ErrorIsNil)
... value syscall.Errno = 0x2 ("The system cannot find the file specified.")

Revision history for this message
Martin Packman (gz) wrote :

Looks like the actual fix is just waiting to land still:

<https://github.com/juju/juju/pull/5062>

Curtis Hovey (sinzui)
Changed in juju-core:
status: Incomplete → Invalid
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.