harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivaschenko, Aleksei V (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-3631) [classlib][luni] Write operation to non-blocking SocketChannel with overfull output buffer causes unexpected exception
Date Thu, 12 Apr 2007 06:57:32 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-3631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ivaschenko, Aleksei V updated HARMONY-3631:
-------------------------------------------

    Attachment: luni.patch
                NIOTest.java

> [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
>         Attachments: 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 "<init>".
> 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.


Mime
View raw message