From nobody Tue Feb 22 07:49:32 2022 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 7B63819CCBBE for ; Tue, 22 Feb 2022 07:49:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2rsp279Tz3jCg for ; Tue, 22 Feb 2022 07:49:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 256EB202F9 for ; Tue, 22 Feb 2022 07:49:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 21M7nYx5037587 for ; Tue, 22 Feb 2022 07:49:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 21M7nYll037586 for virtualization@FreeBSD.org; Tue, 22 Feb 2022 07:49:34 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 262113] bhyve fails every other attempt to run Date: Tue, 22 Feb 2022 07:49:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 13.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: afedorov@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645516174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5Y9XJ5x7SRVJfYAMyH0Ug8aItUzZfUKoTTJ6gskrdMQ=; b=SFGdRWc6QCBijH5UsWGNd7cnLXPh8FgP9oZXA6bSwc1xgcB/zco/PNbi5bcjTOuf/ACj/r xbhHYtIxRUyIBUbsClJJopTUDYINrH+ltv7pLV+uFx9wLOF8ojG1R/1pd7ggdlQbPqye74 1uLbYfnUxD+nqCfMlnNG7pU4OgjgLB+ctzYUpdQy/knVCrFQuOxvhceE/9dE1HEz1IxZRD kK/xacDwyC1vQUd5NUc20oVZMlGj9R9a/5wpUa9dmOoXzLVKDlBEun5Zoy3Ka21LesCiwV qPnkYpucDp90Rf3SiK2P6/99J9mIN4FsP9NYDPXmGNviZUHBpMN38/hN9U9W3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645516174; a=rsa-sha256; cv=none; b=Rt7G01ppw2+A+G65POLhg6MO2yF4g3NRp2L/ros4cj7ouFr1vVXdYiF8Q/nnbSavVyo0ES HKe/PA1K8vonwYw+3PmTZNPQ256m6A6wuESZuZ9u143eqrqB24G+UR3o8TsdDVoVgUxZSo hF6IXJ1cgo1Q4NcNmvFSep++HFLHDxSmRpr2xCg0uQ366i6jztHfBD0/Q/zY9uUm1JgiUg QOxvrGrsZGlXF6hPBTdzGsHL/qNJLH0Tp4QnixnTipiUstl0wx5xhS5aRgyiNPijDHtFbK kZmSYu3bRaE67muJW1pmlBrGx2L6a7Ugf05sraFKlFKyVZr8CxEPXxRclOkY9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262113 Aleksandr Fedorov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |afedorov@FreeBSD.org --- Comment #1 from Aleksandr Fedorov --- The main problem is that the VM is destroyed asynchronously via sysctl: https://github.com/freebsd/freebsd-src/blob/main/usr.sbin/bhyvectl/bhyvectl= .c#L2397 https://github.com/freebsd/freebsd-src/blob/main/lib/libvmmapi/vmmapi.c#L88 https://github.com/freebsd/freebsd-src/blob/main/sys/amd64/vmm/vmm_dev.c#L1= 080 Therefore, bhyvectl --destroy --vm=3Dtest0 completes before the VM is actua= lly destroyed. Moreover, even the /dev/vmm/test0 device is removed before the actual destruction of the VM occurs. And I don't know of a guaranteed way to check if a VM is destroyed from userspace. As workaround you can use: bhyvectl --destroy --vm=3Dtest0 sleep [N[ bhyve -AHP -c 1 -m 1024M ... But this is not a 100% reliable solution. --=20 You are receiving this mail because: You are the assignee for the bug.=