harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niklas Gustavsson (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-6105) Harmony throws exception when using SO_TIMEOUT on socket
Date Sun, 01 Mar 2009 15:57:12 GMT
Harmony throws exception when using SO_TIMEOUT on socket

                 Key: HARMONY-6105
                 URL: https://issues.apache.org/jira/browse/HARMONY-6105
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Harmony trunk
uname -a
Linux niklas-laptop 2.6.27-11-generic #1 SMP Thu Jan 29 19:24:39 UTC 2009 i686 GNU/Linux

            Reporter: Niklas Gustavsson

As discussed on this thread http://markmail.org/message/6zv42jp4yivpd7ns Harmony throws an
exception when trying to read from a socket with SO_TIMEOUT set. Also, the provided test case
lead to the discovery of two related bugs found by Mark Hindess described here http://markmail.org/message/7r2k7va362ofkwld

Test case (requires Apache FtpServer, MINA and SLF4J on the classpath):
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.channels.Channels;

import org.apache.ftpserver.FtpServer;
import org.apache.ftpserver.FtpServerFactory;
import org.apache.ftpserver.listener.ListenerFactory;

public class HarmonyFtpClient {

   public static void main(String[] args) throws Exception {

       FtpServerFactory fsf = new FtpServerFactory();
       ListenerFactory listenerFactory = new ListenerFactory();

       fsf.addListener("default", listenerFactory.createListener());

       FtpServer server = fsf.createServer();

       try {
           Socket socket = new Socket();
           socket.connect(new InetSocketAddress("localhost", 2121));
       } finally {

java.net.SocketException: No such file or directory
       at org.apache.harmony.luni.platform.OSNetworkSystem.read(OSNetworkSystem.java)
       at org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:557)
       at org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:61)
       at HarmonyFtpClient.main(HarmonyFtpClient.java:27)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message