harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [testing] Exception java.nio.channels.IllegalSelectorException thrown in dnsjava
Date Fri, 31 Oct 2008 10:11:18 GMT
Mark Gertsvolf wrote:
> I am sorry I did not realize Harmony delivers both JVM and java
> classlib, so it did not occur to me to look for java.nio package in
> Harmony source and use Java debugger.

No problem.  Harmony is implementing the VM (including interpreter,
memory manager, and JIT compiler), class libraries, and developer tools.

> Perhaps a more general question then - I am trying to put Java onto a
> Linux distro, which is old  - Kernel 2.4.22 and glibc 2.3.2 on PowerPC.
> I could not use off-the-shelf binary distributions of JVM from Sun or
> IBM as I need to build the JVM from source using my toolchain. I am
> trying to find out whether Harmony is a good choice.
> So, I first ran my application with Harmony JVM and hit this first issue
> with dnsjava.
> My application uses other 3rd party libraries including jain-sip, etc. 

Sounds like you already made good progress, to get as far as running the
application code.  Seriously, there is lots of code that is run as the
runtime environment starts up that it shows things are not fundamentally
broken in your environment.

> Is it fair to say that there is some risk involved in trying to use
> Harmony with my application? Sounds like my application and libraries
> may not run well with Harmony classlib/JVM? 

It depends on your definition of "risk" ?

> Also, what is the policy of
> this community in cases like dnsjava? Is the argument that "dnsjava
> works" with other JVMs strong enough to convince the community to make
> modifications in classlib to make dnsjava work? Or would you be prepared
> to sometimes say: we are not fixing and the library has to change.

Any case for things, like this, that work on the reference
implementation and not with Harmony are a good candidate for raising a
bug.  As a general case, we will follow the Java specifications _and_
try to be compatible with other implementations.  We would only decide
not to fix it if there was a good argument why the existing Harmony
behavior makes better sense.

In this case, I would consider it a bug in Harmony code.

> Apologies if my questions sound silly. I am new to the space.

Not silly at all.  Good questions, and thank you for reporting your
findings.  While we have a good test suite, and run popular applications
frequently, there will always be bugs and issues to deal with, and you
will get best feedback by posting here just like you did!

The only reason I have not fixed this directly in the code already is
that there is an explicit comment and test in the code that throws the
exception you saw.  I'll give people a moment to defend that check
before removing it.

in the meantime you can try continuing your application testing with the
patch below applied.


(revision 707373)
(working copy)
@@ -132,10 +132,10 @@
                 // throw NPE exactly to keep consistency
                 throw new NullPointerException();
-            if (0 == interestSet) {
-                // throw ISE exactly to keep consistency
-                throw new IllegalSelectorException();
-            }
+//            if (0 == interestSet) {
+//                // throw ISE exactly to keep consistency
+//                throw new IllegalSelectorException();
+//            }
             SelectionKey key = keyFor(selector);
             if (null == key) {
                 key = ((AbstractSelector) selector).register(this,

View raw message