Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 98912 invoked from network); 29 May 2007 01:12:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 May 2007 01:12:37 -0000 Received: (qmail 48313 invoked by uid 500); 29 May 2007 01:12:41 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 48218 invoked by uid 500); 29 May 2007 01:12:41 -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 48209 invoked by uid 99); 29 May 2007 01:12:41 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 May 2007 18:12:41 -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; Mon, 28 May 2007 18:12:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2DF6D71416E for ; Mon, 28 May 2007 18:12:16 -0700 (PDT) Message-ID: <29318285.1180401136184.JavaMail.jira@brutus> Date: Mon, 28 May 2007 18:12:16 -0700 (PDT) From: "Ilya Berezhniuk (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-3990) [drlvm][thread]agent test detects the thread event problem In-Reply-To: <14573805.1180351937412.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-3990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499654 ] Ilya Berezhniuk commented on HARMONY-3990: ------------------------------------------ I've investigated VM behavior on attached test. AFAIU, there is no bug in VM. JVMTI spec says: "The specification for each event includes the set of phases in which it can be sent; if an event triggering activity occurs during another phase, no event is sent. " ThreadStart and ThreadEnd should be sent during PHASE_START and PHASE_LIVE only. In current case, ThreadStart events for (1) main thread, (2) finalyzer thread and (3) ref_enqueue thread are occured during PHASE_PRIMORDIAL, thus no events are sent to agent. On the other hand, finalyzer thread and ref_enqueue thread are dying during PHASE_LIVE (before main thread death), so ThreadEnd event for these threads is sent. Main thread dies on PHASE_DEAD, so ThreadEnd for main thread is not sent also. Thus 3 - 1 = 2 threads were not reported in ThreadStart and were reported in ThreadEnd. > [drlvm][thread]agent test detects the thread event problem > ---------------------------------------------------------- > > Key: HARMONY-3990 > URL: https://issues.apache.org/jira/browse/HARMONY-3990 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: win ia32, msvc, debug > Reporter: tatyana doubtsova > Attachments: agent_test.zip, agent_test.zip > > > To reproduce (thanks to Ruslan Scherbakov) > unzip attached agent_test.zip, compile HellowWorld.java and run > > .\run_win.bat > ========================================================================================= > 1. run initial class > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r541992, (May 27 2007), Windows/ia32/msvc 1310, debug build > http://incubator.apache.org/harmony > HELLO.world > ========================================================================================= > 2. run initial class WITH agent > Agent_OnLoad: pVm=011E2388, options=(null) > Agent_OnLoad: OK > 1. VMInit : thread=0284D008,208D2928, pJniEnv=01248760 > 2. ThreadStart : thread=0246DF58,208D2928, pJniEnv=01248760 > HELLO.world > 3. MonitorWait : thread=0246DF58,208D2928, pJniEnv=01248760, object=0013F1D0,208F3228, timeout=0 > 4. MonitorContendedEnter : thread=0246DF58,208D2928, pJniEnv=01248760, object=0013F1D0,208F3228 > 5. ThreadStart : thread=02919618,208F3184, pJniEnv=02913C78 > 6. MonitorContendedEntered: thread=0246DF58,208D2928, pJniEnv=01248760, object=0013F1D0,208F3228 > 7. MonitorWaited : thread=0246DF58,208D2928, pJniEnv=01248760, object=0013F1D0,208F3228, timeout=0 > 8. MonitorWait : thread=0246DF58,208D2928, pJniEnv=01248760, object=0013F1E0,208F3228, timeout=0 > 9. MonitorContendedEnter : thread=0246DF58,208D2928, pJniEnv=01248760, object=0013F1E0,208F3228 > 10. MonitorContendedEntered: thread=0246DF58,208D2928, pJniEnv=01248760, object=0013F1E0,208F3228 > 11. MonitorWaited : thread=0246DF58,208D2928, pJniEnv=01248760, object=0013F1E0,208F3228, timeout=0 > 12. ThreadEnd : thread=02849220,20900224, pJniEnv=028452F0 > ERROR : ThreadEnd event for unmatched JNI ptr: 028452F0 > 13. ThreadEnd : thread=028425C0,208F8224, pJniEnv=028401F8 > ERROR : ThreadEnd event for unmatched JNI ptr: 028401F8 > 14. ThreadEnd : thread=02919618,208F3184, pJniEnv=02913C78 > 15. VMDeath : pJniEnv=01248760 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.