Re: [jade-develop] NotYetConnectedException

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Oct 1, 2007, at 10:10 AM, Robert Dodier wrote:


Hello,

A little bit more information. I've quoted a previous message below
to provide context. I hope that someone who is familiar with the Classpath
NIO code can at least suggest some avenue for further debugging.


I rewrote a great deal of it; if you've found a bug, it may be my fault.

After equipping VMChannel.java and SocketChannelImpl.java with some
debug output, I see the following. This occurs after running for several
hours.


[...]


The immediate problem is that the instance variable VMChannel.State.valid is false when VMChannel.write is called. Either it was never true, or it was
true and then changed to false. Reading through VMChannel.java and its
associated native code, gnu_java_nio_VMChannel.c, I don't see how "valid"
is maintained.


The 'valid' flag of VMChannel.State *should* only become true when it is initialized with a valid native file descriptor; it should then only become false when the underlying file descriptor is closed. You might want to instrument the 'close' method of VMChannel.State, and see if it is getting called at an unexpected time.

Having a look at VMChannel again, I see that operations on State aren't thread-safe. This might be the problem. Also our NIO may just not be emulating the Sun version properly, and there's a method that you can call on a closed channel that we aren't allowing.

It would be very helpful if you can come up with a simple test case.

Thanks.


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux