From owner-freebsd-java@FreeBSD.ORG Mon Oct 13 14:59:02 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 EA123106568A for ; Mon, 13 Oct 2008 14:59:02 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.172]) by mx1.freebsd.org (Postfix) with ESMTP id 74F7D8FC16 for ; Mon, 13 Oct 2008 14:59:02 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so477554uge.39 for ; Mon, 13 Oct 2008 07:59:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=9wMyBN3LrY2SK+UF343aP1ea1K+eMF7S8Pf8yuqmS80=; b=dXXn9TElE1YUeYHzBrc5pWifFN5QBSuDZckV2dYgtfO5t8VP3WRTct/qEweL2/vyQa uNCH/22PrNOMotUJl1t22mqM66nKO3dnun+OUXX8F+fRhHmvUnv8JU4nBu05oV8D6JqD JE0yrUrHr/ptGkQ1JluPxLhDQLzRR1+ECQbTE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=U0mZ7ztuaUEgAgvZBhIBY+OKf1dldvrLGXQiJVjRa7tKBDl9Qugo3tFLEKqbRUG3uj j3j4U6w8OTw4AQfUs2XMaYgJGlxeD6G/BZsh1IVFdGLQXJXS9kcmu0OMrbiM7toJO3Pk BhQXL1aadSJAhm+VALnxuwb/O9JmMHYiqHJe8= Received: by 10.67.106.13 with SMTP id i13mr3288019ugm.37.1223909941205; Mon, 13 Oct 2008 07:59:01 -0700 (PDT) Received: from ?192.168.2.105? (blah.sun-fish.com [217.18.249.150]) by mx.google.com with ESMTPS id i39sm7192884ugd.21.2008.10.13.07.58.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 13 Oct 2008 07:59:00 -0700 (PDT) Message-Id: <82DA0FAE-EAFF-4138-9CAA-21750A21D9D6@gmail.com> From: Nikolay Denev To: freebsd-java@freebsd.org In-Reply-To: <7F26DA41-FF97-4DBB-ADAC-F7E6707B868D@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Mon, 13 Oct 2008 17:58:58 +0300 References: <7F26DA41-FF97-4DBB-ADAC-F7E6707B868D@gmail.com> X-Mailer: Apple Mail (2.929.2) Subject: Re: Serious problem with RMI on jdk15 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, 13 Oct 2008 14:59:03 -0000 On Oct 13, 2008, at 5:47 PM, Nikolay Denev wrote: > > On Oct 9, 2008, at 4:35 PM, Nikolay Denev wrote: > >> Hi All, >> >> I have the following problem : when I connect to a jmxremote >> enabled application with jconsole the whole VM crashes with >> segmentation fault. >> > [...snip...] >> >> I'm running amd64 7.1-PRE from yesterday, and the jdk is >> jdk-1.5.0.14p8_3,1 >> >> Any help is greatly appreciated! >> >> Thanks, >> Nikolay Denev >> >> >> > > I think I've tracked down the problem. > The JVM crashes when one requests the TotalPhysicalMemory from the > OperatingSystem bean. > The strange thing is that Sun specifies this value as "long", but > how this can work on 64bit machines with many gigabytes of memory? > > What BSD patchset does is read the hw.physmem sysctl, which returns > unsigned long, and then cast it to jlong and probably this is where > the problem is. > I've tried disabling the sysctl and hardcoding the result and my JVM > does not crash anymore. > Jconsole still does not show anything though.... and the same test > program produces info when used with the diablo-jdk15... > > > Regards, > Nikolay Denev > > > As I read this now, It's not exactly correct, longs should be 4 bytes on 32bit archs, and 8bytes on 64bit archs. So the storage type for TotalPhysicalMemory should be ok. Maybe jlong is not correctly adjusted to 8bytes on 64bit architectures? Regards, Nikolay Denev