Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occasional hangs #1042

Open
dkfellows opened this issue Sep 11, 2023 · 0 comments
Open

Occasional hangs #1042

dkfellows opened this issue Sep 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@dkfellows
Copy link
Member

Sometimes, tests hang during the blacklist testing. I think it's in a test that validates whether we're doing the right thing above the part where it hits the real BMP. It only happens sometimes, and isn't easy to reproduce.

Log+StackTrace: (from a failing build)

2023-09-11 14:26:36,134 INFO o.s.t.c.s.AbstractTestContextBootstrapper [main] Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@26f518d4, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@6f0e2e0f, org.springframework.test.context.event.ApplicationEventsTestExecutionListener@22f81f65, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@92cb796, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@7112ddf, org.springframework.test.context.support.DirtiesContextTestExecutionListener@19711564, org.springframework.test.context.transaction.TransactionalTestExecutionListener@7b903218, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@17ecaafb, org.springframework.test.context.event.EventPublishingTestExecutionListener@199d120c, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@856ee6e]
2023-09-11 14:26:36,251 INFO u.a.m.s.a.b.MockTransceiver [main] constructed dummy transceiver for foo_machine (/1.1.1.1 : [board=0])
2023-09-11 14:26:36,294 INFO u.a.m.s.a.b.MockTransceiver [ThreadPoolTaskScheduler-1] readBoardSerialNumber([c:0,f:0],board=0)
2023-09-11 14:26:36,296 INFO u.a.m.s.a.b.MockTransceiver [ThreadPoolTaskScheduler-1] readSerialFlash([c:0,f:0],board=0,0x00000100,256)
2023-09-11 14:26:37,849 INFO u.a.m.s.a.b.MockTransceiver [ThreadPoolTaskScheduler-1] readBoardSerialNumber([c:0,f:0],board=0)
2023-09-11 14:26:37,849 INFO u.a.m.s.a.b.MockTransceiver [ThreadPoolTaskScheduler-1] readBMPMemory([c:0,f:0],board=0,0x00001000,4096)
2023-09-11 14:26:37,851 INFO u.a.m.s.a.b.MockTransceiver [ThreadPoolTaskScheduler-1] readSerialFlash([c:0,f:0],board=0,0x00000000,256)
2023-09-11 14:26:37,851 INFO u.a.m.s.a.b.MockTransceiver [ThreadPoolTaskScheduler-1] writeFlash([c:0,f:0],board=0,0x00001000,4096)
2023-09-11 14:26:37,853 INFO u.a.m.s.a.b.MockTransceiver [ThreadPoolTaskScheduler-1] writeSerialFlash([c:0,f:0],board=0,0x00000000:512)
2023-09-11 14:26:39,411 INFO u.a.m.s.a.b.MockTransceiver [ThreadPoolTaskScheduler-1] readBoardSerialNumber([c:0,f:0],board=0)
Error:  Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 18.29 s <<< FAILURE! -- in uk.ac.manchester.spinnaker.alloc.bmp.BlacklistCommsTest
Error:  uk.ac.manchester.spinnaker.alloc.bmp.BlacklistCommsTest.getSerialNumber -- Time elapsed: 15.07 s <<< ERROR!
java.util.concurrent.TimeoutException: getSerialNumber() timed out after 15 seconds
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	Suppressed: java.lang.InterruptedException
		at java.base/java.lang.Object.wait(Native Method)
		at uk.ac.manchester.spinnaker.alloc.allocator.Epochs$Epoch.getChanged(Epochs.java:253)
		at uk.ac.manchester.spinnaker.alloc.allocator.Epochs$Epoch.waitForChange(Epochs.java:237)
		at uk.ac.manchester.spinnaker.alloc.admin.MachineStateControl$Op.getResult(MachineStateControl.java:887)
		at uk.ac.manchester.spinnaker.alloc.admin.MachineStateControl$Op.completed(MachineStateControl.java:907)
		at uk.ac.manchester.spinnaker.alloc.admin.MachineStateControl.getSerialNumber(MachineStateControl.java:764)
		at uk.ac.manchester.spinnaker.alloc.bmp.BlacklistCommsTest.getSerialNumber(BlacklistCommsTest.java:131)
		at java.base/java.lang.reflect.Method.invoke(Method.java:564)
		... 2 more

I see nothing obviously wrong in that log excerpt (before the timeout).

Workaround: Rerun the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant