Hi,

Casey Marshall wrote:
I've updated my patch that updates IO, net, and NIO to better support
non-blocking IO, which also includes my kqueue Selector, and the
implementation of NetworkInterface. Along with implementing real
non-blocking IO, I've rewritten parts of the IO and net code to use the
NIO implementation, reducing the amount of code use. I've also tried to
make the JNI code as simple as possible, and to abstract out as much of
this native code logic into the VM interface classes (IOW, the native
logic is private instance data of our VM interface reference
implementation).

I only get a few Mauve failures with this patch; most of them look like
my tree is just out of date (serialization, URL and InetAddress, none of
which I've changed here). Mauve may not be testing everything, though,
so it's likely that there are bugs lurking here.

The patches are big, so I'll just link to them here:

  <http://metastatic.org/source/io-nio.patch>
  <http://metastatic.org/source/io-nio2.patch>

I haven't cleaned everything up, yet, so there are still some obsolete
files that aren't removed yet, and I haven't addressed SIGPIPE at all.
I've only tested this so far on Darwin/x86, but I'll try this on
Linux/x86 too.

Comments appreciated! Especially on whether or not this is good enough
to commit, or what's lacking.

I get these errors after applying io-nio.patch then io-nio2.patch, re-running autogen.sh, and doing a clean build:

2. ERROR in /home/fitzsim/workspace/classpath/gnu/java/nio/channels/FileChannelImpl.java
 (at line 128)
        this.ch = VMChannel.getVMChannel(this);
                            ^^^^^^^^^^^^
The method getVMChannel(FileChannelImpl) is undefined for the type VMChannel
----------
3. ERROR in /home/fitzsim/workspace/classpath/gnu/java/nio/channels/FileChannelImpl.java
 (at line 161)
        this.ch = VMChannel.getVMChannel(this);
                            ^^^^^^^^^^^^
The method getVMChannel(FileChannelImpl) is undefined for the type VMChannel
----------
4. ERROR in /home/fitzsim/workspace/classpath/gnu/java/nio/channels/FileChannelImpl.java
 (at line 459)
        ? new FileLockImpl(this, position, size, shared)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The constructor FileLockImpl(FileChannelImpl, long, long, boolean) is undefined
----------
5. ERROR in /home/fitzsim/workspace/classpath/gnu/java/nio/channels/FileChannelImpl.java
 (at line 487)
        ? new FileLockImpl(this, position, size, shared)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The constructor FileLockImpl(FileChannelImpl, long, long, boolean) is undefined
----------
----------
6. ERROR in 
/home/fitzsim/workspace/classpath/gnu/java/nio/KqueueSelectorImpl.java
 (at line 267)
protected KqueueSelectionKeyImpl register(AbstractSelectableChannel channel,
                                            int interestOps,
                                            Object attachment)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The return type is incompatible with AbstractSelector.register(AbstractSelectableChannel, int, Object)

I'm testing these patches to see if they fix the RMI problem I'm having (which may be unrelated):

$ rmiregistry 3456 &
$ java -Djava.security.policy=/home/fitzsim/jin.patches/wideopen.policy examples.hello.HelloImpl
java.net.SocketTimeoutException: Accept operation timed out
   at gnu.java.net.VMPlainSocketImpl.accept(Native Method)
   at gnu.java.net.PlainSocketImpl.accept(PlainSocketImpl.java:282)
   at java.net.ServerSocket.implAccept(ServerSocket.java:369)
   at java.net.ServerSocket.accept(ServerSocket.java:321)
at gnu.java.rmi.server.UnicastConnectionManager.getServerConnection(UnicastConnectionManager.java:262) at gnu.java.rmi.server.UnicastConnectionManager.run(UnicastConnectionManager.java:379)
   at java.lang.Thread.run(Thread.java:740)
   at java.lang.VMThread.run(VMThread.java:120)
java.net.SocketTimeoutException: Accept operation timed out
   at gnu.java.net.VMPlainSocketImpl.accept(Native Method)
   at gnu.java.net.PlainSocketImpl.accept(PlainSocketImpl.java:282)
   at java.net.ServerSocket.implAccept(ServerSocket.java:369)
   at java.net.ServerSocket.accept(ServerSocket.java:321)
at gnu.java.rmi.server.UnicastConnectionManager.getServerConnection(UnicastConnectionManager.java:262) at gnu.java.rmi.server.UnicastConnectionManager.run(UnicastConnectionManager.java:379)
   at java.lang.Thread.run(Thread.java:740)
   at java.lang.VMThread.run(VMThread.java:120)
java.net.SocketTimeoutException: Accept operation timed out
   at gnu.java.net.VMPlainSocketImpl.accept(Native Method)
   at gnu.java.net.PlainSocketImpl.accept(PlainSocketImpl.java:282)
   at java.net.ServerSocket.implAccept(ServerSocket.java:369)
   at java.net.ServerSocket.accept(ServerSocket.java:321)
at gnu.java.rmi.server.UnicastConnectionManager.getServerConnection(UnicastConnectionManager.java:262) at gnu.java.rmi.server.UnicastConnectionManager.run(UnicastConnectionManager.java:379)
   at java.lang.Thread.run(Thread.java:740)
   at java.lang.VMThread.run(VMThread.java:120)
java.net.SocketTimeoutException: Accept operation timed out
   at gnu.java.net.VMPlainSocketImpl.accept(Native Method)
   at gnu.java.net.PlainSocketImpl.accept(PlainSocketImpl.java:282)
   at java.net.ServerSocket.implAccept(ServerSocket.java:369)
   at java.net.ServerSocket.accept(ServerSocket.java:321)
at gnu.java.rmi.server.UnicastConnectionManager.getServerConnection(UnicastConnectionManager.java:262) at gnu.java.rmi.server.UnicastConnectionManager.run(UnicastConnectionManager.java:379)
   at java.lang.Thread.run(Thread.java:740)
   at java.lang.VMThread.run(VMThread.java:120)
java.io.IOException: Invalid argument
   at gnu.java.net.VMPlainSocketImpl.accept(Native Method)
   at gnu.java.net.PlainSocketImpl.accept(PlainSocketImpl.java:282)
   at java.net.ServerSocket.implAccept(ServerSocket.java:369)
   at java.net.ServerSocket.accept(ServerSocket.java:321)
at gnu.java.rmi.server.UnicastConnectionManager.getServerConnection(UnicastConnectionManager.java:262) at gnu.java.rmi.server.UnicastConnectionManager.run(UnicastConnectionManager.java:379)
   at java.lang.Thread.run(Thread.java:740)
   at java.lang.VMThread.run(VMThread.java:120)

Were you aware of this problem? I think it was introduced by Mark's native layer merge.

Tom

Reply via email to