From owner-freebsd-hackers@freebsd.org Mon Aug 20 11:27:46 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 797B9108D234 for ; Mon, 20 Aug 2018 11:27:46 +0000 (UTC) (envelope-from aliovx@gmail.com) Received: from mail-oi0-x244.google.com (mail-oi0-x244.google.com [IPv6:2607:f8b0:4003:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 082AE88B47 for ; Mon, 20 Aug 2018 11:27:46 +0000 (UTC) (envelope-from aliovx@gmail.com) Received: by mail-oi0-x244.google.com with SMTP id k12-v6so25130065oiw.8 for ; Mon, 20 Aug 2018 04:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=uLlkO/2DWLjmaOPxjF2UqH1zCZepBjVWp1uH8mnj2aI=; b=mPObUrUboRDVnqN5kl6W5/DNAhuzedGxnSDDxOrwwb3gK/ROQ8Tiu62pK8mUu4m/GI NvWdz0nr+k5mHePVvvLd1JHvwTQwjPmnnUy6FOIREv+DW0QqZG1GmGWkXk/FQGLXdahE TMp/bPIKzb/au9u2aERS8vCZqp4uz5A2T0By4V5KK1oWWIh0RNDQaethba9/0KtUuuzN C2dRNA9FhwffT3O10EB608sv1u4jYTsQyZLQXqXMW022jt3IRRttrKFD/qusF9yZBVgQ Eqbf2zFGfuOb25wAA8qyemK2fvS9+gO186TjZWv4IsPxjVFqGlcHW9gdQwma8gJ7DH5Q PzuA== 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=uLlkO/2DWLjmaOPxjF2UqH1zCZepBjVWp1uH8mnj2aI=; b=tkk1XbxHC4km/HLXq5XNM4o4X3mxY3uvfKbP0ZwLkmqLAm+Cd04mgr75EzMlkxzrhb m+q2HxSeZYI31w/vC8QgFGTCFsRTNbNuAZJkXEV4+hQSqgSqXbN2+RpOvJuXa3iIsFLN 2Tp98iHH0UPd7g62C3sXZvTEJ3Ow54Rli0uZAG8QV5+Ov1EO+Q2Yps+Kvr0hXOyDkBNv xRJJpHlNBDU52LcNt/wcEVCNFYVw9pI4+gXpGg2trKnltfYpyT/WRx8ahboQKqLEYI6g awx08asQCKeiO93rlcfKv2JYWxZiQXG2bqmjIHsuquJXCBYNZDGHiVm6WXTCGX5lVQ7k pKeg== X-Gm-Message-State: AOUpUlEaoPU4Gc78XW+V5WHYhVKjHtLQMDe1WihCeyBcXuUZ8HhoJzgk D3A4M2kbBtrbfSh9KVbQbTucGdbplVJJyIJRJyjmksch X-Google-Smtp-Source: AA+uWPyKuKZ3PlpGQoikIfAqLw1iSTAvSlSQCDJC8yStDKciBH/OczE+k2bI//M+4Ss9VFYXTmCtSGiNEVVUnMmN4AY= X-Received: by 2002:aca:5a45:: with SMTP id o66-v6mr13802807oib.155.1534764465074; Mon, 20 Aug 2018 04:27:45 -0700 (PDT) MIME-Version: 1.0 From: Ali Abdallah Date: Mon, 20 Aug 2018 13:27:33 +0200 Message-ID: Subject: rand_harvestq high cpu usage when /dev/urandom is used To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2018 11:27:46 -0000 Hello, I was just sorting randomly some jpg image files using: ls *.jpg | sort -R --random-source=/dev/urandom The above command never exited. Later I noticed that one of my CPU is always running 100%. top -S reveals that it is rand_harvestq kernel service. Is this is a bug? This occurs on 12-ALPHA1 and 11.2 Also, I read on https://lists.freebsd.org/pipermail/freebsd-current/2013-November/046683.html someone saying that sysctls to turn off harvesting is documented in random(6) . I had a look at that document, but wasn't clear to me how to turn it off. I tried to play with the mask, but nothing. Cheers, Ali