java.net.NetworkInterface.getNetworkInterfaces does not work properly on AIX with IPv6
spoole at linux.vnet.ibm.com
Mon Oct 17 05:47:24 PDT 2011
On Mon, 2011-10-17 at 14:34 +0200, Volker Simonis wrote:
> On Mon, Oct 17, 2011 at 12:36 PM, Steve Poole <spoole at linux.vnet.ibm.com> wrote:
> > On Mon, 2011-10-17 at 09:05 +0100, Alan Bateman wrote:
> >> Jonathan Lu wrote:
> >> > Hi net-devs,
> >> >
> >> > I've got a problem on AIX operating system when IPv6 is enabled,which
> >> > can be easily reproduced by attached test case NetworkInterfaceTest.java.
> >> > On AIX paltform, the /proc file system behaves differently from Linux,
> >> > so we cannot just read required lines from /proc/net/if_inet6 but to
> >> > call ioctl to get needed information. A patch is available for
> >> > OpenJDK8 code base, see attachment patch.diff.
> >> >
> >> > Is anybody interested in this topic?
> >> >
> >> > I'm quite aware of the fact that so far there's no publicly available
> >> > building scripts for OpenJDK8 on AIX operating system, but before
> >> > everything settles down, is anybody willing to review the patch? any
> >> > ideas about how to integrate it?
> >> >
> >> > Best regards!
> >> >
> >> This patch adds AIX specific code and I guess the bigger question is
> >> whether this is the start of a stream of patches to add an AIX port (or
> >> portions of) to OpenJDK. If so then I think it needs wider discussion.
> >> The Porters Group (cc'ed) sponsor several porting projects in OpenJDK
> >> and should be able to advise. If the intention is to get an AIX port
> >> into OpenJDK then a possible route is to propose an AIX porting project,
> >> similar to the BSD and MacOX X porting projects.
> >> -Alan.
> > Hi Alan - We (as in IBM and Oracle) and we (as in you and I ) have
> > had some conversations about how to go forward with getting AIX support
> > into OpenJDK. I'm glad your raised the question on the mailing list.
> > At the crux of the discussion are two points
> > 1 - The scale of change
> > 2 - The need (or not) to port Hotspot to AIX.
> > I'll answer the second one first. We have no interest in porting hotspot
> > to AIX. IBM already has a JVM and our intent is to make OpenJDK class
> > libraries etc work with it. Creating a porting project for AIX would
> > thus be disingenuous as it would be signalling an activity that was not
> > really happening .
> > Now lets look at the scale of the changes.
> > To get OpenJDK to build on AIX (sans Hotspot) requires about 300 lines
> > of code change along the lines of extending #ifdefs to include AIX as
> > appropriate (BTW - since we really want to improve OpenJDK portability
> > generally we have and will try to recode these changes as being
> > capability based rather than platform based) Beyond those simple
> > changes there is about an extra 3000 lines in new files. These new
> > files cover building on AIX and providing support for AIX filesystems
> > etc as seen below
> > make/common/Defs-aix.gmk
> > make/common/shared/Defs-aix.gmk
> > make/common/shared/Compiler-xlc_r.gmk
> > src/solaris/native/sun/nio/fs/genAixConstants.c
> > src/solaris/native/sun/nio/fs/AixNativeDispatcher.c
> > src/solaris/classes/sun/nio/fs/AixDosFileAttributeView.java
> > src/solaris/classes/sun/nio/fs/AixFileStore.java
> > src/solaris/classes/sun/nio/fs/AixFileSystem.java
> > src/solaris/classes/sun/nio/fs/AixFileSystemProvider.java
> > src/solaris/classes/sun/nio/fs/AixNativeDispatcher.java
> > src/solaris/classes/sun/nio/fs/AixUserDefinedFileAttributeView.java
> > src/solaris/classes/sun/tools/attach/AixVirtualMachine.java
> > src/solaris/classes/java/lang/UNIXProcess.java.aix
> > src/solaris/classes/sun/nio/ch/AixAsynchronousChannelProvider.java
> > src/solaris/classes/sun/nio/ch/AixEvent.java
> > src/solaris/classes/sun/nio/ch/UnixEvent.java
> > src/solaris/classes/sun/nio/ch/UnixEventPort.java
> > src/solaris/native/sun/nio/ch/UnixEventPort.c
> > src/solaris/native/sun/tools/attach/AixVirtualMachine.c
> > So really we don't see any need to have a porting project for AIX.
> > AIX is very close to both linux and solaris and IBM will maintain the
> > minimal AIX specific code as necessary. Once we've recoded the majority
> > of the #ifdef style changes to be capability based there will be little
> > left to worry about. In any case we wouldn't expect OpenJDK developers
> > who did not have access to an AIX machine to be concerned with breaking
> > AIX. That's up to us to fix if required.
> > Finally, I've asked the IBM developers who are working in this space to
> > get these changes made visible on the mailing lists so you can all see
> > the gory details. I'm sure there will be opportunities to reduce the
> > change sets down even further.
> > Cheers
> > Steve
> Coincidentally, we (as in SAP:) have an HotSpot port on AIX.
> Although there are no plans to contribute it to the OpenJDK in the
> near future, we appreciate the fact that you want to discuss the
> details of your AIX changes publicly on the OpenJDK mailing lists. It
> seems like this could be beneficial to all of us (as in OpenJDK
> platform, IBM, SAP) and finally lead to a more portable OpenJDK source
> base and better Java VMs on AIX.
> We are looking forward for more AIX related discussions,
Hi Volker - since you've ported Hotspot to AIX I assume you must have
had to deal with the same simple "porting class libs to AIX" issues as
we have. Do you have any plans to contribute those changes to OpenJDK?
It would be very useful to be able to compare the two sets and pick out
the best approach(es)
More information about the porters-dev