From hdfs-dev-return-2720-apmail-hadoop-hdfs-dev-archive=hadoop.apache.org@hadoop.apache.org Thu Apr 14 04:40:52 2011 Return-Path: Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: (qmail 2826 invoked from network); 14 Apr 2011 04:40:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Apr 2011 04:40:51 -0000 Received: (qmail 74168 invoked by uid 500); 14 Apr 2011 04:40:51 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 73882 invoked by uid 500); 14 Apr 2011 04:40:48 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 72681 invoked by uid 99); 14 Apr 2011 04:40:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2011 04:40:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Apr 2011 04:40:43 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BE4F7A1FED for ; Thu, 14 Apr 2011 04:40:05 +0000 (UTC) Date: Thu, 14 Apr 2011 04:40:05 +0000 (UTC) From: "John Carrino (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: <898754740.57019.1302756005776.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (HDFS-1835) DataNode.setNewStorageID pulls entropy from /dev/random MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org DataNode.setNewStorageID pulls entropy from /dev/random ------------------------------------------------------- Key: HDFS-1835 URL: https://issues.apache.org/jira/browse/HDFS-1835 Project: Hadoop HDFS Issue Type: Bug Components: data-node Affects Versions: 0.20.2 Reporter: John Carrino DataNode.setNewStorageID uses SecureRandom.getInstance("SHA1PRNG") which always pulls fresh entropy. It wouldn't be so bad if this were only the 120 bits needed by sha1, but the default impl of SecureRandom actually uses a BufferedInputStream around /dev/random and pulls 1024 bits of entropy for this one call. If you are on a system without much entropy coming in, this call can block and block others. Can we just change this to use "new SecureRandom().nextInt(Integer.MAX_VALUE)" instead? -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira