From owner-freebsd-java@FreeBSD.ORG Mon Jun 6 11:07:09 2011 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 89BE5106568C for ; Mon, 6 Jun 2011 11:07:09 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5E9C78FC2A for ; Mon, 6 Jun 2011 11:07:09 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p56B79Rr037670 for ; Mon, 6 Jun 2011 11:07:09 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p56B787L037668 for freebsd-java@FreeBSD.org; Mon, 6 Jun 2011 11:07:08 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 6 Jun 2011 11:07:08 GMT Message-Id: <201106061107.p56B787L037668@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-java@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-java@FreeBSD.org 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: Mon, 06 Jun 2011 11:07:09 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o ports/156674 java [PATCH] java/openjdk6: make x11-fonts/dejavu a build d o ports/156319 java [patch] java/openjdk6 does not compile with previous l o ports/155967 java [bsd.java.mk] [patch] javavm wrapper insists on diablo o ports/155657 java java/openjdk6: missing symlink for include/freebsd/* o java/155107 java [patch] port java/diablo-jdk16 small cosmetic fix for o ports/154884 java java/openjdk6: Every NetBeans version on FreeBSD 8.1 c o ports/151923 java [patch] java/openjdk6: free and native openjdk bootstr o ports/151042 java [patch] java/openjdk6 Respect CC o ports/150142 java Not installed java/openjdk6 on file system zfs /usr/lo o java/147512 java Crash of RXTX-2.1-7 on AMD64 system o java/138729 java java/jdk16: setting 'export AWT_TOOLKIT=MToolkit' caus o java/138728 java java/jdk16: SIGSEGV in java runtime o java/128948 java java/jdk16 built from source can't bind a socket, but o java/128809 java JVM aborted when GNU RXTX write to serial port. o java/123555 java linux-sun-jdk15, linux-sun-jdk16 produce a coredump o java/122513 java native JDKs unbuildable with Linux ones f java/121692 java java/jdk16: Java 1.5 1.5.0.14p8 crashes in RMI TCP Con o ports/120372 java java/linux-sun-jdk16: linux-sun-jre1.6.0 plugin doesn' o java/120146 java java/jdk15: netbeans 6.0 causes java core dump on amd6 o ports/119732 java java/linux-sun-jre16: linux-sun-jre16 plugin doesn't w o java/119063 java An unexpected error has been detected by Java Runtime o java/118956 java eclipse and netbeans break on diablo-jdk15 o java/116667 java linux-sun-javac1.4 hangs on SMP o ports/116082 java java/linux-sun-jdk16 jconsole is unable to connect to o java/114644 java tomcat goes out of PermSpace, jvm crashes o ports/113751 java java/linux-sun-jdk15: linux-sun-jdk-1.5.0.12,2 - java f ports/113467 java Multiple "missing return value" errors building JDK on f java/112595 java Java appletviewer frequently hangs (kse_release loop) s java/62837 java linux-sun-jdk14 executables hang with COMPAT_LINUX in 29 problems total. From owner-freebsd-java@FreeBSD.ORG Mon Jun 6 17:56:41 2011 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 6C9A2106564A for ; Mon, 6 Jun 2011 17:56:41 +0000 (UTC) (envelope-from colintrebla@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 23E718FC0A for ; Mon, 6 Jun 2011 17:56:40 +0000 (UTC) Received: by ywf7 with SMTP id 7so2407543ywf.13 for ; Mon, 06 Jun 2011 10:56:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=8gBSsdSgtT8Oih1uxtuV6XreYVpePnRxFKAJHJaxZWM=; b=u0dNT1eciabM1Ntgm0lMKDVnLTOKhkMtbPQ5o5spdbAFMclfskaG1woUXmR9esl/8N OAagiUnt86TG6crUduKNGtq3lKEPD9IKQp/Q0OyaWusfXVrEqCHMO/+QhQh0GJ0K3iU9 e16VSWmZqoPOZvQFmZPE9N3NOw03Eef44dEns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=gMemwyGFzeRf0syrR45e2rXMeB16pSY26Tfa/k3QSHr685MhgO3sqyVvmkP8V/a0I2 XBRWC/fUFs1zjCJ9V1cje8ByWAn9TWwU/ekS0jumMQMrJoWz22y1yFMtMJvXJtILDfKP xZjS8S+O8CUE9VvH2RBpfPy3Sp60dcfU1LWO4= Received: by 10.91.207.19 with SMTP id j19mr4626392agq.83.1307381305151; Mon, 06 Jun 2011 10:28:25 -0700 (PDT) Received: from screamer.oskar.e-alberts.com (cpe-071-075-231-165.carolina.res.rr.com [71.75.231.165]) by mx.google.com with ESMTPS id 19sm3427210anx.10.2011.06.06.10.28.23 (version=SSLv3 cipher=OTHER); Mon, 06 Jun 2011 10:28:23 -0700 (PDT) Message-ID: <4DED0E3C.5020705@gmail.com> Date: Mon, 06 Jun 2011 13:28:28 -0400 From: Colin Albert User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110515 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-java@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Issue with compiling OpenJDK on FreeBSD 8 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: Mon, 06 Jun 2011 17:56:41 -0000 On 06/02/11 22:51, Mario Lopez wrote: > I am aware of needing to download the Diablo-caffe file from the FreeBSD > Foundation, but I have not been able to find out a way of how to do this in > the CLI? I've tried fetch, but that just downloads the php part of the > webpage. What tool is provided with FreeBSD so that I can accept the > agreement and download the file? > > > > Thanks for your help, > > > > > > > > Mario Lopez > > > > _______________________________________________ > 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" > There is an agreement that you have to accept so I don't know that there is a (simple) way to do it without a browser. You may be able to use a curses browser to accept the agreement. If you don't want to have a browser on that machine you can download it another machine and move it into distfiles from there. Colin From owner-freebsd-java@FreeBSD.ORG Wed Jun 8 19:01:23 2011 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 80D95106564A for ; Wed, 8 Jun 2011 19:01:23 +0000 (UTC) (envelope-from prvs=114023f9f1=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id F02AA8FC13 for ; Wed, 8 Jun 2011 19:01:22 +0000 (UTC) X-MDAV-Processed: mail1.multiplay.co.uk, Wed, 08 Jun 2011 19:50:01 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Wed, 08 Jun 2011 19:50:01 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50013516691.msg for ; Wed, 08 Jun 2011 19:50:00 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=114023f9f1=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-java@freebsd.org Message-ID: <82AE59EF1F6D4E7FA7AF3E2CD549278B@multiplay.co.uk> From: "Steven Hartland" To: Date: Wed, 8 Jun 2011 19:50:32 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Subject: jdk opening connection to self on socket creation 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: Wed, 08 Jun 2011 19:01:23 -0000 I'm trying to find a bug which looks like its in the jdk where by when you create a ServerSocket in java it opens a connection to itself on loopback prior to creating the requested socket. This wouldn't be an issue if it was cleanly shutting dow said socket but it isn't. This is preventing jail clean shutdown in a timely manor as the socket is left in TIME_WAIT. The following code causes this behviour:- import java.net.InetAddress; import java.net.ServerSocket; public class Main { public static void main(String[] args) throws java.io.IOException { InetAddress inetaddress = InetAddress.getByName( "10.10.0.21" ); ServerSocket d = new ServerSocket(25665, 0, inetaddress); System.out.println( "Done" ); } } If you then perform a netstat -na | grep 127.0.0.1 you will see the offending socket e.g. tcp4 0 0 127.0.0.1.26948 127.0.0.1.46429 TIME_WAIT This looks like it might be caused by libnet.so in the jre being loaded bi SocketAddres? write(1,"[Loaded java.net.SocksSocketImpl"...,74) = 74 (0x4a) stat("/usr/local/openjdk6/jre/lib/amd64/libnet.so",{ mode=-rwxr-xr-x ,inode=76507,size=98571,blksize=98816 }) = 0 (0x0) socket(PF_INET,SOCK_STREAM,0) = 5 (0x5) listen(0x5,0x1,0x0,0x1a,0x2,0x80535a8b8) = 0 (0x0) getsockname(5,{ AF_INET 0.0.0.0:12095 },0x7fffffbfe37c) = 0 (0x0) socket(PF_INET,SOCK_STREAM,0) = 6 (0x6) connect(6,{ AF_INET 127.0.0.1:12095 },16) = 0 (0x0) fcntl(5,F_GETFL,) = 2 (0x2) fcntl(5,F_SETFL,O_NONBLOCK|0x2) = 0 (0x0) accept(5,{ AF_INET 127.0.0.1:38895 },0x7fffffbfe37c) = 7 (0x7) shutdown(6,SHUT_RDWR) = 0 (0x0) close(7) = 0 (0x0) close(5) = 0 (0x0) lseek(3,0x2cce5e0,SEEK_SET) = 46982624 (0x2cce5e0) read(3,"PK\^C\^D\n\0\0\0\0\0I\M^W{>\M-/"...,30) = 30 (0x1e) lseek(3,0x2cce61e,SEEK_SET) = 46982686 (0x2cce61e) read(3,"\M-J\M-~\M-:\M->\0\0\0001\0z\n\0"...,3028) = 3028 (0xbd4) lseek(3,0x2cce4b9,SEEK_SET) = 46982329 (0x2cce4b9) read(3,"PK\^C\^D\n\0\0\0\0\0G\M^W{>K0"...,30) = 30 (0x1e) lseek(3,0x2cce4f3,SEEK_SET) = 46982387 (0x2cce4f3) read(3,"\M-J\M-~\M-:\M->\0\0\0001\0\^O\n"...,237) = 237 (0xed) write(1,"[Loaded java.net.SocketAddress f"...,72) = 72 (0x48) Any ideas? Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-java@FreeBSD.ORG Wed Jun 8 20:51:27 2011 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 AE4001065675 for ; Wed, 8 Jun 2011 20:51:27 +0000 (UTC) (envelope-from prvs=114023f9f1=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 3C0658FC19 for ; Wed, 8 Jun 2011 20:51:26 +0000 (UTC) X-MDAV-Processed: mail1.multiplay.co.uk, Wed, 08 Jun 2011 21:50:43 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Wed, 08 Jun 2011 21:50:43 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50013517751.msg for ; Wed, 08 Jun 2011 21:50:42 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=114023f9f1=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-java@freebsd.org Message-ID: From: "Steven Hartland" To: References: <82AE59EF1F6D4E7FA7AF3E2CD549278B@multiplay.co.uk> Date: Wed, 8 Jun 2011 21:51:14 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Subject: Re: jdk opening connection to self on socket creation 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: Wed, 08 Jun 2011 20:51:27 -0000 Ok I've found the code thats causing the problem its the static initialiser for PlainSocketImpl which calls getMarkerFD that specifically creates a connection to itself on loopback. /* * Create the marker file descriptor by establishing a loopback connection * which we shutdown but do not close the fd. The result is an fd that * can be used for read/write. */ This explicitly creates a socket but doesn't close it as you can see from the comment. This means you end up with a socket in TIME_WAIT, which in our case was preventing timely restart of any jails that run java processes that create sockets. A workaround could be to use the no local time wait sysctl but I don't know what other effects this could have. net.inet.tcp.nolocaltimewait=1 Alternatively replacing this code with the version now included in jdk7, which uses unix domain sockets instead, is what we're using and can confirm fixes the issues with jail shutdowns The patch can be found here:- http://hg.openjdk.java.net/jdk7/build/jdk/rev/7c9d632e7323 Regards Steve ----- Original Message ----- From: "Steven Hartland" To: Sent: Wednesday, June 08, 2011 7:50 PM Subject: jdk opening connection to self on socket creation > I'm trying to find a bug which looks like its in the jdk > where by when you create a ServerSocket in java it opens > a connection to itself on loopback prior to creating > the requested socket. > > This wouldn't be an issue if it was cleanly shutting dow > said socket but it isn't. This is preventing jail clean > shutdown in a timely manor as the socket is left in TIME_WAIT. > > The following code causes this behviour:- > > import java.net.InetAddress; > import java.net.ServerSocket; > > public class Main { > public static void main(String[] args) throws java.io.IOException { > InetAddress inetaddress = InetAddress.getByName( "10.10.0.21" ); > ServerSocket d = new ServerSocket(25665, 0, inetaddress); > System.out.println( "Done" ); > } > } > > If you then perform a netstat -na | grep 127.0.0.1 you > will see the offending socket e.g. > tcp4 0 0 127.0.0.1.26948 127.0.0.1.46429 TIME_WAIT > > This looks like it might be caused by libnet.so in the jre > being loaded bi SocketAddres? > > write(1,"[Loaded java.net.SocksSocketImpl"...,74) = 74 (0x4a) > stat("/usr/local/openjdk6/jre/lib/amd64/libnet.so",{ mode=-rwxr-xr-x ,inode=76507,size=98571,blksize=98816 }) = 0 (0x0) > socket(PF_INET,SOCK_STREAM,0) = 5 (0x5) > listen(0x5,0x1,0x0,0x1a,0x2,0x80535a8b8) = 0 (0x0) > getsockname(5,{ AF_INET 0.0.0.0:12095 },0x7fffffbfe37c) = 0 (0x0) > socket(PF_INET,SOCK_STREAM,0) = 6 (0x6) > connect(6,{ AF_INET 127.0.0.1:12095 },16) = 0 (0x0) > fcntl(5,F_GETFL,) = 2 (0x2) > fcntl(5,F_SETFL,O_NONBLOCK|0x2) = 0 (0x0) > accept(5,{ AF_INET 127.0.0.1:38895 },0x7fffffbfe37c) = 7 (0x7) > shutdown(6,SHUT_RDWR) = 0 (0x0) > close(7) = 0 (0x0) > close(5) = 0 (0x0) > lseek(3,0x2cce5e0,SEEK_SET) = 46982624 (0x2cce5e0) > read(3,"PK\^C\^D\n\0\0\0\0\0I\M^W{>\M-/"...,30) = 30 (0x1e) > lseek(3,0x2cce61e,SEEK_SET) = 46982686 (0x2cce61e) > read(3,"\M-J\M-~\M-:\M->\0\0\0001\0z\n\0"...,3028) = 3028 (0xbd4) > lseek(3,0x2cce4b9,SEEK_SET) = 46982329 (0x2cce4b9) > read(3,"PK\^C\^D\n\0\0\0\0\0G\M^W{>K0"...,30) = 30 (0x1e) > lseek(3,0x2cce4f3,SEEK_SET) = 46982387 (0x2cce4f3) > read(3,"\M-J\M-~\M-:\M->\0\0\0001\0\^O\n"...,237) = 237 (0xed) > write(1,"[Loaded java.net.SocketAddress f"...,72) = 72 (0x48) > > Any ideas? > > Regards > Steve > > > ================================================ > This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the > event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any > information contained in it. > In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 > or return the E.mail to postmaster@multiplay.co.uk. > > _______________________________________________ > 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" > ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk.