NetBSD Problem Report #57092

From gson@gson.org  Tue Nov 29 10:09:57 2022
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 10F921A921F
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 29 Nov 2022 10:09:57 +0000 (UTC)
Message-Id: <20221129100949.69B62254819@guava.gson.org>
Date: Tue, 29 Nov 2022 12:09:49 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: nvmm_init_vcpu failed: Cannot allocate memory
X-Send-Pr-Version: 3.95

>Number:         57092
>Category:       port-amd64
>Synopsis:       nvmm_init_vcpu failed: Cannot allocate memory
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 29 10:10:00 +0000 2022
>Originator:     Andreas Gustafsson
>Release:        NetBSD 9.0_STABLE
>Organization:
>Environment:
System: NetBSD babylon5.netbsd.org 9.0_STABLE NetBSD 9.0_STABLE (BABYLON5-EPYC) #0: Wed Sep  9 05:05:23 UTC 2020
Architecture: x86_64
Machine: amd64
>Description:

On the testbed on babylon5.netbsd.org, a small percentage of the test
runs fail when attempting to start a qemu/NVMM virtual machine, with
error messages like these:

  NetBSD Virtual Machine Monitor accelerator is operational
  qemu-system-i386: NVMM: Failed to create a virtual processor, error=12
  nvmm_init_vcpu failed: Cannot allocate memory

The full log output from the most recent such failure is here:

  http://releng.netbsd.org/b5reports/i386/2022/2022.11.28.19.32.45/install.log

The host in case has plenty of memory:

  babylon5.netbsd.org$ sysctl hw.physmem64
  hw.physmem64 = 137300484096

but it's hard to tell after the fact exactly how much of it was in use
at the time of the failure.

Perhaps this is a case of kernel memory fragmentation similar to the
one affecting umass(4) in PR 54977.

>How-To-Repeat:

>Fix:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2022 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.