Unit test TestDeviceManagerCreateRecoverySystemFinalizeErrsWhenSystemFailed flaky

Bug #1952647 reported by Ian Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Fix Released
Medium
Unassigned

Bug Description

Sometimes we see this fail on 14.04:

AppArmor status: apparmor is enabled and all features are available
panic: test timed out after 5m0s

goroutine 1905 [running]:
testing.(*M).startAlarm.func1()
 /usr/lib/go-1.13/src/testing/testing.go:1377 +0xdf
created by time.goFunc
 /usr/lib/go-1.13/src/time/sleep.go:168 +0x44

goroutine 1 [chan receive, 5 minutes]:
testing.(*T).Run(0xc000106200, 0x118a0a0, 0x11, 0x125db08, 0x48db96)
 /usr/lib/go-1.13/src/testing/testing.go:961 +0x377
testing.runTests.func1(0xc000106100)
 /usr/lib/go-1.13/src/testing/testing.go:1202 +0x78
testing.tRunner(0xc000106100, 0xc00070bdc0)
 /usr/lib/go-1.13/src/testing/testing.go:909 +0xc9
testing.runTests(0xc00000e580, 0x1b7c130, 0x1, 0x1, 0x0)
 /usr/lib/go-1.13/src/testing/testing.go:1200 +0x2a7
testing.(*M).Run(0xc0000e2400, 0x0)
 /usr/lib/go-1.13/src/testing/testing.go:1117 +0x176
main.main()
 _testmain.go:46 +0x135

goroutine 14 [chan receive, 4 minutes]:
gopkg.in/check%2ev1.(*suiteRunner).runTest(...)
 /<email address hidden>/check.go:813
gopkg.in/check%2ev1.(*suiteRunner).run(0xc000578080, 0xc0000f82a0)
 /<email address hidden>/check.go:618 +0x11d
gopkg.in/check%2ev1.Run(0x1154440, 0xc0000f82a0, 0xc0000fbf08, 0xc000516000)
 /<email address hidden>/run.go:92 +0x4d
gopkg.in/check%2ev1.RunAll(0xc000065f08, 0x0)
 /<email address hidden>/run.go:84 +0x96
gopkg.in/check%2ev1.TestingT(0xc000106200)
 /<email address hidden>/run.go:72 +0x395
github.com/snapcore/snapd/overlord/devicestate_test.TestDeviceManager(0xc000106200)
 /tmp/static-unit-tests/src/github.com/snapcore/snapd/overlord/devicestate/devicestate_test.go:75 +0x2b
testing.tRunner(0xc000106200, 0x125db08)
 /usr/lib/go-1.13/src/testing/testing.go:909 +0xc9
created by testing.(*T).Run
 /usr/lib/go-1.13/src/testing/testing.go:960 +0x350

goroutine 1876 [select, 4 minutes]:
gopkg.in/check%2ev1.(*resultTracker)._loopRoutine(0xc0005161b0)
 /<email address hidden>/check.go:464 +0xc4
created by gopkg.in/check%2ev1.(*resultTracker).start
 /<email address hidden>/check.go:444 +0x3f

goroutine 1904 [semacquire, 4 minutes]:
sync.runtime_SemacquireMutex(0xc0001c50a4, 0x0, 0x1)
 /usr/lib/go-1.13/src/runtime/sema.go:71 +0x47
sync.(*Mutex).lockSlow(0xc0001c50a0)
 /usr/lib/go-1.13/src/sync/mutex.go:138 +0xfc
sync.(*Mutex).Lock(...)
 /usr/lib/go-1.13/src/sync/mutex.go:81
github.com/snapcore/snapd/overlord/state.(*State).Lock(0xc0001c50a0)
 /tmp/static-unit-tests/src/github.com/snapcore/snapd/overlord/state/state.go:122 +0x4c
github.com/snapcore/snapd/overlord/devicestate_test.(*deviceMgrBaseSuite).SetUpTest.func5()
 /tmp/static-unit-tests/src/github.com/snapcore/snapd/overlord/devicestate/devicestate_test.go:194 +0x37
github.com/snapcore/snapd/testutil.(*BaseTest).TearDownTest(0xc0000f82a0, 0xc0000ee000)
 /tmp/static-unit-tests/src/github.com/snapcore/snapd/testutil/base.go:47 +0x41
