Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 19786 invoked from network); 22 Feb 2008 13:54:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Feb 2008 13:54:40 -0000 Received: (qmail 50446 invoked by uid 500); 22 Feb 2008 13:54:33 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 50371 invoked by uid 500); 22 Feb 2008 13:54:33 -0000 Mailing-List: contact dev-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 dev@harmony.apache.org Received: (qmail 50362 invoked by uid 99); 22 Feb 2008 13:54:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2008 05:54:33 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ivan.g.popov@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; Fri, 22 Feb 2008 13:54:00 +0000 Received: by nf-out-0910.google.com with SMTP id k4so242783nfd.40 for ; Fri, 22 Feb 2008 05:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=zvh3TucM3pNAYoCiVmeXqJXSyboyPEXE8tfOzcV9VYc=; b=jLlzQ8Kjm2ZzX8J3/zCv7ldNAX89NWJW4jHsCGg1hVpNMPjTSsFlkmAm51y/27LOMhHdxqX5O3KjjV3SgO9mKk7UZE9r5BFG7dAh1N/08y9ISMjgYByCzRYlI1bUed3wYI72/1Ezab6gdmbcd7VFNojBxigH8jFH5ZwHqBbFvXc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WejhpWi6BpEMjoOa47nwLUypSwkR2MI7q+STz5JP0CPgQqcsP9S0KWZHTwtW+j0srPOrDxsAzwOIuEwIXiBpFbIo2d967Ng/JgqyUk/bF/WDy7ehqTOHH1VI/pQKBw3B4JEIXrECKO8VAt/0/xWguqAM2G+1ngYg91gdIvVnzkM= Received: by 10.78.51.16 with SMTP id y16mr17972637huy.67.1203688447276; Fri, 22 Feb 2008 05:54:07 -0800 (PST) Received: by 10.78.147.10 with HTTP; Fri, 22 Feb 2008 05:54:07 -0800 (PST) Message-ID: Date: Fri, 22 Feb 2008 19:54:07 +0600 From: "Ivan Popov" To: dev@harmony.apache.org Subject: Re: [JDKTools][JDWP]Let's start JDWP java6 updating In-Reply-To: <47BED0EE.40703@googlemail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5c8e69f0802211930r1f27c40fwd0c3cbfa8aa9075a@mail.gmail.com> <47BE9745.5050602@googlemail.com> <47BEC295.2070604@apache.org> <47BEC59F.1070804@googlemail.com> <47BED0EE.40703@googlemail.com> X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Feb 22, 2008 at 7:41 PM, Oliver Deakin wrote: > Ivan Popov wrote: > > I agree with Gregory, this is very strange and unexpected usage of > > JDWP agent. It's not supported by JDWP specification and thus may vary > > in different implementation depending on how implementation handles > > errors > > > > The main problem is that technically JDWP protocol is symmetric, > > that's why it's possible for JDWP agents to connect to each other and > > even perform handshake. After successfull handshake several JDWP > > packets are transferred over JDWP connection between the agents. > > > > There are three kinds of JDWP packets (commands, replies, events) > > which have similar structure. JDWP spec defines that commands may only > > transfer to agent, while replies and events may only transfer from > > agent. In this particular case this rule is broken. Current Harmony's > > implementation relies on this order and reports errors if it is broken > > (may be not in a very good manner). RI's implementation seems just > > silently ignoring unexpected packets and does not print errors. > > > > Hi Ivan, > > Yes, I know this is an unusual usage of JDWP - I thought that the > "command not implemented EVENT/COMPOSITE[64/100]" error was indicating > some missing functionality, but if you believe that this is just caused > by handshake failure then I agree that it should be ok to leave it as is > (or print a better diagnostic message). > > Thanks, > Oliver Oliver, Yes, that's intentional behavior. According to JDWP spec command packet with command EVENT/COMPOSITE is used as an event packet and is not intended to be handled by agent itself. It may only be generated by agent and sent to JDWP client. In this particular case one agent generates VM_INIT event packet (which is actually a command packet) and sends it to the other agent. The other agent interprets it as a command, which cannot be handled, and sends reply message with error code. First agent gets reply packet and tries to interpret it as a command packet. Failing to do so, it sends reply packet with error to the other agents and thus both agents fall into an endless loop, generating error messages. Thanks. Ivan