From owner-freebsd-current@freebsd.org Thu Mar 18 15:44:05 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 12FCC57ACE7; Thu, 18 Mar 2021 15:44:05 +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 4F1WXh1mdSz3s3Z; Thu, 18 Mar 2021 15:44:03 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lf1-x131.google.com with SMTP id 75so5291023lfa.2; Thu, 18 Mar 2021 08:44:03 -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=Mc/Y6msjubceQPcuTWHm3gAGQ5Nrc2qG26qviHpdOGc=; b=XqRck4m90+5XclJL48mpjxbRBuGbElhjAHop+V/+v2YIERpgtLTBSwNaCnt5dgKvdu JTXOoTCTWSsTrcYOisBI7kSeqrXw77hS1XOrfdF3DoppvJntrlyWjAoPvP9nQ+jWoaFa ye0nMgv6O/Ok3ht8La2dThi42UaIwi1eDURQGWZz9HzjP7uN/kTPr6jgQz+SWtnqcfX0 41e0l5lSs/YGD0korlXqXT/6vshiw68E95wfhxEtXHR/VNd0cQ357fCaNGPDYyAj/HwW e9njZLk541X2Ij5OuL3amTpf5UsUv5QbLp4D/6wWa1E+hpKf5Tdpubd4yPHKTtAlmMyo SHyw== 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=Mc/Y6msjubceQPcuTWHm3gAGQ5Nrc2qG26qviHpdOGc=; b=PCJnfnukLMztgBf1PXey2x73g8gfzrVIG3WkfI0VEEPbP4mowobEFtPwkQUccMdru9 ezunB8WhR4W6enlMCnQcqVfREY2tTi7uNNyE2UMrR1UxbZ4d4FgrvuAdm66PtjdoMgj9 dWA+BYFN/26jOXWxmU+z8mhUufmiW5+pq8JlNvAsNbgMJoPSMC9Oz2SU7FlawZWDYWKO e09npp1MxSuZoNjHaMA7EQKzhR8XvdCsG9XJOp3HeVvFnBMn/UxtCIkSd4FFJO9UYoE+ Zw8jUmXcAJs+j+FS+uspgxgjvrKEXoUGI3W2Ex8ncqFGti5Na1WDI1VdiKIExZao/cZK pu0Q== X-Gm-Message-State: AOAM532zIsTOI/Z8TZxVF8tmJoQdbLAjakKEcfX8ewsVYGp1sE3Lxw9I 7Dyjzvctf6cgtp8k6tGqhdrkkMQA/r1L6Dm2yonYucXKoDY= X-Google-Smtp-Source: ABdhPJxQDGdyRRcBnzYyyFL/8Wq2EKBua5Q1LZhLhhs80ZgRHYUNOPMi5e3Mc/bNugtVe/1Sh79kPXELYOvgwAaFCAM= X-Received: by 2002:ac2:43d6:: with SMTP id u22mr6188930lfl.266.1616082241915; Thu, 18 Mar 2021 08:44:01 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:b54e:0:0:0:0:0 with HTTP; Thu, 18 Mar 2021 08:44:00 -0700 (PDT) In-Reply-To: <20210317143307.20beb5fca0814246f2a91e9a@yamagi.org> References: <20210317143307.20beb5fca0814246f2a91e9a@yamagi.org> From: Mateusz Guzik Date: Thu, 18 Mar 2021 16:44:00 +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: 4F1WXh1mdSz3s3Z X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=XqRck4m9; 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 [-2.09 / 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]; NEURAL_SPAM_SHORT(0.91)[0.910]; 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_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: Thu, 18 Mar 2021 15:44:05 -0000 To sum up what happened, Yamagi was kind enough to test several patches and ultimately the issue got solved here https://cgit.freebsd.org/src/commit/?id=e9272225e6bed840b00eef1c817b188c172338ee . The patch also got merged into releng/13.0 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