Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 25106 invoked from network); 15 Aug 2007 07:47:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Aug 2007 07:47:55 -0000 Received: (qmail 99852 invoked by uid 500); 15 Aug 2007 07:47:52 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 99820 invoked by uid 500); 15 Aug 2007 07:47:52 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 99645 invoked by uid 99); 15 Aug 2007 07:47:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 00:47:52 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Aug 2007 07:48:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 215C37141F7 for ; Wed, 15 Aug 2007 00:47:31 -0700 (PDT) Message-ID: <32014558.1187164051132.JavaMail.jira@brutus> Date: Wed, 15 Aug 2007 00:47:31 -0700 (PDT) From: "Alexey A. Ivanov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-4624) [classlib][swing]SplitPane triggers the deadlock in AbstractDocument$ReadWriteLock In-Reply-To: <7493321.1187056890650.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519886 ] Alexey A. Ivanov commented on HARMONY-4624: ------------------------------------------- Hello Chunrong, You mean your application has two threads. One of them operates on the text in LeftComponent, the other operates in the RightComponent. And it is the second thread that starts layout. Am I right? Can you describe your scenario in more detail? Thanks in advance, Alexey. > [classlib][swing]SplitPane triggers the deadlock in AbstractDocument$ReadWriteLock > ---------------------------------------------------------------------------------- > > Key: HARMONY-4624 > URL: https://issues.apache.org/jira/browse/HARMONY-4624 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: win32 > Reporter: Chunrong Lai > Assignee: Alexey Petrenko > Attachments: h4624.workaround.patch > > > Dead lock possibilities are seen in the synchronized metnods of AbstractDocument$ReadWriteLock. > public final synchronized void readLock() { > final Thread thread = Thread.currentThread(); > if (writer != thread) { > while (writerCount > 0) { > try { wait(); } > catch (final InterruptedException e) { } > } > } > readers.add(thread); > } > Waiting in synchronized methods (requires another synchronized method to wakeup it) likely just dies there. > Multithreaded SplitPane application triggers the possibility. One thread can operate at the texts of the LeftComponent, thus in a critical section after setting writercount(writeLock()). The other thread can operate at the rightComponent, then call the readLock() of LeftComponent via layout managment and just waits there. > Attach patch eliminates the said intra-splitpane-lock-acquirement. But it is more likely a workaround. > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.