{"record":{"id":"3fdcc35968e39aa8","repo":"lima-vm/lima","slug":"failed-to-get-info-from-q-w","errorCode":null,"errorMessage":"failed to get Info from %#q: %w","messagePattern":"failed to get Info from %#q: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/store/instance.go","lineNumber":83,"sourceCode":"\tinst.HostAgentPID, err = ReadPIDFile(filepath.Join(instDir, filenames.HostAgentPID))\n\tif err != nil {\n\t\tinst.Status = limatype.StatusBroken\n\t\tinst.Errors = append(inst.Errors, err)\n\t}\n\n\tif inst.HostAgentPID != 0 {\n\t\thaSock := filepath.Join(instDir, filenames.HostAgentSock)\n\t\thaClient, err := hostagentclient.NewHostAgentClient(haSock)\n\t\tif err != nil {\n\t\t\tinst.Status = limatype.StatusBroken\n\t\t\tinst.Errors = append(inst.Errors, fmt.Errorf(\"failed to connect to %#q: %w\", haSock, err))\n\t\t} else {\n\t\t\tctx, cancel := context.WithTimeout(ctx, 3*time.Second)\n\t\t\tdefer cancel()\n\t\t\tinfo, err := haClient.Info(ctx)\n\t\t\tif err != nil {\n\t\t\t\tinst.Status = limatype.StatusBroken\n\t\t\t\tinst.Errors = append(inst.Errors, fmt.Errorf(\"failed to get Info from %#q: %w\", haSock, err))\n\t\t\t} else {\n\t\t\t\tinst.SSHLocalPort = info.SSHLocalPort\n\t\t\t\tinst.AutoStartedIdentifier = info.AutoStartedIdentifier\n\t\t\t}\n\t\t}\n\t}\n\tif inst.SSHLocalPort == 0 {\n\t\tsshConfigPath := filepath.Join(instDir, filenames.SSHConfig)\n\t\tif port, err := sshPortFromConfig(sshConfigPath); err == nil {\n\t\t\tinst.SSHLocalPort = port\n\t\t} else if !errors.Is(err, os.ErrNotExist) {\n\t\t\tinst.Errors = append(inst.Errors, fmt.Errorf(\"failed to extract SSH local port from %#q: %w\", sshConfigPath, err))\n\t\t}\n\t}\n\n\tinst.CPUs = *y.CPUs\n\tmemory, err := units.RAMInBytes(*y.Memory)\n\tif err == nil {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/lima-vm/lima/blob/dd909d0973cd84fa35f9e1693181b4585ea616c1/pkg/store/instance.go#L65-L101","documentation":"Inspect() successfully connected to the host agent socket but the Info() RPC failed within the 3-second timeout. The instance is marked StatusBroken. This means the host agent is listening but not answering properly (hung, overloaded, or protocol mismatch).","triggerScenarios":"haClient.Info(ctx) returns an error or times out within 3s: host agent is alive but wedged, gRPC deadline exceeded, host agent binary version mismatch with limactl, or the agent is blocked on I/O.","commonSituations":"Host agent deadlocked during VM shutdown; host machine under heavy load exceeding the 3s timeout; limactl upgraded while old hostagent still running (protobuf/API mismatch); socket alive but process is a zombie.","solutions":["Retry once after a few seconds (transient load can exceed the 3s deadline)","Stop and restart the instance: `limactl stop <inst>` then `limactl start <inst>`","If stop fails, kill the stale hostagent PID from ~/.lima/<inst>/ha.pid and restart","Ensure limactl and hostagent versions match (reinstall Lima if mixed versions)"],"exampleFix":"// before: limactl inspect hangs/fails on Info\n// after: force-clean the wedged agent\nkill $(cat ~/.lima/myvm/ha.pid); limactl start myvm","handlingStrategy":"retry","validationCode":"// Probe the socket before heavy use\nconn, err := net.DialTimeout(\"unix\", haSock, 2*time.Second)\nif err == nil { conn.Close() }","typeGuard":null,"tryCatchPattern":"var rpcErr error\nfor i := 0; i < 3; i++ {\n    info, err = haClient.Info(ctx)\n    if err == nil { break }\n    rpcErr = err\n    time.Sleep(time.Second)\n}\nif rpcErr != nil { /* stop+restart instance */ }","preventionTips":["Avoid inspecting instances while the host is under extreme load","Keep limactl and guest/hostagent versions in lockstep (upgrade together)","Watch for repeated Info timeouts as a sign of a wedged hostagent"],"tags":["lima","hostagent","grpc","timeout"],"backgroundTag":"grpc-deadline-exceeded","analyzedSha":"dd909d0973cd84fa35f9e1693181b4585ea616c1","analyzedAt":"2026-09-01T14:24:59.842Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}