Summary:
I had a "hanging" instance, and limactl stop
would continue waiting for it to terminate. I got impatient, and ran limactl delete -f
in a separate shell, which caused the limactl stop
to crash:
2021/06/30 14:16:47 Stopping tail as file no longer exists: /Users/jan/.lima/std/ha.stdout.log
2021/06/30 14:16:47 Stopping tail as file no longer exists: /Users/jan/.lima/std/ha.stderr.log
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x144e18b]
goroutine 1 [running]:
github.com/AkihiroSuda/lima/pkg/hostagent/api.WatchEvents(0x169c9e8, 0xc00006ed20, 0xc000022990, 0x22, 0xc0000229c0, 0x22, 0xc02f55a7b59fbcc8, 0x1bceac, 0x1993120, 0xc000175b88, ...)
/Users/jan/suse/lima/pkg/hostagent/api/eventwatcher.go:46 +0x24b
INFO[0000] Sending SIGINT to hostagent process 25149
INFO[0000] Waiting for the host agent and the qemu processes to shut down
INFO[0000] [hostagent] Received SIGINT, shutting down the host agent
INFO[0000] [hostagent] Shutting down the host agent
INFO[0000] [hostagent] Unmounting "/Users/jan"
WARN[0000] [hostagent] connection to the guest agent was closed unexpectedly
INFO[0000] [hostagent] Shutting down QEMU with ACPI
INFO[0000] [hostagent] Sending QMP system_powerdown command
INFO[0010] [hostagent] Forwarding "/run/user/501/lima-guestagent.sock" (guest) to "/Users/jan/.lima/std/ga.sock" (host)
WARN[0010] [hostagent] failed to setting up forward from "/run/user/501/lima-guestagent.sock" (guest) to "/Users/jan/.lima/std/ga.sock" (host)
WARN[0010] [hostagent] connection to the guest agent was closed unexpectedly
INFO[0020] [hostagent] Forwarding "/run/user/501/lima-guestagent.sock" (guest) to "/Users/jan/.lima/std/ga.sock" (host)
WARN[0020] [hostagent] failed to setting up forward from "/run/user/501/lima-guestagent.sock" (guest) to "/Users/jan/.lima/std/ga.sock" (host)
WARN[0020] [hostagent] connection to the guest agent was closed unexpectedly
INFO[0030] [hostagent] Forwarding "/run/user/501/lima-guestagent.sock" (guest) to "/Users/jan/.lima/std/ga.sock" (host)
WARN[0030] [hostagent] failed to setting up forward from "/run/user/501/lima-guestagent.sock" (guest) to "/Users/jan/.lima/std/ga.sock" (host)
WARN[0030] [hostagent] connection to the guest agent was closed unexpectedly
2021/06/30 14:16:47 Stopping tail as file no longer exists: /Users/jan/.lima/std/ha.stdout.log
2021/06/30 14:16:47 Stopping tail as file no longer exists: /Users/jan/.lima/std/ha.stderr.log
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x144e18b]
goroutine 1 [running]:
github.com/AkihiroSuda/lima/pkg/hostagent/api.WatchEvents(0x169c9e8, 0xc00006ed20, 0xc000022990, 0x22, 0xc0000229c0, 0x22, 0xc02f55a7b59fbcc8, 0x1bceac, 0x1993120, 0xc000175b88, ...)
/Users/jan/suse/lima/pkg/hostagent/api/eventwatcher.go:46 +0x24b
main.waitForHostAgentTermination(0x169c9b0, 0xc000028a68, 0xc000163ea0, 0xc02f55a7b59fbcc8, 0x1bceac, 0x1993120, 0x0, 0x0)
/Users/jan/suse/lima/cmd/limactl/stop.go:91 +0x23c
main.stopInstanceGracefully(0xc000163ea0, 0x15e6a5b, 0x5)
/Users/jan/suse/lima/cmd/limactl/stop.go:69 +0x2f5
main.stopAction(0xc00003d040, 0x2, 0x2)
/Users/jan/suse/lima/cmd/limactl/stop.go:54 +0x169
github.com/urfave/cli/v2.(*Command).Run(0x1986d40, 0xc00003cf00, 0x0, 0x0)
/Users/jan/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:163 +0x4dd
github.com/urfave/cli/v2.(*App).RunContext(0xc0001be000, 0x169c9b0, 0xc000028a60, 0xc00001e1b0, 0x3, 0x3, 0x0, 0x0)
/Users/jan/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:313 +0x810
github.com/urfave/cli/v2.(*App).Run(...)
/Users/jan/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:224
main.main()
/Users/jan/suse/lima/cmd/limactl/main.go:15 +0x67