bug: intermittent error in reset/shutdown during E2E test
What happened?
Noticed panic in stop code when debugging a test failure.
Build: https://github.com/hyperledger/firefly/actions/runs/13591410372/job/37998345407?pr=1647 Artifact download URL: https://github.com/hyperledger/firefly/actions/runs/13591410372/artifacts/2671414723
firefly_e2e_firefly_core_0 | panic: runtime error: invalid memory address or nil pointer dereference
firefly_e2e_firefly_core_0 | [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xd948e0]
firefly_e2e_firefly_core_0 |
firefly_e2e_firefly_core_0 | goroutine 1 [running]:
firefly_e2e_firefly_core_0 | github.com/hyperledger/firefly/internal/namespace.(*namespaceManager).WaitStop(0xc000a07b20)
firefly_e2e_firefly_core_0 | /firefly/internal/namespace/manager.go:432 +0x240
firefly_e2e_firefly_core_0 | github.com/hyperledger/firefly/cmd.run()
firefly_e2e_firefly_core_0 | /firefly/cmd/firefly.go:165 +0x80f
firefly_e2e_firefly_core_0 | github.com/hyperledger/firefly/cmd.init.func2(0xc00026af00?, {0x10b8707?, 0x4?, 0x10b8533?})
firefly_e2e_firefly_core_0 | /firefly/cmd/firefly.go:53 +0xf
firefly_e2e_firefly_core_0 | github.com/spf13/cobra.(*Command).execute(0x19977e0, {0xc0001a8040, 0x0, 0x0})
firefly_e2e_firefly_core_0 | /go/pkg/mod/github.com/spf13/[email protected]/command.go:983 +0xaca
firefly_e2e_firefly_core_0 | github.com/spf13/cobra.(*Command).ExecuteC(0x19977e0)
firefly_e2e_firefly_core_0 | /go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
firefly_e2e_firefly_core_0 | github.com/spf13/cobra.(*Command).Execute(...)
firefly_e2e_firefly_core_0 | /go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
firefly_e2e_firefly_core_0 | github.com/hyperledger/firefly/cmd.Execute(...)
firefly_e2e_firefly_core_0 | /firefly/cmd/firefly.go:104
firefly_e2e_firefly_core_0 | main.main()
firefly_e2e_firefly_core_0 | /firefly/main.go:27 +0x1a
What did you expect to happen?
Clean stop
How can we reproduce it (as minimally and precisely as possible)?
See build
Anything else we need to know?
No response
OS version
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
I think this actually caused the error, as it happened during processing of a /spi/v1/reset API call, which shouldn't have stopped the VM (but caused it to restart in place)
The line in question is: https://github.com/hyperledger/firefly/blob/75bb921d5747ad8a983b88864c891bf218987a72/internal/namespace/manager.go#L432
https://github.com/hyperledger/firefly/pull/1615 was being worked on by @aceppaluni - Can you verify that it fixes the above?