Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 84884 invoked from network); 13 Apr 2007 11:01:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Apr 2007 11:01:36 -0000 Received: (qmail 51517 invoked by uid 500); 13 Apr 2007 11:01:42 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 51496 invoked by uid 500); 13 Apr 2007 11:01:42 -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 51486 invoked by uid 99); 13 Apr 2007 11:01:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2007 04:01:42 -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; Fri, 13 Apr 2007 04:01:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id ADA23714080 for ; Fri, 13 Apr 2007 04:01:15 -0700 (PDT) Message-ID: <19689332.1176462075708.JavaMail.jira@brutus> Date: Fri, 13 Apr 2007 04:01:15 -0700 (PDT) From: "Ivaschenko, Aleksei V (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3631) [classlib][luni][nio] Write operation to non-blocking SocketChannel with overfull output buffer causes unexpected exception In-Reply-To: <7713486.1176360932482.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-3631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ivaschenko, Aleksei V updated HARMONY-3631: ------------------------------------------- Attachment: h3631.zip DRLVM regression test attached. > [classlib][luni][nio] 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 > Assigned To: Paulex Yang > Attachments: h3631.zip, luni.patch, NIOTest.java > > > 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.