From owner-freebsd-stable@freebsd.org Mon Sep 11 14:03:01 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 1CA02E0D6D9 for ; Mon, 11 Sep 2017 14:03:01 +0000 (UTC) (envelope-from vivek@khera.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id F1B052861 for ; Mon, 11 Sep 2017 14:03:00 +0000 (UTC) (envelope-from vivek@khera.org) Received: by mailman.ysv.freebsd.org (Postfix) id F0F81E0D6D8; Mon, 11 Sep 2017 14:03:00 +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 F0842E0D6D7 for ; Mon, 11 Sep 2017 14:03:00 +0000 (UTC) (envelope-from vivek@khera.org) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 9700A285F for ; Mon, 11 Sep 2017 14:03:00 +0000 (UTC) (envelope-from vivek@khera.org) Received: by mail-wm0-x22b.google.com with SMTP id f199so40613383wme.0 for ; Mon, 11 Sep 2017 07:03:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khera.org; s=google11; h=mime-version:from:date:message-id:subject:to; bh=HtLj2us8HVvhArm8jMFW/l6LOrnCy/RDriNZZAJNuUk=; b=Q1urvAdZ4O7XvUVFpJFCS2irjqOUxJPbYWDhrqv4x6+hWWobXDj2xqQgdkTladknIZ w77ul9tVQ5OE7X4AuWzYa8ITFK7b0F8PI9I6AqKpRF63dds6KmEZ4a24iNKlDrZko4Gh cTfoIYkiBioGT4OZlbKTgn5XXZ2OepdIOX8KA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HtLj2us8HVvhArm8jMFW/l6LOrnCy/RDriNZZAJNuUk=; b=oBBqp8GGsffVja+EklPI4lP7/qWMDBzl4udxTSg7XMTdqWxHveXHT5UaRsbsmeEZ+g v/HdxJEK5a1iw0w4lHEKDh1UCInRCv1k8HRjuLipHgPN53f1J/Fnr2DZiquVaoqvquQB ky7hzUrhHTjHxxrznVMmlrAhTBVLkbFb2H8aV38wHTyMG+71ayF8+P1by1/bB/WiqUyw f3MJKIX3LTTite1S3PbFATg/6NLLV0Zxbg7XrBXzx9aVqoSZNzi8009hkaGpUVG4HudH A4PoK6IfTJEipS+cygzEUrjAf5p+XaAba64GT7Mnvbr43NCo4XzFtUrRBlTPuZHoLsvR RHDQ== X-Gm-Message-State: AHPjjUhXrux6fijwQiYogtwO22KAuEeEQHHZG0y1eelBXThHIC9mjJm0 qv4vBD/2bPi9Zih9Ulnnd9FIwUZfILz0hzWZev6/Ra2E X-Google-Smtp-Source: AOwi7QBP50QGSGtwSSzopnPo4yJC5fS5PADQop0v+lPYxGMzIRyRc4xS3n839XLmJNqqLK6FFSAIUNyqQi/Ff+XKvmo= X-Received: by 10.28.167.8 with SMTP id q8mr3263977wme.98.1505138578242; Mon, 11 Sep 2017 07:02:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.142.65 with HTTP; Mon, 11 Sep 2017 07:02:57 -0700 (PDT) From: Vick Khera Date: Mon, 11 Sep 2017 10:02:57 -0400 Message-ID: Subject: entropy lockup To: 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 14:03:01 -0000 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.