From owner-freebsd-stable@freebsd.org Mon Sep 11 23:20:51 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F41FE0687B for ; Mon, 11 Sep 2017 23:20:51 +0000 (UTC) (envelope-from morgan.s.reed@gmail.com) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 6B16B77817 for ; Mon, 11 Sep 2017 23:20:51 +0000 (UTC) (envelope-from morgan.s.reed@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 6743AE06879; Mon, 11 Sep 2017 23:20:51 +0000 (UTC) Delivered-To: stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F01E06878 for ; Mon, 11 Sep 2017 23:20:51 +0000 (UTC) (envelope-from morgan.s.reed@gmail.com) Received: from mail-qt0-x230.google.com (mail-qt0-x230.google.com [IPv6:2607:f8b0:400d:c0d::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2042577815 for ; Mon, 11 Sep 2017 23:20:51 +0000 (UTC) (envelope-from morgan.s.reed@gmail.com) Received: by mail-qt0-x230.google.com with SMTP id q8so22353606qtb.5 for ; Mon, 11 Sep 2017 16:20:51 -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=pFqHRwmZOJb9tsGzYxwU/a9BNoQYq74G7o5erGGNj5w=; b=nwj1qWLVhuvl0ctuDmktnyqNgROwksTKsWWGAT5InGOOi5zZMdneO/w2SJGmQjV3YJ Eq0kFlVEQKwmQE3g/Zi+lsqxwe4UcptOEsLlDCa8Sb0wfmGdmDv8XJqOgTqMSr3RsndF 0sZcs6o1O5u5HZsqV5EKUxMA/Re2F283/fHqWOIKsFgWAgwdyX8/ZZ1RpG0ttW61CgKl wPel8hydyIVXr80OFVLhp0E1YrXUvQSwZLm2rI/dJZQsuBACTfKLUvZ2t3VwhEauXwYN bGFC/uy/CYZZecuq2egZwGUuDom7vmzdbbTlGeitvBbfiq1Op1tlySe0c3lFYnRzADAd sh5w== 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=pFqHRwmZOJb9tsGzYxwU/a9BNoQYq74G7o5erGGNj5w=; b=HR6I6vY1YMtL4vc7nI01D1uMQpDGUYs/rxKBJbdzWMeONWNhbaTG55JV46Tb976FvV Lbhys/bZ0RyzIzSiGMIK+1GENxIgTVb0XqrceZf1BWTwSXJIbbCJkg47l49ZYQs8MKuU Y3WRhybJG62FarZr+wPKRRVvNtX0s/m380pJ4MJSpolZ7tZV/NRu6rvkYPWwY5Cb4r6v O2uvFbeCk1dBgzy2TU1dt8WWCgpTzbF5889I4EEcS+3V3W+mdwWLNwaz9pXDJLW/mZt0 AdEposUwjfyhrY9thbRGugvMxOF0Cw7t71Pz/5m0BVefC6XNTtKSrtGI6HjiFyVqlNM3 1kYQ== X-Gm-Message-State: AHPjjUgE7zb5It5NYHi2OFkIV3oaJcDA8CKI919beFngMX6yXYA/gMi6 xPVJhdGRXldcLyEX1pzb0j7pbwBcI1Xq X-Google-Smtp-Source: AOwi7QBx5tMNAKjIC3IgJhzAdr5KMoxPnQG4sR9MUJgnuZkimi2xRKxY6Wz2o0OB2mQg4duYp1NDY2z+FiSN4nUlNng= X-Received: by 10.200.25.215 with SMTP id s23mr12672156qtk.229.1505172050173; Mon, 11 Sep 2017 16:20:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.91.201 with HTTP; Mon, 11 Sep 2017 16:20:29 -0700 (PDT) In-Reply-To: References: From: Morgan Reed Date: Tue, 12 Sep 2017 09:20:29 +1000 Message-ID: Subject: Re: entropy lockup To: Vick Khera Cc: FreeBSD Stable List Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2017 23:20:51 -0000 In all likelihood the process wasn't "hung" per-se, more likely random hadn't been seeded yet and as such you *can't* get 4096b of entropy out of it (so the process was attempting to do its job, just nothing on the device). The issue is basically that there are very few "good" entropy sources in a VM environment, and as such (particularly on a machine which is only running SSH) there's not enough data available to seed random. Check 'man 4 random' for some discussion. On Tue, Sep 12, 2017 at 12:02 AM, Vick Khera wrote: > I just had a VM running in Google's cloud become totally useless, and I > tracked it down to the save-entropy operation. > > Basically this process was sucking up all CPU, even when nothing else > running other than my ssh shell: > > % ps axuw803 > USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND > operator 803 100.0 0.1 8336 2096 - RL 08:55 48:20.14 dd > if=/dev/random of=saved-entropy.1 bs=4096 count=1 > > > The process is unkillable, and I cannot even get the system to shut down. > That has been hanging for about 10 minutes so far, with the last output > being > > System shutdown time has arrive90 second watchdSep 11 09:50:02 yertle init: > /bin/sh on /etc/rc.shutdown terminated abnormally, going to single user > mode > Sep 11 09:50:47 init: some processes would not die; ps axl advised > Waiting (max 60 seconds) for system process `vnlru' to stop... done > Waiting (max 60 seconds) for system process `bufdaemon' to stop... done > Waiting (max 60 seconds) for system process `syncer' to stop... > Syncing disks, vnodes remaining... 4 4 4 4 4 4 4 timed out > 2 2 2 2 2 2 2 > > > Running FreeBSD 11.1-p1 on a 1CPU standard machine in GCE. > > What's the proper recovery from this kind of lockup, or how to prevent it? > I've never encountered this on a bare metal system, or other KVM based > machines. > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759