From owner-freebsd-current@freebsd.org Wed Mar 17 14:58:02 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98F8D56B6F7; Wed, 17 Mar 2021 14:58:02 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0tZ15fRHz4Tkt; Wed, 17 Mar 2021 14:58:01 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lf1-x131.google.com with SMTP id 20so3392898lfj.13; Wed, 17 Mar 2021 07:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KsqTpO03/iFBNBm5WZJgYwegqTYGCEZsEFOWJXY140I=; b=pA9EKQn44vwovoXnATurdXC81IUtFZToFHCZAe8CJJTV2VvtPlU4sRJ8X6hRnvI/qm xH0Vwoyp9DxeALnuccX3K3Gy1jbBOp2xAzGSEUQuANT7LRsiYjwMkTl0SbNrxtZt7WGQ RTNG4Y3/xOea+cpdcHLlCRK12fiL4qwuNXgf0KA9Othr7j6sKRHIc2hCB0bPh/xk+za8 UTbuq6zniR/TM5YhPw2rFf9yWYa0kwp7F8Rme80O3EjvI3UZOln3zUreuw1dHcB8uwYg MYe5Mz06EqcGzCMPs5uYT/sEuT7btkRa6gnkIbFiRPBwptnB9zko++jM9b5dMlbrOkYQ 5LUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=KsqTpO03/iFBNBm5WZJgYwegqTYGCEZsEFOWJXY140I=; b=XzCh/GS+jrl772F3tUouR1nknMMnfwhQQCPg8R9DOZqj6RM0V52lH5gT2Piq/EN0kv r91sshSa2oEHtd+cHi/nLgpZL/Bu3R7Toi4ecPjaQXjn/jV5Ecsb1vVkaJyxHt/xmLCU FrIucRDBO9nWKj+zzJSpldNveg3Ra45wCclYGiO+O6cxxbePDeT1Di5d8XOgh19F8Jqb eIulMP3dxo5z0zC49g0eYXLmvp5dTKE6RaEdksWIuAq+uOvhesWU8UygoB5bIxS2MWCg iSvZAmvcXroNoPpYADaLnRmMXpPGbCXqDMN+BeMfj4BdoJgDGAvPuUx7iKqPygAIFPW3 DGTQ== X-Gm-Message-State: AOAM531ZSGmOCfP8XyhD4eBHEY67A67dF6FXd8A+aV6fXW7wiIlbOEwx HyyTgRpI19mNdTp0Hz6ZQs62PxXgg5cHg8qSWTXpmVWDsEI= X-Google-Smtp-Source: ABdhPJzwhyIEWz9+w1KBJQ9Hzp0Nk+TY59aPjiom/pdoICsjWiaS4/ZRAZ12gr3ycrTkGG6yaABFWywu3rGL94tLt/s= X-Received: by 2002:a19:5e14:: with SMTP id s20mr2624622lfb.110.1615993079840; Wed, 17 Mar 2021 07:57:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:b54e:0:0:0:0:0 with HTTP; Wed, 17 Mar 2021 07:57:59 -0700 (PDT) In-Reply-To: <20210317143307.20beb5fca0814246f2a91e9a@yamagi.org> References: <20210317143307.20beb5fca0814246f2a91e9a@yamagi.org> From: Mateusz Guzik Date: Wed, 17 Mar 2021 15:57:59 +0100 Message-ID: Subject: Re: 13.0-RC2 / 14-CURRENT: Processes getting stuck in vlruwk state To: Yamagi Cc: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4F0tZ15fRHz4Tkt X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=pA9EKQn4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::131 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-4.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; MIME_GOOD(-0.10)[text/plain]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::131:from]; TO_DN_SOME(0.00)[]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::131:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::131:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-current,freebsd-stable]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2021 14:58:02 -0000 Can you reproduce the problem and run obtain "sysctl -a"? In general, there is a vnode limit which is probably too small. The reclamation mechanism is deficient in that it will eventually inject an arbitrary pause. On 3/17/21, Yamagi wrote: > Hi, > me and some other users in the ##bsdforen.de IRC channel have the > problem that during Poudriere runs processes getting stuck in the > 'vlruwk' state. > > For me it's fairly reproduceable. The problems begin about 20 to 25 > minutes after I've started poudriere. At first only some ccache > processes hang in the 'vlruwk' state, after another 2 to 3 minutes > nearly everything hangs and the total CPU load drops to about 5%. > When I stop poudriere with ctrl-c it takes another 3 to 5 minutes > until the system recovers. > > First the setup: > * poudriere runs in a bhyve vm on zvol. The host is a 12.2-RELEASE-p2. > The zvol has a 8k blocksize, the guests partition are aligned to 8k. > The guest has only zpool, the pool was created with ashift=13. The > vm has 16 E5-2620 and 16 gigabytes RAM assigned to it. > * poudriere is configured with ccache and ALLOW_MAKE_JOBS=yes. Removing > either of these options lowers the probability of the problem to show > up significantly. > > I've tried several git revisions starting with 14-CURRENT at > 54ac6f721efccdba5a09aa9f38be0a1c4ef6cf14 in the hope that I can find at > least one known to be good revision. No chance, even a kernel build > from 0932ee9fa0d82b2998993b649f9fa4cc95ba77d6 (Wed Sep 2 19:18:27 2020 > +0000) has the problem. The problem isn't reproduceable with > 12.2-RELEASE. > > The kernel stack ('procstat -kk') of a hanging process is: > mi_switch+0x155 sleepq_switch+0x109 sleepq_catch_signals+0x3f1 > sleepq_wait_sig+0x9 _sleep+0x2aa kern_wait6+0x482 sys_wait4+0x7d > amd64_syscall+0x140 fast_syscall_common+0xf8 > > The kernel stack of vnlru is changing, even while the processes are > hanging: > * mi_switch+0x155 sleepq_switch+0x109 sleepq_timedwait+0x4b > _sleep+0x29b vnlru_proc+0xa05 fork_exit+0x80 fork_trampoline+0xe > * fork_exit+0x80 fork_trampoline+0xe > > Since vnlru is accumulating CPU time it looks like it's doing at least > something. As an educated guess I would say that vn_alloc_hard() is > waiting a long time or even forever to allocate new vnodes. > > I can provide more information, I just need to know what. > > > Regards, > Yamagi > > -- > Homepage: https://www.yamagi.org > Github: https://github.com/yamagi > GPG: 0x1D502515 > -- Mateusz Guzik