From owner-freebsd-java@FreeBSD.ORG Fri Dec 28 21:54:38 2012 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89A955A1 for ; Fri, 28 Dec 2012 21:54:38 +0000 (UTC) (envelope-from pphillips@experts-exchange.com) Received: from mail.l3.redsrci.com (mail.pub.l3.redsrci.com [64.156.132.251]) by mx1.freebsd.org (Postfix) with ESMTP id 5A09B8FC0A for ; Fri, 28 Dec 2012 21:54:38 +0000 (UTC) Received: from mail.l3.redsrci.com (localhost [127.0.0.1]) by mail.l3.redsrci.com (Postfix) with ESMTP id 42B716FD7AC for ; Fri, 28 Dec 2012 13:54:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= experts-exchange.com; h=content-type:content-type:in-reply-to :references:subject:subject:mime-version:user-agent:from:from :date:date:message-id:received:received; s=ee; t=1356731670; x= 1358546070; bh=CRqS+hUpZ0RvzMp59FocFo/4L66hm9XbwxuuEGHFGAM=; b=Q 3Y3e7jFkJAAgwuPDLAr6uJ4BGzAujU5AGygttDf4p4oCT+rqVB7WpWMh83oxnVQx hMyOA/iW5pyy+ebQTLz/eJMqBcN0nLmxtkQGOCk3sSQucaL9M62ir2nJEp3uqZB8 pFOxFjrhT5OLFr8aFUM2H6ln+m+OyqSyF16yPOKmtE= X-Virus-Scanned: amavisd-new at redsrci.com Received: from mail.l3.redsrci.com ([127.0.0.1]) by mail.l3.redsrci.com (mail.l3.redsrci.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vChHP9dxTNUd for ; Fri, 28 Dec 2012 13:54:30 -0800 (PST) Received: from [192.168.103.98] (fw1.pub.noc.redsrci.com [72.29.164.238]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: pphillips) by mail.l3.redsrci.com (Postfix) with ESMTPSA id 175066FD5C8 for ; Fri, 28 Dec 2012 13:54:30 -0800 (PST) Message-ID: <50DE1515.8090307@experts-exchange.com> Date: Fri, 28 Dec 2012 13:54:29 -0800 From: Phil Phillips User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: freebsd-java@freebsd.org Subject: Re: Network related OpenJDK7 segfault References: <50D24A41.4020909@experts-exchange.com> <50D24BB9.7090005@experts-exchange.com> In-Reply-To: <50D24BB9.7090005@experts-exchange.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Dec 2012 21:54:38 -0000 On 12/19/2012 03:20 PM, Phil Phillips wrote: > On 12/19/2012 03:14 PM, Phil Phillips wrote: >> Hello, >> >> I had some Java code running fine on OpenJDK6. I upgraded to >> OpenJDK7 and started getting a segmentation fault. I've been able to >> narrow down the problem and create a test case to reproduce the >> issue. It's definitely load related, since I couldn't get the crash >> with a single-threaded test (the test code is multi-threaded). >> Running the test case with OpenJDK6 is fine, but running with >> OpenJDK7 crashes. I tried the sample code on FreeBSD 7.4, 8.3, and >> 9.0 - all with the same result. >> >> Is this a bug with OpenJDK7, or is there something I need to configure? >> >> I have attached the test Java class and a sample error report. >> >> Thanks! > > Looks like my attachments got clobbered. Here are some links. > > Test Class: http://pastebin.mozilla.org/2006513 > Crash Report: http://pastebin.mozilla.org/2006530 > > Thanks again. > > -- > Phil Phillips In the sample code, a javax.naming.directory.DirContext is being used as part of the reverse lookup test used to reproduced the issue. We noticed that a new DirContext was being used each time. Closing or re-using the DirContext gets rid of the crash. It looks like this isn't too much of an issue then. The interesting bit though is that OpenJDK6 is able to handle the "bad" code with too many instances of DirContext, while OpenJDK7 isn't. FWIW, I wasn't able to reproduce the crash on a Linux build of OpenJDK7. -- Phil Phillips