Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 12165 invoked from network); 22 Feb 2008 13:41:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Feb 2008 13:41:42 -0000 Received: (qmail 33547 invoked by uid 500); 22 Feb 2008 13:41:35 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 33520 invoked by uid 500); 22 Feb 2008 13:41:35 -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 33509 invoked by uid 99); 22 Feb 2008 13:41:34 -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:41:34 -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 oliver.deakin@googlemail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2008 13:40:58 +0000 Received: by nf-out-0910.google.com with SMTP id k4so240134nfd.40 for ; Fri, 22 Feb 2008 05:41:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=abE5kPQ1sX4l4pIQ7ptntOKIFumnQ8f6T8jYiyedtcg=; b=tKMDdE4Eeqrfrnex83Y4lrMD+Lq4VH1WyFT43qw1pbEVy0t0HaRpGLRcAfvSQZXy2IwCfDno9zNejoJgqJH/xuzlKEeSicrUYbWn3pAW3RLaTSE1SljCL54Q3aEWY5/xDFgkI9FrBxD4zPzE7fmuJU6U8lVmu4csTbc361cDC6Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=jHIIoBw98kNw7+VQlgS4saL7rZh70Cw/kCPi+Edo0cuP5/nt0rwPI7WA44GzKRFAPronKnLEBIJDCjaLWAybMBpv2/7Kr47K5axGj9Bi8aohhskmtZskDSxag7pkUipXhBgXBwoPrLPb6qWMHq7W5RHnl7wyyGlx33Iz2/rM3lI= Received: by 10.78.51.16 with SMTP id y16mr17945109huy.67.1203687666041; Fri, 22 Feb 2008 05:41:06 -0800 (PST) Received: from ?87.112.30.16? ( [87.112.30.16]) by mx.google.com with ESMTPS id k5sm3091270nfh.5.2008.02.22.05.41.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 22 Feb 2008 05:41:05 -0800 (PST) Message-ID: <47BED0EE.40703@googlemail.com> Date: Fri, 22 Feb 2008 13:41:02 +0000 From: Oliver Deakin User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: dev@harmony.apache.org Subject: Re: [JDKTools][JDWP]Let's start JDWP java6 updating References: <5c8e69f0802211930r1f27c40fwd0c3cbfa8aa9075a@mail.gmail.com> <47BE9745.5050602@googlemail.com> <47BEC295.2070604@apache.org> <47BEC59F.1070804@googlemail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 > It's quite easy to modify Harmony's agent to recognize such situation > and provide more meaningful diagnostics. I don't think that RI's > behavior with silently ignoring errors is better in this case. > > Thanks. > Ivan > > On Fri, Feb 22, 2008 at 6:52 PM, Oliver Deakin > wrote: > >> Gregory Shimansky wrote: >> > Oliver Deakin said the following on 22.02.2008 12:35: >> >> Hi Jimmy, >> >> >> >> This is a great idea, but I have a feeling there may still need to be >> >> some work done on the current version. I have noticed the following: >> >> >> >> 1) You cannot launch Harmony with >> >> java -agentlib:jdwp=transport=dt_socket,server=n,address=8888 >> >> >> >> without specifying a class at the end of the command line. This is >> >> not a major issue, just a difference to the RI. If you run the above >> >> command line, the launcher short circuits to the launcher command >> >> line help and exits.* >> >> * >> >> 2) If I try to launch two Harmony VMs using the following command lines: >> >> java >> >> -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8888 >> >> HelloWorld >> >> java -agentlib:jdwp=transport=dt_socket,server=n,address=8888 HelloWorld >> > >> > I am not sure I understand the intention to run these two command >> > lines. To connect to a JDWP agent you need a real JDWP client, e.g. >> > Eclipse or jdb. AFAIU JDWP agent cannot talk to itself over JDWP >> > protocol. >> > >> >> Hi Gregory, >> >> Im not saying that this is a standard way to connect, but it appears to >> expose a difference between implementations. You can run these two >> command lines on the RI without any errors whatsoever. Although this is >> not normal practise it leaves me wondering what the cause of these >> errors are on Harmony. >> >> Regards, >> Oliver >> >> >> >> -- >> Oliver Deakin >> Unless stated otherwise above: >> IBM United Kingdom Limited - Registered in England and Wales with number 741598. >> Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU >> >> >> > > -- Oliver Deakin Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU