Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 92700 invoked from network); 12 Apr 2007 06:55:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Apr 2007 06:55:53 -0000 Received: (qmail 65112 invoked by uid 500); 12 Apr 2007 06:55:59 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 65095 invoked by uid 500); 12 Apr 2007 06:55:59 -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 65086 invoked by uid 99); 12 Apr 2007 06:55:59 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Apr 2007 23:55:59 -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, 11 Apr 2007 23:55:52 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 76893714077 for ; Wed, 11 Apr 2007 23:55:32 -0700 (PDT) Message-ID: <7713486.1176360932482.JavaMail.jira@brutus> Date: Wed, 11 Apr 2007 23:55:32 -0700 (PDT) From: "Ivaschenko, Aleksei V (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-3631) [classlib][luni] Write operation to non-blocking SocketChannel with overfull output buffer causes unexpected exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [classlib][luni] Write operation to non-blocking SocketChannel with overfull output buffer causes unexpected exception ---------------------------------------------------------------------------------------------------------------------- Key: HARMONY-3631 URL: https://issues.apache.org/jira/browse/HARMONY-3631 Project: Harmony Issue Type: Bug Components: Classlib Environment: Windows and Linux Reporter: Ivaschenko, Aleksei V The attached test creatres non-blocking SocketChannel connection and writes into channel untinl socket output buffer become overfull and further write operations will not write even one byte. This is normal situation according to SocketChannel spec and no exceptions should be thrown. But the test fails on Harmony with exception: java.lang.NoSuchMethodError: init at org.apache.harmony.luni.platform.OSNetworkSystem.writeSocketDirectImpl(Native Method) at org.apache.harmony.luni.platform.OSNetworkSystem.writeDirect(OSNetworkSystem.java:105) at org.apache.harmony.nio.internal.SocketChannelImpl.writeImpl(SocketChannelImpl.java:557) at org.apache.harmony.nio.internal.SocketChannelImpl.write(SocketChannelImpl.java:491) ... This exception is generated by JNI call to GetMethodID while attempt to find java.net.SocketException constructor by name "init" instead of "". This part of the issue could be fixed with attached patch. Even when this is fixed, the test continue to fail with unexpected exception (but with another one): java.net.SocketException: The socket is marked as nonblocking operation would block at org.apache.harmony.luni.platform.OSNetworkSystem.writeSocketDirectImpl(Native Method) at org.apache.harmony.luni.platform.OSNetworkSystem.writeDirect(OSNetworkSystem.java:105) at org.apache.harmony.nio.internal.SocketChannelImpl.writeImpl(SocketChannelImpl.java:557) at org.apache.harmony.nio.internal.SocketChannelImpl.write(SocketChannelImpl.java:491) ... It's a reasonable exception for non-blocking connections, but according to spec it shouldn't be thrown - write method of SocketChannel should return 0 instead. This issue also leads Jetty scenario (HARMONY-3530) to fail. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.