reflect.Value.call(0x1154440, 0xc0000f82a0, 0xa13, 0x117c93f, 0x4, 0xc000061f30, 0x1, 0x1, 0x1bb1ac0, 0xc0003e6e90, ...)
 /usr/lib/go-1.13/src/reflect/value.go:460 +0x5f6
reflect.Value.Call(0x1154440, 0xc0000f82a0, 0xa13, 0xc0003e6f30, 0x1, 0x1, 0xc0001c5110, 0xc0003e6f58, 0xc0003de180)
 /usr/lib/go-1.13/src/reflect/value.go:321 +0xb4
gopkg.in/check%2ev1.(*suiteRunner).runFixture.func1(0xc0000ee000)
 /<email address hidden>/check.go:724 +0x16d
gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1(0xc000578080, 0xc0000ee000, 0x125e300)
 /<email address hidden>/check.go:669 +0xa2
created by gopkg.in/check%2ev1.(*suiteRunner).forkCall
 /<email address hidden>/check.go:666 +0x1fb

goroutine 1891 [chan receive, 4 minutes]:
gopkg.in/check%2ev1.(*suiteRunner).runFunc(...)
 /<email address hidden>/check.go:677
gopkg.in/check%2ev1.(*suiteRunner).runFixture(0xc000578080, 0xc0001c41c0, 0xc000411020, 0x5d, 0x0, 0xc0001bd2b8)
 /<email address hidden>/check.go:720 +0x92
gopkg.in/check%2ev1.(*suiteRunner).runFixtureWithPanic(0xc000578080, 0xc0001c41c0, 0xc000411020, 0x5d, 0x0, 0xc0001bde2f, 0xc000067630)
 /<email address hidden>/check.go:738 +0x6a
runtime.Goexit()
 /usr/lib/go-1.13/src/runtime/panic.go:563 +0xec
gopkg.in/check%2ev1.(*C).stopNow(...)
 /<email address hidden>/check.go:106
gopkg.in/check%2ev1.(*C).Assert(0xc0000ee3c0, 0x100b940, 0xc00050fbe0, 0x13e68a0, 0x1b78888, 0x0, 0x0, 0x0)
 /<email address hidden>/helpers.go:176 +0xb0
github.com/snapcore/snapd/seed/seedtest.ValidateSeed(0xc0000ee3c0, 0xc000455590, 0x2a, 0x117c893, 0x4, 0x1, 0xc0002e68e0, 0x2, 0x2, 0x6, ...)
 /tmp/static-unit-tests/src/github.com/snapcore/snapd/seed/seedtest/seedtest.go:364 +0x307
github.com/snapcore/snapd/overlord/devicestate_test.validateCore20Seed(0xc0000ee3c0, 0x117c893, 0x4, 0xc0003b8fc0, 0xc0002e68e0, 0x2, 0x2, 0x0, 0x0, 0x0)
 /tmp/static-unit-tests/src/github.com/snapcore/snapd/overlord/devicestate/systems_test.go:123 +0x9e
github.com/snapcore/snapd/overlord/devicestate_test.(*deviceMgrSystemsCreateSuite).TestDeviceManagerCreateRecoverySystemFinalizeErrsWhenSystemFailed(0xc0000f82a0, 0xc0000ee3c0)
 /tmp/static-unit-tests/src/github.com/snapcore/snapd/overlord/devicestate/devicestate_systems_test.go:1863 +0x689
reflect.Value.call(0x1154440, 0xc0000f82a0, 0x1213, 0x117c93f, 0x4, 0xc000063f30, 0x1, 0x1, 0x1bb1ac0, 0xc000063dd0, ...)
 /usr/lib/go-1.13/src/reflect/value.go:460 +0x5f6
reflect.Value.Call(0x1154440, 0xc0000f82a0, 0x1213, 0xc000063f30, 0x1, 0x1, 0xc0000ee4b0, 0x4c7a94, 0x1154440)
 /usr/lib/go-1.13/src/reflect/value.go:321 +0xb4
gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1(0xc0000ee3c0)
 /<email address hidden>/check.go:775 +0x5e4
gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1(0xc000578080, 0xc0000ee3c0, 0xc0002e64a0)
 /<email address hidden>/check.go:669 +0xa2
created by gopkg.in/check%2ev1.(*suiteRunner).forkCall
 /<email address hidden>/check.go:666 +0x1fb

Full log @ https://pastebin.ubuntu.com/p/VYjd3Cmqp9/

Tags: flaky-tests
tags: added: flaky-tests
Changed in snapd:
status: New → Fix Released
importance: Undecided → Medium
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.