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] Commented: (HARMONY-3631) [classlib][luni][nio] Write operation to non-blocking SocketChannel with overfull output buffer causes unexpected exception
Date Fri, 13 Apr 2007 09:59:15 GMT

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

Ivaschenko, Aleksei V commented on HARMONY-3631:
------------------------------------------------

Jimmy,

I've rebuilt classlib and DRLVM completely with my patch and the test passes on it. I didn't
get why the SocketException was thrown on previous build, perhaps I did something wrong (I
soppose the porblem was in my local workspace). Looks like this patch is enough for fixing
the bug (Jetty scenario passes too). Thanks for investigation!

Paulex,

Did you mean include as a regression test into DRLVM? If so, you can find it in attached archive.
Thanks for committing the patch! The fix works fine for me.


> [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 "<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