Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 71471 invoked from network); 7 Oct 2010 06:33:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Oct 2010 06:33:40 -0000 Received: (qmail 66719 invoked by uid 500); 7 Oct 2010 06:33:40 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 66530 invoked by uid 500); 7 Oct 2010 06:33:38 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 66521 invoked by uid 99); 7 Oct 2010 06:33:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Oct 2010 06:33:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tmueller@day.com designates 207.126.148.95 as permitted sender) Received: from [207.126.148.95] (HELO eu3sys201amo011.postini.com) (207.126.148.95) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 07 Oct 2010 06:33:28 +0000 Received: from source ([209.85.216.47]) by eu3sys201aob105.postini.com ([207.126.154.11]) with SMTP ID DSNKTK1poXhRRc1gVEI28kjouWF5w+TvL1cl@postini.com; Thu, 07 Oct 2010 06:33:08 UTC Received: by qwi2 with SMTP id 2so320qwi.20 for ; Wed, 06 Oct 2010 23:33:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.233.195 with SMTP id jz3mr339605qcb.207.1286433185339; Wed, 06 Oct 2010 23:33:05 -0700 (PDT) Received: by 10.229.40.207 with HTTP; Wed, 6 Oct 2010 23:33:05 -0700 (PDT) In-Reply-To: References: Date: Thu, 7 Oct 2010 08:33:05 +0200 Message-ID: Subject: Re: Threads blocked in org.apache.jackrabbit.core.id.SeededSecureRandom From: =?ISO-8859-1?Q?Thomas_M=FCller?= To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi, > We have more than 50 threads waiting here. Please note this is a background thread that doesn't block the application. The thread to seeds the secure random singleton is slow, because reading from /dev/random is very slow in your system. What kind of system is it? I'm just curious. Jackrabbit uses a workaround for such systems: if reading from /dev/random takes longer than 1 second, it uses an alternative approach to seed the pseudo-random number generator (see the source code). > NativePRNG generation reads at intervals Actually, it's only doing that once per SeededSecureRandom instance. The maximum waiting time to generate a SeededSecureRandom instance is a bit more than 1 second, and Jackrabbit only uses one instance. Regards, Thomas