Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 27833 invoked from network); 26 Sep 2006 14:00:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Sep 2006 14:00:44 -0000 Received: (qmail 82874 invoked by uid 500); 26 Sep 2006 14:00:41 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 82847 invoked by uid 500); 26 Sep 2006 14:00:41 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 82803 invoked by uid 99); 26 Sep 2006 14:00:41 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Sep 2006 07:00:41 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from [209.237.227.198] ([209.237.227.198:45918] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 6E/31-11437-78239154 for ; Tue, 26 Sep 2006 07:00:39 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B76F87142C7 for ; Tue, 26 Sep 2006 13:56:51 +0000 (GMT) Message-ID: <10867566.1159279011747.JavaMail.jira@brutus> Date: Tue, 26 Sep 2006 06:56:51 -0700 (PDT) From: "Geir Magnusson Jr (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Assigned: (HARMONY-1559) [drlvm][jvmti] Processing breakpoints works incorrectly in multi-thread mode. In-Reply-To: <11381549.1159021702371.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1559?page=all ] Geir Magnusson Jr reassigned HARMONY-1559: ------------------------------------------ Assignee: Geir Magnusson Jr > [drlvm][jvmti] Processing breakpoints works incorrectly in multi-thread mode. > ----------------------------------------------------------------------------- > > Key: HARMONY-1559 > URL: http://issues.apache.org/jira/browse/HARMONY-1559 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Reporter: Pavel Rebriy > Assigned To: Geir Magnusson Jr > Attachments: Multi-threaded-breakpoints.patch > > > In the current implementation of breakpoints processing loop through breakpoints is performed under breakpoints lock. Before reporting breakpoint thread raises the breakpoint flag that it was processed, and no need to report it again. But then the thread calls breakpoint event callback function it releases the lock, and get it after callback. It works fine in case of one thread. In multi-thread mode, another thread which catches the same breakpoint processing it while the first thread is in event callback. But breakpoint has the processed flag on and the second thread doesnt report it. It clears breakpoint processed flag and leaves breakpoint handler. The first thread returns from event callback and finds non-processed breakpoint and report the same breakpoint again. If the number of threads is increased we could get unpredictable behaviour. > The problem is the only flag in breakpoint descriptor is not enough in multi-thread mode to determine if breakpoint was already processed by all threads. The solution for this problem is to change breakpoints processing model. > The following patch fixes the described problem and, also, fixed numerous issues discovered while progressing with implementation of this new model. The following issues are fixed in this patch: > - Added logic for correct processing of breakpoints and JVMTI environments in multi-threaded execution. > - Reverted order of adding breakpoints and interfaces (was stack became queue). This change is required in new processing algorithm to ensure breakpoints and interfaces are inserted to the end of respective collections. > - Removed is_processed flag from breakpoint structure. > - Removed locking interface from VMBreakInterface. Localized locking in VMBreakPoints methods. > - Renamed several methods and extended search capabilities in both VMBreakPoints and VMBreakInterface. > - Moved is_interp flag and logic from breakpoint to VMBreakInterface class. > - Moved JVMTI environment associated logic from breakpoint associated data to VMBreakInterface. > - Added returning result of processing breakpoint under interpreter. > - Fixed and improved debug tracing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira