Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 42126 invoked from network); 13 Nov 2006 14:57:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2006 14:57:29 -0000 Received: (qmail 8140 invoked by uid 500); 13 Nov 2006 14:57:36 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 8098 invoked by uid 500); 13 Nov 2006 14:57:36 -0000 Mailing-List: contact harmony-dev-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-dev@incubator.apache.org Received: (qmail 8089 invoked by uid 99); 13 Nov 2006 14:57:36 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 06:57:36 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of artem.aliev@gmail.com designates 64.233.182.186 as permitted sender) Received: from [64.233.182.186] (HELO nf-out-0910.google.com) (64.233.182.186) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 06:57:23 -0800 Received: by nf-out-0910.google.com with SMTP id p46so2091862nfa for ; Mon, 13 Nov 2006 06:57:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qNGX5XaO0WeXEYMmE8aUDnhdYX7m8lk70zQ6WNATxVoJxui4iFXLYne763aOZ7xH34r0IilXZOUCjvVzNdunexfgj7B/nMRA9kZSCM7D7SPGrUVWlMT/3yUNpbz98nJn1YtXAn7wcQpRPRx4yTquyxGxj/4vvFFMkxoFuSdmVpU= Received: by 10.82.111.8 with SMTP id j8mr49225buc.1163429821680; Mon, 13 Nov 2006 06:57:01 -0800 (PST) Received: by 10.82.175.12 with HTTP; Mon, 13 Nov 2006 06:57:01 -0800 (PST) Message-ID: <187bb05d0611130657g63c573cfyda6c7fcf3d6e5153@mail.gmail.com> Date: Mon, 13 Nov 2006 17:57:01 +0300 From: "Artem Aliev" To: harmony-dev@incubator.apache.org Subject: Re: [drlvm][threading] Should hythread_monitor_init() aquire the monitor? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <187bb05d0611130138o7c870257g664c6b35ae7b11bb@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Oops, You were right. I take a llook into classlib hythread code. It looks like I incorrectly understand the documentation. This is a bug. Thanks Artem On 11/13/06, Evgueni Brevnov wrote: > Could someone familiar with classlib's implementation comment on that ....? > > Thanks in advance. > Evgueni > > On 11/13/06, Evgueni Brevnov wrote: > > Hello Artem, > > > > Are you 100% sure? I've looked at the classlib's implementation and > > can't find where the monitor is acquired. Moreover if you look at the > > initializeSignalTools() located in > > modules\portlib\src\main\native\port\linux\hysignal.c you will find > > that it initializes new monitors with hyhtread_monitor_init_with_name > > and never frees these monitors. That turned out to be the reason of a > > deadlock in HARMONY-2006. > > > > Thanks > > Evgueni > > > > On 11/13/06, Artem Aliev wrote: > > > > It turned out that DRL > > > > implementation of hythread_monitor_init / > > > > hythread_monitor_init_with_name initializes and acquires a monitor. > > > > > > Eugeni, > > > > > > Both drlvm and classlib hythread work this way. > > > This original hythread design that for compatibility reason was > > > implemented in drlvm. > > > > > > Thanks > > > Artem > > > > > > > > > > > > On 11/10/06, Evgueni Brevnov wrote: > > > > Hi, > > > > > > > > While investigating deadlock scenario which is described in > > > > HARMONY-2006 I found out one interesting thing. It turned out that DRL > > > > implementation of hythread_monitor_init / > > > > hythread_monitor_init_with_name initializes and acquires a monitor. > > > > Original spec reads: "Acquire and initialize a new monitor from the > > > > threading library...." AFAIU that doesn't mean to lock the monitor but > > > > get it from the threading library. So the hythread_monitor_init should > > > > not lock the monitor. > > > > > > > > Could somebody comment on that? > > > > > > > > Thanks > > > > Evgueni > > > > > > > > > >