From owner-freebsd-java@FreeBSD.ORG Sun Jan 30 22:54:18 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 A3AB31065673 for ; Sun, 30 Jan 2011 22:54:18 +0000 (UTC) (envelope-from devnullaccount@yahoo.se) Received: from nm7.bullet.mail.ird.yahoo.com (nm7.bullet.mail.ird.yahoo.com [77.238.189.21]) by mx1.freebsd.org (Postfix) with SMTP id 0ADDE8FC08 for ; Sun, 30 Jan 2011 22:54:17 +0000 (UTC) Received: from [77.238.189.57] by nm7.bullet.mail.ird.yahoo.com with NNFMP; 30 Jan 2011 22:40:16 -0000 Received: from [212.82.108.249] by tm10.bullet.mail.ird.yahoo.com with NNFMP; 30 Jan 2011 22:40:16 -0000 Received: from [127.0.0.1] by omp1014.mail.ird.yahoo.com with NNFMP; 30 Jan 2011 22:40:16 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 731401.70569.bm@omp1014.mail.ird.yahoo.com Received: (qmail 35822 invoked by uid 60001); 30 Jan 2011 22:40:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.se; s=s1024; t=1296427216; bh=FCpnVjL1UVMXkS/lg01sIj7jrhyJqzyyjJ/l85OrkPY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=tVsJzWsNIjIsUiBGHAo9y7R9nbRtTklVwEwXrU/ESK3Pk9HadnH3uZEM54gKU2kWw1R79U5UznumhUnWbSc3ENLdjxobrC5sJGrQZViDbt/3kOruHpsJq6JitVl4yg2Y5q9xOYTo+Y0PTb1MomXG99Y32pDB/H5eqhUvTqRURHY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.se; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=QKYa8VNHU5RQdkNFucFN1ezmGDHMXET7LaQC1YTkJXmSYvaHUrGbWGU1FwTpFVOcq2FOiKxUv3W2JAGvut+Uk+2Kwm/5VYLslBRaEpqP2unT4NO4GvB+aI2EHAuptWeAGxGwD3SWaxvxDP7QTGvyVWjU7qDyxaS/6ryCxxMA6XA=; Message-ID: <591837.33750.qm@web29013.mail.ird.yahoo.com> X-YMail-OSG: K2.PIjIVM1mDaVeRkxVwdpzpFk5TQAXo76qfL_M8bttN1y8 Ms1vW3QPm_YH2hG_QlFL5upi4foOpGkyFo4l.gJhXOJjfqxG1z71jgCZMowp SAGD2hEH.0qA35rOyeEDaLmzs2ayW98skVqt3HZYftFxneTfAHOjio.rkW3Z 5WX6lUKmd6f2JxtfWb3E0_3X38K3mR8jBVK7iL9B6CPRD_vN4gGu.VKJ_HS4 7RWX9.8YxhfqBL0coXjXe34cwPsz5O4fGQyYSBLtJcmi8KCLN8m_5uEfVl2v BNPvRmKbXCyAsjigBozpVrOyPr5dBaMyJ0qPeE0UwQ1lH_rOD1Jo- Received: from [213.113.1.56] by web29013.mail.ird.yahoo.com via HTTP; Sun, 30 Jan 2011 22:40:16 GMT X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.107.285259 Date: Sun, 30 Jan 2011 22:40:16 +0000 (GMT) From: Chris To: freebsd-java@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Sound not working from openjdk6? 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: Sun, 30 Jan 2011 22:54:18 -0000 Hi, I'm trying out the sound APIs in Java under FreeBSD 8.1 with the latest openjdk6 on an amd64 platform: openjdk version "1.6.0" OpenJDK Runtime Environment (build 1.6.0-b20) OpenJDK 64-Bit Server VM (build 17.0-b16, mixed mode) And whatever I try do do with the sound system, I get exceptions saying the format is unsupported, and I don't know if it is me or the platform.. I'm getting the same errors as pointed out in an old thread on this list: http://lists.freebsd.org/pipermail/freebsd-java/2006-February/004958.html And trying the test program from the same thread: http://lists.freebsd.org/pipermail/freebsd-java/2006-February/004959.html Gives errors that "No line matching interface SourceDataLine is supported." (and the same for TargetDataLine). Am I doing something seriously wrong (e.g. is there something I should have initialized?) or is this known to not work? Btw, /dev/sndstat says (running snd_hda driver, which works fine from e.g. mplayer, so the sound in the OS is working at least): FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) Installed devices: pcm0: (play/rec) default pcm1: (play) pcm2: (play) pcm3: (play) pcm4: (play) pcm5: (play) pcm6: (play) Any help appreciated. /Chris From owner-freebsd-java@FreeBSD.ORG Mon Jan 31 04:10:43 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 C8391106566C; Mon, 31 Jan 2011 04:10:43 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from smtp.utwente.nl (smtp1.utsp.utwente.nl [130.89.2.8]) by mx1.freebsd.org (Postfix) with ESMTP id 4662D8FC18; Mon, 31 Jan 2011 04:10:38 +0000 (UTC) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by smtp.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id p0V3njTN028051; Mon, 31 Jan 2011 04:49:45 +0100 From: Pieter de Goeje To: freebsd-java@freebsd.org Date: Mon, 31 Jan 2011 04:47:01 +0100 User-Agent: KMail/1.9.10 References: <201101261721.58069.jkim@FreeBSD.org> In-Reply-To: <201101261721.58069.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201101310447.02285.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: Jung-uk Kim Subject: Re: [CFT] Update OpenJDK6 to b21 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, 31 Jan 2011 04:10:43 -0000 On Wednesday 26 January 2011 23:21:55 Jung-uk Kim wrote: > I have updated ports/java/openjdk6 to b21 and it's available from > here: > > http://people.freebsd.org/~jkim/ports-openjdk6-b21.tar.bz2 > > Please test if you can. Note files/patch-nio-kqueue is integrated > with patch-set now, so you have to remove it if you want to extract > the tarball directly on existing openjdk6 directory. > > If there is no serious regression, I am going to commit it in a week > or so. Both Glassfish 3.1 and the Minecraft server appear to be running fine on it. However jconsole and jstack do not seem to work anymore: jconsole refuses to attach and jstack seems broken ("well-known file is not secure"). These commands used to work in b20. I am not sure if both programs fail due to the same underlying cause, because jconsole logs nothing to console. - Pieter From owner-freebsd-java@FreeBSD.ORG Mon Jan 31 11:07:04 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 8B02D10656A8 for ; Mon, 31 Jan 2011 11:07:04 +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 5FCC78FC1A for ; Mon, 31 Jan 2011 11:07:04 +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 p0VB74VR091818 for ; Mon, 31 Jan 2011 11:07:04 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0VB73We091816 for freebsd-java@FreeBSD.org; Mon, 31 Jan 2011 11:07:03 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 31 Jan 2011 11:07:03 GMT Message-Id: <201101311107.p0VB73We091816@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, 31 Jan 2011 11:07:04 -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/153301 java java/openjdk6 web browser plugin doesn't work with bot 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 ports/142704 java [PATCH] java/jai-imageio: use $SUB_FILES to dynamicall o java/141919 java Serious remote vulnerability in the JRE 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 o 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/118496 java Eclipse packages do not work with 6.3-RC1/amd64 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 o ports/113467 java Multiple "missing return value" errors building JDK on f java/112595 java Java appletviewer frequently hangs (kse_release loop) o java/110912 java Java krb5 client leaks UDP connections f java/105482 java diablo-jdk1.5.0/jdk-1.5.0 java.nio.Selector bug o java/97461 java Diablo JDK does not report Update level in a format su s java/62837 java linux-sun-jdk14 executables hang with COMPAT_LINUX in 30 problems total. From owner-freebsd-java@FreeBSD.ORG Mon Jan 31 11:07:29 2011 Return-Path: Delivered-To: java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CB5C10656E4 for ; Mon, 31 Jan 2011 11:07:29 +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 62A1E8FC27 for ; Mon, 31 Jan 2011 11:07:29 +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 p0VB7TO6092177 for ; Mon, 31 Jan 2011 11:07:29 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0VB7Smn092175 for java@FreeBSD.org; Mon, 31 Jan 2011 11:07:28 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 31 Jan 2011 11:07:28 GMT Message-Id: <201101311107.p0VB7Smn092175@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: java@FreeBSD.org Cc: Subject: Current problem reports assigned to 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, 31 Jan 2011 11:07:29 -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/154188 java Update java/linux-sun-jdk* ports to their latest versi 1 problem total. From owner-freebsd-java@FreeBSD.ORG Mon Jan 31 21:10:58 2011 Return-Path: Delivered-To: java@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFBAF106564A; Mon, 31 Jan 2011 21:10:58 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 96EFC8FC16; Mon, 31 Jan 2011 21:10:58 +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 p0VLAwGm048331; Mon, 31 Jan 2011 21:10:58 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0VLAwBL048321; Mon, 31 Jan 2011 21:10:58 GMT (envelope-from linimon) Date: Mon, 31 Jan 2011 21:10:58 GMT Message-Id: <201101312110.p0VLAwBL048321@freefall.freebsd.org> To: linimon@FreeBSD.org, java@FreeBSD.org, freebsd-java@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: ports/154188: Update java/linux-sun-jdk* ports to their latest versions 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, 31 Jan 2011 21:10:58 -0000 Synopsis: Update java/linux-sun-jdk* ports to their latest versions Responsible-Changed-From-To: java->freebsd-java Responsible-Changed-By: linimon Responsible-Changed-When: Mon Jan 31 21:10:48 UTC 2011 Responsible-Changed-Why: Canonicalize assignment. http://www.freebsd.org/cgi/query-pr.cgi?pr=154188 From owner-freebsd-java@FreeBSD.ORG Mon Jan 31 21:10:58 2011 Return-Path: Delivered-To: freebsd-java@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFBAF106564A; Mon, 31 Jan 2011 21:10:58 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 96EFC8FC16; Mon, 31 Jan 2011 21:10:58 +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 p0VLAwGm048331; Mon, 31 Jan 2011 21:10:58 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p0VLAwBL048321; Mon, 31 Jan 2011 21:10:58 GMT (envelope-from linimon) Date: Mon, 31 Jan 2011 21:10:58 GMT Message-Id: <201101312110.p0VLAwBL048321@freefall.freebsd.org> To: linimon@FreeBSD.org, java@FreeBSD.org, freebsd-java@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: ports/154188: Update java/linux-sun-jdk* ports to their latest versions 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, 31 Jan 2011 21:10:58 -0000 Synopsis: Update java/linux-sun-jdk* ports to their latest versions Responsible-Changed-From-To: java->freebsd-java Responsible-Changed-By: linimon Responsible-Changed-When: Mon Jan 31 21:10:48 UTC 2011 Responsible-Changed-Why: Canonicalize assignment. http://www.freebsd.org/cgi/query-pr.cgi?pr=154188 From owner-freebsd-java@FreeBSD.ORG Wed Feb 2 07:07:58 2011 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 29480106564A; Wed, 2 Feb 2011 07:07:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-java@freebsd.org Date: Wed, 2 Feb 2011 02:07:35 -0500 User-Agent: KMail/1.6.2 References: <201101261721.58069.jkim@FreeBSD.org> <201101310447.02285.pieter@degoeje.nl> In-Reply-To: <201101310447.02285.pieter@degoeje.nl> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102020207.46685.jkim@FreeBSD.org> Cc: Pieter de Goeje Subject: Re: [CFT] Update OpenJDK6 to b21 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, 02 Feb 2011 07:07:58 -0000 On Sunday 30 January 2011 10:47 pm, Pieter de Goeje wrote: > On Wednesday 26 January 2011 23:21:55 Jung-uk Kim wrote: > > I have updated ports/java/openjdk6 to b21 and it's available from > > here: > > > > http://people.freebsd.org/~jkim/ports-openjdk6-b21.tar.bz2 > > > > Please test if you can. Note files/patch-nio-kqueue is > > integrated with patch-set now, so you have to remove it if you > > want to extract the tarball directly on existing openjdk6 > > directory. > > > > If there is no serious regression, I am going to commit it in a > > week or so. > > Both Glassfish 3.1 and the Minecraft server appear to be running > fine on it. > > However jconsole and jstack do not seem to work anymore: > jconsole refuses to attach and jstack seems broken ("well-known > file is not secure"). These commands used to work in b20. I am not > sure if both programs fail due to the same underlying cause, > because jconsole logs nothing to console. Please try the updated ports: http://people.freebsd.org/~jkim/ports-openjdk6-b21_1.tar.bz2 Both jconsole and jstack should work now. Jung-uk Kim From owner-freebsd-java@FreeBSD.ORG Wed Feb 2 08:10:05 2011 Return-Path: Delivered-To: java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CA70106564A for ; Wed, 2 Feb 2011 08:10:05 +0000 (UTC) (envelope-from mi+thun@aldan.algebra.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 31D188FC15 for ; Wed, 2 Feb 2011 08:10:04 +0000 (UTC) Received: from mr17.lnh.mail.rcn.net ([207.172.157.37]) by smtp02.lnh.mail.rcn.net with ESMTP; 02 Feb 2011 02:41:55 -0500 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr17.lnh.mail.rcn.net (MOS 4.1.9-GA) with ESMTP id ASD58428; Wed, 2 Feb 2011 02:41:54 -0500 X-Auth-ID: anat Received: from 209-6-61-133.c3-0.sbo-ubr1.sbo.ma.cable.rcn.com (HELO [192.168.1.8]) ([209.6.61.133]) by smtp01.lnh.mail.rcn.net with ESMTP; 02 Feb 2011 02:41:55 -0500 Message-ID: <4D490AC0.5080905@aldan.algebra.com> Date: Wed, 02 Feb 2011 02:41:52 -0500 From: "Mikhail T." User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; uk-UA; rv:1.9.2.12) Gecko/20101114 Thunderbird/3.1.6 MIME-Version: 1.0 To: java@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: image-manipulation in Java without X11 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, 02 Feb 2011 08:10:05 -0000 Hello! I'm trying to port a Java-application, which sometimes needs to process (get dimensions, possibly -- resize) a few images. Whenever it does this, it needs a valid $DISPLAY in the environment, otherwise an exception like this is thrown: |java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68) at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135) | Apparently, the first thing AWT is doing is initialize X11 -- even if it is not going to need X11 for anything... This makes the program (almost) unusable as a daemon... I wonder if it is possible to a) make AWT a little smarter in this regard -- even if only on FreeBSD; or b) do image-processing in Java using some other classes?.. Thanks! Yours, -mi || From owner-freebsd-java@FreeBSD.ORG Wed Feb 2 08:56:47 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 CA93C1065672 for ; Wed, 2 Feb 2011 08:56:47 +0000 (UTC) (envelope-from achill@matrix.gatewaynet.com) Received: from smadev.internal.net (host3.dynacom.ondsl.gr [62.103.35.211]) by mx1.freebsd.org (Postfix) with ESMTP id 104D48FC12 for ; Wed, 2 Feb 2011 08:56:46 +0000 (UTC) Received: from smadev.internal.net (localhost.internal.net [127.0.0.1]) by smadev.internal.net (8.14.2/8.14.2) with ESMTP id p128io6f050241 for ; Wed, 2 Feb 2011 10:44:50 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Received: from localhost (localhost [[UNIX: localhost]]) by smadev.internal.net (8.14.2/8.14.2/Submit) id p128inMp050240 for freebsd-java@freebsd.org; Wed, 2 Feb 2011 10:44:49 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) From: Achilleas Mantzios Organization: Dynacom Tankers Mgmt To: freebsd-java@freebsd.org Date: Wed, 2 Feb 2011 10:44:48 +0200 User-Agent: KMail/1.9.7 References: <4D490AC0.5080905@aldan.algebra.com> In-Reply-To: <4D490AC0.5080905@aldan.algebra.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201102021044.49408.achill@matrix.gatewaynet.com> Subject: Re: image-manipulation in Java without X11 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, 02 Feb 2011 08:56:47 -0000 try java -Djava.awt.headless=3Dtrue=20 =CE=A3=CF=84=CE=B9=CF=82 Wednesday 02 February 2011 09:41:52 =CE=BF/=CE=B7 = Mikhail T. =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > Hello! >=20 > I'm trying to port a Java-application, which sometimes needs to process=20 > (get dimensions, possibly -- resize) a few images. Whenever it does=20 > this, it needs a valid $DISPLAY in the environment, otherwise an=20 > exception like this is thrown: >=20 > |java.lang.InternalError: Can't connect to X11 window server using > ':0.0' as the value of the DISPLAY variable. > at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) > at > sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java= :52) > at > sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155) > at java.security.AccessController.doPrivileged(Native Method) > at > sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:1= 31) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:169) > at > java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi= ronment.java:68) > at > java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135) > | >=20 > Apparently, the first thing AWT is doing is initialize X11 -- even if it= =20 > is not going to need X11 for anything... This makes the program (almost)= =20 > unusable as a daemon... >=20 > I wonder if it is possible to a) make AWT a little smarter in this=20 > regard -- even if only on FreeBSD; or b) do image-processing in Java=20 > using some other classes?.. >=20 > Thanks! Yours, >=20 > -mi >=20 > || > _______________________________________________ > 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" >=20 =2D-=20 Achilleas Mantzios From owner-freebsd-java@FreeBSD.ORG Wed Feb 2 18:45:38 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 8CE881065675; Wed, 2 Feb 2011 18:45:38 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from mx.utwente.nl (mx3.utsp.utwente.nl [130.89.2.14]) by mx1.freebsd.org (Postfix) with ESMTP id 0E2128FC3D; Wed, 2 Feb 2011 18:45:37 +0000 (UTC) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by mx.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id p12IjVt2028349; Wed, 2 Feb 2011 19:45:31 +0100 From: Pieter de Goeje To: "Jung-uk Kim" Date: Wed, 2 Feb 2011 19:45:31 +0100 User-Agent: KMail/1.9.10 References: <201101261721.58069.jkim@FreeBSD.org> <201101310447.02285.pieter@degoeje.nl> <201102020207.46685.jkim@FreeBSD.org> In-Reply-To: <201102020207.46685.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201102021945.31808.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: freebsd-java@freebsd.org Subject: Re: [CFT] Update OpenJDK6 to b21 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, 02 Feb 2011 18:45:38 -0000 On Wednesday 02 February 2011 08:07:35 Jung-uk Kim wrote: > On Sunday 30 January 2011 10:47 pm, Pieter de Goeje wrote: > > On Wednesday 26 January 2011 23:21:55 Jung-uk Kim wrote: > > > I have updated ports/java/openjdk6 to b21 and it's available from > > > here: > > > > > > http://people.freebsd.org/~jkim/ports-openjdk6-b21.tar.bz2 > > > > > > Please test if you can. Note files/patch-nio-kqueue is > > > integrated with patch-set now, so you have to remove it if you > > > want to extract the tarball directly on existing openjdk6 > > > directory. > > > > > > If there is no serious regression, I am going to commit it in a > > > week or so. > > > > Both Glassfish 3.1 and the Minecraft server appear to be running > > fine on it. > > > > However jconsole and jstack do not seem to work anymore: > > jconsole refuses to attach and jstack seems broken ("well-known > > file is not secure"). These commands used to work in b20. I am not > > sure if both programs fail due to the same underlying cause, > > because jconsole logs nothing to console. > > Please try the updated ports: > > http://people.freebsd.org/~jkim/ports-openjdk6-b21_1.tar.bz2 > > Both jconsole and jstack should work now. > > Jung-uk Kim Impressive, even jmap works now :). I've also built and ran eclipse with success. So everything looks OK to me. Cheers, Pieter From owner-freebsd-java@FreeBSD.ORG Wed Feb 2 18:54:19 2011 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id C578F1065673; Wed, 2 Feb 2011 18:54:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-java@freebsd.org Date: Wed, 2 Feb 2011 13:54:05 -0500 User-Agent: KMail/1.6.2 References: <201101261721.58069.jkim@FreeBSD.org> <201102020207.46685.jkim@FreeBSD.org> <201102021945.31808.pieter@degoeje.nl> In-Reply-To: <201102021945.31808.pieter@degoeje.nl> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102021354.13333.jkim@FreeBSD.org> Cc: Pieter de Goeje Subject: Re: [CFT] Update OpenJDK6 to b21 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, 02 Feb 2011 18:54:19 -0000 On Wednesday 02 February 2011 01:45 pm, Pieter de Goeje wrote: > On Wednesday 02 February 2011 08:07:35 Jung-uk Kim wrote: > > On Sunday 30 January 2011 10:47 pm, Pieter de Goeje wrote: > > > On Wednesday 26 January 2011 23:21:55 Jung-uk Kim wrote: > > > > I have updated ports/java/openjdk6 to b21 and it's available > > > > from here: > > > > > > > > http://people.freebsd.org/~jkim/ports-openjdk6-b21.tar.bz2 > > > > > > > > Please test if you can. Note files/patch-nio-kqueue is > > > > integrated with patch-set now, so you have to remove it if > > > > you want to extract the tarball directly on existing openjdk6 > > > > directory. > > > > > > > > If there is no serious regression, I am going to commit it in > > > > a week or so. > > > > > > Both Glassfish 3.1 and the Minecraft server appear to be > > > running fine on it. > > > > > > However jconsole and jstack do not seem to work anymore: > > > jconsole refuses to attach and jstack seems broken ("well-known > > > file is not secure"). These commands used to work in b20. I am > > > not sure if both programs fail due to the same underlying > > > cause, because jconsole logs nothing to console. > > > > Please try the updated ports: > > > > http://people.freebsd.org/~jkim/ports-openjdk6-b21_1.tar.bz2 > > > > Both jconsole and jstack should work now. > > > > Jung-uk Kim > > Impressive, even jmap works now :). I've also built and ran eclipse > with success. So everything looks OK to me. Yeah, I actually fixed that. Some patches were missing in b20 ports. 'jstack -m' should work, too. :-) Thanks for testing! Jung-uk Kim From owner-freebsd-java@FreeBSD.ORG Thu Feb 3 18:27:30 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 849EB106566B; Thu, 3 Feb 2011 18:27:30 +0000 (UTC) (envelope-from mike.jakubik@intertainservices.com) Received: from mail.intertainservices.com (mail.intertainservices.com [69.77.177.114]) by mx1.freebsd.org (Postfix) with ESMTP id 50DE58FC13; Thu, 3 Feb 2011 18:27:30 +0000 (UTC) Received: from [172.16.10.166] (unknown [172.16.10.166]) by mail.intertainservices.com (Postfix) with ESMTPA id 6B1A8572BC; Thu, 3 Feb 2011 13:09:09 -0500 (EST) From: Mike Jakubik To: Jung-uk Kim In-Reply-To: <201102021354.13333.jkim@FreeBSD.org> References: <201101261721.58069.jkim@FreeBSD.org> <201102020207.46685.jkim@FreeBSD.org> <201102021945.31808.pieter@degoeje.nl> <201102021354.13333.jkim@FreeBSD.org> Date: Thu, 03 Feb 2011 13:09:09 -0500 Message-ID: <1296756549.2298.3.camel@mjakubik-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 X-intertainservices-MailScanner-Information: Please contact the ISP for more information X-intertainservices-MailScanner-ID: 6B1A8572BC.A0953 X-intertainservices-MailScanner: Found to be clean X-intertainservices-MailScanner-From: mike.jakubik@intertainservices.com X-Spam-Status: No Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Pieter de Goeje , freebsd-java@freebsd.org Subject: Re: [CFT] Update OpenJDK6 to b21 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: Thu, 03 Feb 2011 18:27:30 -0000 On Wed, 2011-02-02 at 13:54 -0500, Jung-uk Kim wrote: > Yeah, I actually fixed that. Some patches were missing in b20 ports. > 'jstack -m' should work, too. :-) > > Thanks for testing! Compiled OK and working with my applications OK. The jstack -m option you mention however produces the following results here: Attaching to process ID 84046, please wait... Debugger attached successfully. Server compiler detected. JVM version is 19.0-b09 sun.jvm.hotspot.debugger.DebuggerException: sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed for a lwp at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal $BsdDebuggerLocalWorkerThread.execute(BsdDebuggerLocal.java:152) at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.getThreadIntegerRegisterSet(BsdDebuggerLocal.java:466) at sun.jvm.hotspot.debugger.bsd.BsdThread.getContext(BsdThread.java:65) at sun.jvm.hotspot.runtime.bsd_amd64.BsdAMD64JavaThreadPDAccess.getCurrentFrameGuess(BsdAMD64JavaThreadPDAccess.java:92) at sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThread.java:256) at sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread.java:218) at sun.jvm.hotspot.tools.PStack.initJFrameCache(PStack.java:208) at sun.jvm.hotspot.tools.PStack.run(PStack.java:66) at sun.jvm.hotspot.tools.PStack.run(PStack.java:53) at sun.jvm.hotspot.tools.PStack.run(PStack.java:48) at sun.jvm.hotspot.tools.JStack.run(JStack.java:60) at sun.jvm.hotspot.tools.Tool.start(Tool.java:221) at sun.jvm.hotspot.tools.JStack.main(JStack.java:86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at sun.tools.jstack.JStack.runJStackTool(JStack.java:136) at sun.tools.jstack.JStack.main(JStack.java:102) Thanks! From owner-freebsd-java@FreeBSD.ORG Thu Feb 3 21:24:45 2011 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id B7EDD106564A; Thu, 3 Feb 2011 21:24:45 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-java@freebsd.org Date: Thu, 3 Feb 2011 16:24:36 -0500 User-Agent: KMail/1.6.2 References: <201101261721.58069.jkim@FreeBSD.org> <201102021354.13333.jkim@FreeBSD.org> <1296756549.2298.3.camel@mjakubik-laptop> In-Reply-To: <1296756549.2298.3.camel@mjakubik-laptop> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102031624.38310.jkim@FreeBSD.org> Cc: Pieter de Goeje , Mike Jakubik Subject: Re: [CFT] Update OpenJDK6 to b21 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: Thu, 03 Feb 2011 21:24:46 -0000 On Thursday 03 February 2011 01:09 pm, Mike Jakubik wrote: > On Wed, 2011-02-02 at 13:54 -0500, Jung-uk Kim wrote: > > Yeah, I actually fixed that. Some patches were missing in b20 > > ports. 'jstack -m' should work, too. :-) > > > > Thanks for testing! > > Compiled OK and working with my applications OK. The jstack -m > option you mention however produces the following results here: > > Attaching to process ID 84046, please wait... > Debugger attached successfully. > Server compiler detected. > JVM version is 19.0-b09 > sun.jvm.hotspot.debugger.DebuggerException: > sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs failed > for a lwp > at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal > $BsdDebuggerLocalWorkerThread.execute(BsdDebuggerLocal.java:152) > at > sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.getThreadIntegerRegis >terSet(BsdDebuggerLocal.java:466) at > sun.jvm.hotspot.debugger.bsd.BsdThread.getContext(BsdThread.java:65 >) at > sun.jvm.hotspot.runtime.bsd_amd64.BsdAMD64JavaThreadPDAccess.getCur >rentFrameGuess(BsdAMD64JavaThreadPDAccess.java:92) at > sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThread. >java:256) at > sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThread. >java:218) at > sun.jvm.hotspot.tools.PStack.initJFrameCache(PStack.java:208) at > sun.jvm.hotspot.tools.PStack.run(PStack.java:66) > at sun.jvm.hotspot.tools.PStack.run(PStack.java:53) > at sun.jvm.hotspot.tools.PStack.run(PStack.java:48) > at sun.jvm.hotspot.tools.JStack.run(JStack.java:60) > at sun.jvm.hotspot.tools.Tool.start(Tool.java:221) > at sun.jvm.hotspot.tools.JStack.main(JStack.java:86) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp >l.java:57) at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc >essorImpl.java:43) at > java.lang.reflect.Method.invoke(Method.java:616) > at sun.tools.jstack.JStack.runJStackTool(JStack.java:136) > at sun.tools.jstack.JStack.main(JStack.java:102) Yeah, I noticed that, too. It seems it's getting bogus thread IDs. It'll take some time for me to figure out why, though. :-( Jung-uk Kim From owner-freebsd-java@FreeBSD.ORG Fri Feb 4 02:11:23 2011 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 295EB106564A; Fri, 4 Feb 2011 02:11:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-java@freebsd.org Date: Thu, 3 Feb 2011 21:11:10 -0500 User-Agent: KMail/1.6.2 References: <201101261721.58069.jkim@FreeBSD.org> <1296756549.2298.3.camel@mjakubik-laptop> <201102031624.38310.jkim@FreeBSD.org> In-Reply-To: <201102031624.38310.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102032111.13479.jkim@FreeBSD.org> Cc: Pieter de Goeje , Mike Jakubik Subject: Re: [CFT] Update OpenJDK6 to b21 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 Feb 2011 02:11:23 -0000 On Thursday 03 February 2011 04:24 pm, Jung-uk Kim wrote: > On Thursday 03 February 2011 01:09 pm, Mike Jakubik wrote: > > On Wed, 2011-02-02 at 13:54 -0500, Jung-uk Kim wrote: > > > Yeah, I actually fixed that. Some patches were missing in b20 > > > ports. 'jstack -m' should work, too. :-) > > > > > > Thanks for testing! > > > > Compiled OK and working with my applications OK. The jstack -m > > option you mention however produces the following results here: > > > > Attaching to process ID 84046, please wait... > > Debugger attached successfully. > > Server compiler detected. > > JVM version is 19.0-b09 > > sun.jvm.hotspot.debugger.DebuggerException: > > sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs > > failed for a lwp > > at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal > > $BsdDebuggerLocalWorkerThread.execute(BsdDebuggerLocal.java:152) > > at > > sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.getThreadIntegerReg > >is terSet(BsdDebuggerLocal.java:466) at > > sun.jvm.hotspot.debugger.bsd.BsdThread.getContext(BsdThread.java: > >65 ) at > > sun.jvm.hotspot.runtime.bsd_amd64.BsdAMD64JavaThreadPDAccess.getC > >ur rentFrameGuess(BsdAMD64JavaThreadPDAccess.java:92) at > > sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThrea > >d. java:256) at > > sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThrea > >d. java:218) at > > sun.jvm.hotspot.tools.PStack.initJFrameCache(PStack.java:208) at > > sun.jvm.hotspot.tools.PStack.run(PStack.java:66) > > at sun.jvm.hotspot.tools.PStack.run(PStack.java:53) > > at sun.jvm.hotspot.tools.PStack.run(PStack.java:48) > > at sun.jvm.hotspot.tools.JStack.run(JStack.java:60) > > at sun.jvm.hotspot.tools.Tool.start(Tool.java:221) > > at sun.jvm.hotspot.tools.JStack.main(JStack.java:86) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorI > >mp l.java:57) at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA > >cc essorImpl.java:43) at > > java.lang.reflect.Method.invoke(Method.java:616) > > at sun.tools.jstack.JStack.runJStackTool(JStack.java:136) > > at sun.tools.jstack.JStack.main(JStack.java:102) > > Yeah, I noticed that, too. It seems it's getting bogus thread IDs. > It'll take some time for me to figure out why, though. :-( Now I know why but it is a very complicated problem. :-( Basically, the culprit was difference between Linux and BSD, mostly _thread_id and ptrace(2). Linux has gettid(2), which returns a (32-bit) pid_t type, and it is used for _thread_id. Linux code simply calls ptrace(PTRACE_GETREGS, ...) with it and it works fine. However, BSD does not have gettid(), so we used pthread_t instead. Alas, we copied process_get_lwp_regs() from Linux-specific file. It does not work for us because _thread_id is a pthread_t type and ptrace() does not understand it. Unfortunately, there is no easy way to map pthread_t to a lwpid_t value, either. More worse, it gets truncated to 32-bit on amd64. Grrr... Jung-uk Kim From owner-freebsd-java@FreeBSD.ORG Sat Feb 5 00:32:52 2011 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id DFED61065675; Sat, 5 Feb 2011 00:32:51 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-java@freebsd.org Date: Fri, 4 Feb 2011 19:32:30 -0500 User-Agent: KMail/1.6.2 References: <201101261721.58069.jkim@FreeBSD.org> <201102031624.38310.jkim@FreeBSD.org> <201102032111.13479.jkim@FreeBSD.org> In-Reply-To: <201102032111.13479.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102041932.43679.jkim@FreeBSD.org> Cc: Pieter de Goeje , Mike Jakubik Subject: Re: [CFT] Update OpenJDK6 to b21 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: Sat, 05 Feb 2011 00:32:52 -0000 On Thursday 03 February 2011 09:11 pm, Jung-uk Kim wrote: > On Thursday 03 February 2011 04:24 pm, Jung-uk Kim wrote: > > On Thursday 03 February 2011 01:09 pm, Mike Jakubik wrote: > > > On Wed, 2011-02-02 at 13:54 -0500, Jung-uk Kim wrote: > > > > Yeah, I actually fixed that. Some patches were missing in > > > > b20 ports. 'jstack -m' should work, too. :-) > > > > > > > > Thanks for testing! > > > > > > Compiled OK and working with my applications OK. The jstack -m > > > option you mention however produces the following results here: > > > > > > Attaching to process ID 84046, please wait... > > > Debugger attached successfully. > > > Server compiler detected. > > > JVM version is 19.0-b09 > > > sun.jvm.hotspot.debugger.DebuggerException: > > > sun.jvm.hotspot.debugger.DebuggerException: get_thread_regs > > > failed for a lwp > > > at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal > > > $BsdDebuggerLocalWorkerThread.execute(BsdDebuggerLocal.java:152 > > >) at > > > sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.getThreadIntegerR > > >eg is terSet(BsdDebuggerLocal.java:466) at > > > sun.jvm.hotspot.debugger.bsd.BsdThread.getContext(BsdThread.jav > > >a: 65 ) at > > > sun.jvm.hotspot.runtime.bsd_amd64.BsdAMD64JavaThreadPDAccess.ge > > >tC ur rentFrameGuess(BsdAMD64JavaThreadPDAccess.java:92) at > > > sun.jvm.hotspot.runtime.JavaThread.getCurrentFrameGuess(JavaThr > > >ea d. java:256) at > > > sun.jvm.hotspot.runtime.JavaThread.getLastJavaVFrameDbg(JavaThr > > >ea d. java:218) at > > > sun.jvm.hotspot.tools.PStack.initJFrameCache(PStack.java:208) > > > at sun.jvm.hotspot.tools.PStack.run(PStack.java:66) > > > at sun.jvm.hotspot.tools.PStack.run(PStack.java:53) > > > at sun.jvm.hotspot.tools.PStack.run(PStack.java:48) > > > at sun.jvm.hotspot.tools.JStack.run(JStack.java:60) > > > at sun.jvm.hotspot.tools.Tool.start(Tool.java:221) > > > at sun.jvm.hotspot.tools.JStack.main(JStack.java:86) > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccesso > > >rI mp l.java:57) at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMetho > > >dA cc essorImpl.java:43) at > > > java.lang.reflect.Method.invoke(Method.java:616) > > > at sun.tools.jstack.JStack.runJStackTool(JStack.java:136) > > > at sun.tools.jstack.JStack.main(JStack.java:102) > > > > Yeah, I noticed that, too. It seems it's getting bogus thread > > IDs. It'll take some time for me to figure out why, though. :-( > > Now I know why but it is a very complicated problem. :-( > > Basically, the culprit was difference between Linux and BSD, mostly > _thread_id and ptrace(2). Linux has gettid(2), which returns a > (32-bit) pid_t type, and it is used for _thread_id. Linux code > simply calls ptrace(PTRACE_GETREGS, ...) with it and it works fine. > However, BSD does not have gettid(), so we used pthread_t instead. > Alas, we copied process_get_lwp_regs() from Linux-specific file. > It does not work for us because _thread_id is a pthread_t type and > ptrace() does not understand it. Unfortunately, there is no easy > way to map pthread_t to a lwpid_t value, either. More worse, it > gets truncated to 32-bit on amd64. Grrr... To prove my idea, I just implemented libthr function pthread_getthreadid_np(): http://docs.freebsd.org/cgi/mid.cgi?201102041409.12314.jkim Updated ports to support this new feature: http://people.freebsd.org/~jkim/ports-openjdk6-b21_3.tar.bz2 Since it is extremely experimental, it is turned off by default, of course. If you dare to try it out, you must update libthr with the above libthr patch and forcefully define HAVE_PTHREAD_GETTHREADID_NP in the ports Makefile. Now jstack can trace Java threads properly for me. :-) Cheers, Jung-uk Kim