From owner-freebsd-java@FreeBSD.ORG Fri Jul 4 18:12:34 2008 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E0291065677 for ; Fri, 4 Jul 2008 18:12:34 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id C02538FC12 for ; Fri, 4 Jul 2008 18:12:33 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.13.1/8.13.3) with ESMTP id m64Hix6n035961; Fri, 4 Jul 2008 10:45:00 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.13.1/8.13.3/Submit) id m64HixVT035960; Fri, 4 Jul 2008 10:44:59 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Fri, 4 Jul 2008 10:44:58 -0700 From: Greg Lewis To: Alexey Beketov Message-ID: <20080704174458.GA35075@misty.eyesbeyond.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Cc: freebsd-java@freebsd.org Subject: Re: (bug report) jdk16 SEVERE nextBytes() failed X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jul 2008 18:12:34 -0000 G'day Alexey, On Tue, Jul 01, 2008 at 04:27:19PM +0400, Alexey Beketov wrote: > Hello, I using FreeBSD 7.0 , jdk-1.6.0.3p4_2 and I trying to host l2j server on it (exectly l2jfree). > If I use ingame "scroll of escape" then my character stucks and in log error appears: > SEVERE nextBytes() failed^M > java.security.ProviderException: nextBytes() failed > at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:270) Its failing to read bytes from /dev/urandom if a cursory inspection of the source is accurate. Thats really weird, since /dev/urandom doesn't block and will always return the number of bytes requested (unlike /dev/random which may return less than requested). So, I'm not sure whats going on here. A good next step, if you're willing to help out, would be to construct a test programme that just calls nextBytes() over and over again and see if you can reproduce the problem with that. > at sun.security.provider.NativePRNG$RandomIO.access$200(NativePRNG.java:108) > at sun.security.provider.NativePRNG.engineNextBytes(NativePRNG.java:97) > at java.security.SecureRandom.nextBytes(SecureRandom.java:433) > at java.security.SecureRandom.next(SecureRandom.java:455) > at java.util.Random.nextInt(Random.java:257) > at com.l2jfree.tools.random.Rnd.nextInt(Rnd.java:36) > at com.l2jfree.tools.random.Rnd.get(Rnd.java:50) > at com.l2jfree.gameserver.model.L2Character.teleToLocation(L2Character.java:681) > at com.l2jfree.gameserver.model.L2Character.teleToLocation(L2Character.java:718) > at com.l2jfree.gameserver.model.L2Character.teleToLocation(L2Character.java:723) > at com.l2jfree.gameserver.handler.itemhandlers.ScrollOfEscape$EscapeFinalizer.run(ScrollOfEscape.java:258) > at com.l2jfree.gameserver.ThreadPoolManager$Runner.run(ThreadPoolManager.java:255) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:9 > at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207) > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) > at java.lang.Thread.run(Thread.java:619) > Caused by: java.io.InterruptedIOException > at java.io.FileInputStream.readBytes(Native Method) > at java.io.FileInputStream.read(FileInputStream.java:199) > at sun.security.provider.NativePRNG$RandomIO.readFully(NativePRNG.java:185) > at sun.security.provider.NativePRNG$RandomIO.ensureBufferValid(NativePRNG.java:247) > at sun.security.provider.NativePRNG$RandomIO.implNextBytes(NativePRNG.java:261) > ... 20 more > ^M > > > This error only on freebsd with native java. On other OS and with sun-java-jdk it works perfectly. > Any ideas how to solve this problem? > &Is it good idea to send this bug report to jdk-1.6.0.3p4_2 port maintainer? > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org