Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 9987 invoked from network); 16 Jul 2010 16:26:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Jul 2010 16:26:08 -0000 Received: (qmail 27717 invoked by uid 500); 16 Jul 2010 16:26:08 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 27641 invoked by uid 500); 16 Jul 2010 16:26:07 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 27634 invoked by uid 99); 16 Jul 2010 16:26:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 16:26:07 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [32.97.182.143] (HELO e3.ny.us.ibm.com) (32.97.182.143) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 16:25:57 +0000 Received: from d01relay01.pok.ibm.com (d01relay01.pok.ibm.com [9.56.227.233]) by e3.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o6GGB0jJ026365 for ; Fri, 16 Jul 2010 12:11:00 -0400 Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d01relay01.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o6GGPLqk125676 for ; Fri, 16 Jul 2010 12:25:21 -0400 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o6GGPCI2010439 for ; Fri, 16 Jul 2010 10:25:12 -0600 Received: from [127.0.0.1] (sig-9-48-118-41.mts.ibm.com [9.48.118.41]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o6GGPAuV010320 for ; Fri, 16 Jul 2010 10:25:11 -0600 Message-ID: <4C4087E7.7020006@sbcglobal.net> Date: Fri, 16 Jul 2010 09:25:11 -0700 From: Kathey Marsden User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: instability in AccessTest? References: <19519.10660.347690.571644@gargle.gargle.HOWL> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 7/15/2010 7:50 PM, Dag H. Wanvik wrote: > Looking at the stack trace again, it seems this happens because we are > trying to save a copy of the generated class file here: > > DatabaseClasses#loadGeneratedClass: > : > } catch (VirtualMachineError vme) { // these may be beyond saving, but fwiw > > WriteClassFile(fullyQualifiedName, classDump, vme); > > Normally we don't try to write the generated classfile to disk, so > that's why we see the security exception, I presume. > > The Javadoc for VirtualMachineError says: > > "Thrown to indicate that the Java Virtual Machine is broken or has run > out of resources necessary for it to continue operating. " > > so maybe my machine was out of resources. > > It seems when a permission error occurs on the write, we lose the VirtualMachineError. It seems we need a priv block for WriteClassFile. Then if we still get a permissions error, we should make sure the VirtualMachineError is the one thrown or use initCause() to get both exceptions. I would think also the permissions to dump the class in such dire circumstances should be documented. I guess it would be optional but highly recommended.