From owner-freebsd-java@FreeBSD.ORG Tue Oct 23 10:52:38 2007 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 CC9A516A418 for ; Tue, 23 Oct 2007 10:52:38 +0000 (UTC) (envelope-from la.tinca@gmail.com) Received: from mail02a.mail.t-online.hu (mail02a.mail.t-online.hu [84.2.40.7]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4F013C481 for ; Tue, 23 Oct 2007 10:52:37 +0000 (UTC) (envelope-from la.tinca@gmail.com) Received: from tinca (catv54035606.pool.t-online.hu [84.3.86.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail02a.mail.t-online.hu (Postfix) with ESMTP id 9E2C1EBD20 for ; Tue, 23 Oct 2007 12:24:01 +0200 (CEST) Date: Tue, 23 Oct 2007 12:24:00 +0200 From: Zsolt =?ISO-8859-2?Q?K=FAti?= To: freebsd-java@freebsd.org Message-ID: <20071023122400.29345a33@tinca> In-Reply-To: <20071022222034.A25435@turing> References: <20071022222034.A25435@turing> X-Mailer: Claws Mail 3.0.2 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: FreeBSD jdk15 does not read java.security? 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: Tue, 23 Oct 2007 10:52:38 -0000 Hi Nick, Here is what I see on my system: $ truss -o truss.out java Test freebsd.org/69.147.83.40Memory fault (core dumped) The ending lines of truss.out: .. open("/usr/local/diablo-jdk1.5.0/jre/lib/i386/libzip.so",O_RDONLY,00) = 4 (0x4) open("/usr/local/diablo-jdk1.5.0/jre/lib/rt.jar",O_RDONLY,00) = 4 (0x4) open("/usr/local/diablo-jdk1.5.0/jre/lib/jsse.jar",O_RDONLY,00) = 4 (0x4) open("/usr/local/diablo-jdk1.5.0/jre/lib/jce.jar",O_RDONLY,00) = 4 (0x4) open("/usr/local/diablo-jdk1.5.0/jre/lib/charsets.jar",O_RDONLY,00) = 4 (0x4) open("/usr/local/diablo-jdk1.5.0/jre/lib/i386/client/classes.jsa",O_RDONLY,00) = 4 (0x4) open(".hotspot_compiler",O_RDONLY,0666) ERR#2 'No such file or directory' open("",O_APPEND|O_SHLOCK|O_CREAT|O_EXCL|O_NOCTTY|O_DIRECT|0xbf7e1000,05002553414) = 5 (0x5) I do not know why that error after opening classes.jas as: $ l /usr/local/diablo-jdk1.5.0/jre/lib/i386/client/classes.jsa -r--r--r-- 1 root wheel 12689408 Feb 10 2007 /usr/local/diablo-jdk1.5.0/jre/lib/i386/client/classes.jsa - FreeBSD 6.2-RELEASE-p8 #5: Wed Oct 10 21:16:16 CEST 2007 - java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build diablo-1.5.0-b01) Java HotSpot(TM) Client VM (build diablo-1.5.0_07-b01, mixed mode, sharing) Zsolt On Mon, 22 Oct 2007 22:53:00 -0700 (PDT) Nick Johnson wrote: > While still trying to investigate this InetAddress negative caching > problem I have, I found something a bit puzzling... If I could get > someone else to verify, that would be great. > > It looks like the 1.5.0_12-p6 JDK never reads java.security when it > starts up. Consequently the netaddress.cache.ttl and > netaddress.cache.negative.ttl properties are never read and > initialized, so the cache reverts to its defaults of caching > forever... or at least that's my hypothesis. > > I wrote a tiny Java program that does nothing other than resolve a > hostname and ran it using truss. Though the JVM does open a number > of other configuration files, java.security is not one of them. My > old copy of 1.4.2 also does not open java.security. > > It's conceivable that truss is somehow missing the system call to > read java.security, but it does seem to be catching lots of other > open and stat calls. > > On Linux, strace shows the java.security open call happens just > before the name resolution would happen. On Windows, filemon shows > it happens just after classes.jsa is read. > > Can someone verify that the following program when run with the > FreeBSD 1.5 JDK results in no open calls for java.security? > > Tiny test program follows. Save it as Test.java, compile with javac > Test.java and run it with "truss -o truss.out java -f Test", then you > can grep truss.out for open system calls. > > import java.net.*; > > public class Test { > public static void main(String[] args) throws Exception { > InetAddress address = > InetAddress.getByName("freebsd.org"); System.out.println(address); > } > } > _______________________________________________ > 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"