Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 25288 invoked from network); 23 Aug 2009 02:39:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Aug 2009 02:39:56 -0000 Received: (qmail 76752 invoked by uid 500); 22 Aug 2009 21:13:39 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 76711 invoked by uid 500); 22 Aug 2009 21:13:39 -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 76493 invoked by uid 99); 22 Aug 2009 21:13:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Aug 2009 21:13:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Aug 2009 21:13:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 09B16234C1E7 for ; Sat, 22 Aug 2009 14:13:15 -0700 (PDT) Message-ID: <1260688251.1250975595038.JavaMail.jira@brutus> Date: Sat, 22 Aug 2009 14:13:15 -0700 (PDT) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-151) Thread termination -> XSDG after operation is 'complete' In-Reply-To: <214516593.1108969729195.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dag H. Wanvik updated DERBY-151: -------------------------------- Attachment: derby-151-a.stat derby-151-a.diff Uploading a patch that catches the ClosedByInterruptException and throws a more meaningful error message as suggested above. I added a test to the store regression suite and ran it successfully on Windows Vista and OpenSolaris. > Thread termination -> XSDG after operation is 'complete' > -------------------------------------------------------- > > Key: DERBY-151 > URL: https://issues.apache.org/jira/browse/DERBY-151 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.0.2.1 > Environment: Linux kernel 2.4.21-243-athlon (SuSE 9.0) > Reporter: Barnet Wagman > Attachments: d151.java, derby-151-a.diff, derby-151-a.stat, derby.log, Derby151Test.java > > > I've encountered what appears to be a bug related to threading. After an INSERT operation, if the invoking thread terminates too quickly, Derby throws an XSDG. > The bug is a bit difficult to isolate but it occurs consistently in the following situation (with a particular database and an operation of a particular size): > Derby is running in embedded mode with autocommit on. > The application performs an INPUT operation from a thread that is not the main thread. The INPUT is issued using a PreparedStatement. The INPUT adds ~ 256 records of six fields each. (Note that INSERTs of this size seem to work fine in other contexts.) > > The preparedStatement.executeUpdate() seems to excute successfully; at least it returns without throwing an exception. > The thread that invoked the INPUT operation then terminates (but NOT the application). The next INPUT operation then results in an > "ERROR XSDG1: Page Page(7,Container(0, 1344)) could not be written to disk, please check if disk is full." > The disk is definitely not full. > HOWEVER, if I put the calling thread to sleep for a second before it exits, the problem does not occur. > I'm not quite sure what to make of this. I was under the impression that most of Derby's activity occurs in the application's threads. Could Derby be creating a child thread from in the application thread, which dies when the parent thread terminates? > Thanks -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.