Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 79542 invoked from network); 5 Sep 2007 05:44:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2007 05:44:55 -0000 Received: (qmail 61056 invoked by uid 500); 5 Sep 2007 05:44:49 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 61031 invoked by uid 500); 5 Sep 2007 05:44:49 -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 61022 invoked by uid 99); 5 Sep 2007 05:44:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Sep 2007 22:44:49 -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, 05 Sep 2007 05:46:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 733F671420A for ; Tue, 4 Sep 2007 22:44:32 -0700 (PDT) Message-ID: <24267942.1188971072465.JavaMail.root@brutus> Date: Tue, 4 Sep 2007 22:44:32 -0700 (PDT) From: "weldon washburn (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-4727) [drlvm][thread] explicit allocation/deallocation of VM_thread structure In-Reply-To: <11287634.1188880378207.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-4727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524989 ] weldon washburn commented on HARMONY-4727: ------------------------------------------ Pavel, Yes you are correct. Patch xxx01.patch and xxx02.patch are not correct at all. I have done some additional thinking. I suspect there are three bugs: 1) When a java thread creates a new java thread, jthread_wrapper_proc() calls vm_attach(). But by the time vm_attach() is called, the thread is already gc enumerable. This is a problem because things like M2NFrame are created in vm_attach(). In other words, its too late. 2) The above situation is duplicated in JNI_CreateJavaVM(), AttachCurrentThread(), AttachCurrentThreadAsDaemon(), DestroyJavaVM(). In other words, we have two places in Thread Manager that need cleaned up. 3) Somehow vm_shutdown_callback() calls hythread_detach() for each live java thread but forgets to call jthread_detach(). Attached is a candidate patch (shutdown.patch) that tries to fix this problem. So far about 1/2 of "build test" has run and this patch seems OK. > [drlvm][thread] explicit allocation/deallocation of VM_thread structure > ------------------------------------------------------------------------ > > Key: HARMONY-4727 > URL: https://issues.apache.org/jira/browse/HARMONY-4727 > Project: Harmony > Issue Type: Sub-task > Components: DRLVM > Reporter: weldon washburn > Attachments: explicit_alloc_and_dealloc_01.patch, explicit_alloc_and_dealloc_02.patch, shutdown.patch > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.