8207404: MulticastSocket tests failing on Aix
Hi All, I have been having a look at this issue: https://bugs.openjdk.java.net/browse/JDK-8207404 which was raised by Goetz Lindenmaier. When I ran the tests on my AIX system I got the same results as Goetz listed in the issue. Looking at the failure I noticed that it was failing on a setsockopt call in the native code in the PlainDatagramSocketImpl.c file which returned a EADDRNOTAVAIL (Can't assign requested address) Looking at my network configuration using "ifconfig -a", I noticed that my interface "en0" which the test was trying to use did not have an inet6 address configured (see below - some addresses have been obfuscated with x's). en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 configuring the IPV6 on my AIX box I then had a inet6 address configured for en0 en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 with this configured the MulticastSocket tests all passed. Should these tests work without having IPV6 configured on the interface? Goetz, do you have IPV6 configured on the machine you were running these tests on? Thanks Steve Groeger IBM Runtime Technologies Hursley, UK Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
i Steve, thanks for looking at this issue.
Should these tests work without having IPV6 configured on the interface? In general, tests should not show errors if a system does not meet the requirements for the test. In such cases the test should be skipped somehow. Maybe only a test fix is needed.
Can you check on a non-aix machine without ipv6 whether the test passes?
Goetz, do you have IPV6 configured on the machine you were running these tests on? This is our test machine:
bash-4.3$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1 I think this message should be posted to core-libs-dev, too. That's also the list where a potential fix needs to be reviewed. Best regards, Goetz.
-----Original Message----- From: Steve Groeger <GROEGES@uk.ibm.com> Sent: Donnerstag, 29. November 2018 17:07 To: ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Cc: Lindenmaier, Goetz <goetz.lindenmaier@sap.com> Subject: 8207404: MulticastSocket tests failing on Aix
Hi All,
I have been having a look at this issue: https://bugs.openjdk.java.net/browse/JDK-8207404 <https://bugs.openjdk.java.net/browse/JDK-8207404> which was raised by Goetz Lindenmaier.
When I ran the tests on my AIX system I got the same results as Goetz listed in the issue.
Looking at the failure I noticed that it was failing on a setsockopt call in the native code in the PlainDatagramSocketImpl.c file which returned a EADDRNOTAVAIL (Can't assign requested address)
Looking at my network configuration using "ifconfig -a", I noticed that my interface "en0" which the test was trying to use did not have an inet6 address configured (see below - some addresses have been obfuscated with x's).
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
configuring the IPV6 on my AIX box I then had a inet6 address configured for en0
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
with this configured the MulticastSocket tests all passed.
Should these tests work without having IPV6 configured on the interface?
Goetz, do you have IPV6 configured on the machine you were running these tests on?
Thanks Steve Groeger IBM Runtime Technologies Hursley, UK Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Hi Goetz, I disabled IPv6 on my xLinux box and the MulticastSocket tests pass, as they detected that IPv6 is not enabled and then didnt try and set the IPv6 options. I am currently unable to disable IPv6 on my AIX box to test this but would assume it would also work as the code checks to see whether IPv6 is enabled and doesnt try and set the IPV6 options. It seems the issue with the tests failing seems to be, if IPv6 is enabled but the interface doesn't have an IPv6 address associated with it, as in your case here: bash-4.3$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1 where you can see that the en0 interface has an inet address associated but doesnt have an inet6 address associated. I can see that IPv6 is enabled as the lo0 interface has an inet6 address (pointing to localhost) As I stated below, my AIX system was configured in a similar way to yours and the tests failed. When I was able to add an inet6 address to en0, everything works correctly. NOTE: Not sure this was correct but I ran 'sudo autoconf6' which seemed to add the inet6 address to my en0 interface. After that all tests worked. So I think the tests are working as expected, but the AIX system is not configured correctly, but I would like someone else to confirm this. Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU From: "Lindenmaier, Goetz" <goetz.lindenmaier@sap.com> To: Steve Groeger <GROEGES@uk.ibm.com>, ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Date: 30/11/2018 10:18 Subject: RE: 8207404: MulticastSocket tests failing on Aix i Steve, thanks for looking at this issue.
Should these tests work without having IPV6 configured on the interface? In general, tests should not show errors if a system does not meet the requirements for the test. In such cases the test should be skipped somehow. Maybe only a test fix is needed.
Can you check on a non-aix machine without ipv6 whether the test passes?
Goetz, do you have IPV6 configured on the machine you were running these tests on? This is our test machine:
bash-4.3$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1 I think this message should be posted to core-libs-dev, too. That's also the list where a potential fix needs to be reviewed. Best regards, Goetz.
-----Original Message----- From: Steve Groeger <GROEGES@uk.ibm.com> Sent: Donnerstag, 29. November 2018 17:07 To: ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Cc: Lindenmaier, Goetz <goetz.lindenmaier@sap.com> Subject: 8207404: MulticastSocket tests failing on Aix
Hi All,
I have been having a look at this issue:
https://bugs.openjdk.java.net/browse/JDK-8207404
< https://bugs.openjdk.java.net/browse/JDK-8207404
which was raised by Goetz Lindenmaier.
When I ran the tests on my AIX system I got the same results as Goetz listed in the issue.
Looking at the failure I noticed that it was failing on a setsockopt call in the native code in the PlainDatagramSocketImpl.c file which returned a EADDRNOTAVAIL (Can't assign requested address)
Looking at my network configuration using "ifconfig -a", I noticed that my interface "en0" which the test was trying to use did not have an inet6 address configured (see below - some addresses have been obfuscated with x's).
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
configuring the IPV6 on my AIX box I then had a inet6 address configured for en0
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
with this configured the MulticastSocket tests all passed.
Should these tests work without having IPV6 configured on the interface?
Goetz, do you have IPV6 configured on the machine you were running these tests on?
Thanks Steve Groeger IBM Runtime Technologies Hursley, UK Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Hi Steve, I'm not that familiar with the network coding. But if the VM thinks that IPv6 is enabled, but later on something fails, shouldn't the check for IPv6 be improved? Especially, if my and your box have been configured the same, this is probably the default on aix boxes. And I guess the VM should work on the default system configuration? Or do you think that this should be fixed in the default system configuration? Best regards, Goetz.
-----Original Message----- From: Steve Groeger <GROEGES@uk.ibm.com> Sent: Freitag, 30. November 2018 12:20 To: Lindenmaier, Goetz <goetz.lindenmaier@sap.com> Cc: ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net>; core-libs- dev@openjdk.java.net Subject: RE: 8207404: MulticastSocket tests failing on Aix
Hi Goetz,
I disabled IPv6 on my xLinux box and the MulticastSocket tests pass, as they detected that IPv6 is not enabled and then didnt try and set the IPv6 options. I am currently unable to disable IPv6 on my AIX box to test this but would assume it would also work as the code checks to see whether IPv6 is enabled and doesnt try and set the IPV6 options. It seems the issue with the tests failing seems to be, if IPv6 is enabled but the interface doesn't have an IPv6 address associated with it, as in your case here:
bash-4.3$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST ,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
where you can see that the en0 interface has an inet address associated but doesnt have an inet6 address associated. I can see that IPv6 is enabled as the lo0 interface has an inet6 address (pointing to localhost)
As I stated below, my AIX system was configured in a similar way to yours and the tests failed. When I was able to add an inet6 address to en0, everything works correctly. NOTE: Not sure this was correct but I ran 'sudo autoconf6' which seemed to add the inet6 address to my en0 interface. After that all tests worked.
So I think the tests are working as expected, but the AIX system is not configured correctly, but I would like someone else to confirm this.
Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
From: "Lindenmaier, Goetz" <goetz.lindenmaier@sap.com> To: Steve Groeger <GROEGES@uk.ibm.com>, ppc-aix-port-dev <ppc-aix- port-dev@openjdk.java.net> Date: 30/11/2018 10:18 Subject: RE: 8207404: MulticastSocket tests failing on Aix
________________________________
i Steve,
thanks for looking at this issue.
Should these tests work without having IPV6 configured on the interface? In general, tests should not show errors if a system does not meet the requirements for the test. In such cases the test should be skipped somehow. Maybe only a test fix is needed.
Can you check on a non-aix machine without ipv6 whether the test passes?
Goetz, do you have IPV6 configured on the machine you were running these tests on? This is our test machine:
bash-4.3$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST ,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
I think this message should be posted to core-libs-dev, too. That's also the list where a potential fix needs to be reviewed.
Best regards, Goetz.
-----Original Message----- From: Steve Groeger <GROEGES@uk.ibm.com> Sent: Donnerstag, 29. November 2018 17:07 To: ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Cc: Lindenmaier, Goetz <goetz.lindenmaier@sap.com> Subject: 8207404: MulticastSocket tests failing on Aix
Hi All,
I have been having a look at this issue: https://bugs.openjdk.java.net/browse/JDK-8207404 <https://bugs.openjdk.java.net/browse/JDK-8207404> <https://bugs.openjdk.java.net/browse/JDK-8207404 <https://bugs.openjdk.java.net/browse/JDK-8207404> > which was raised by Goetz Lindenmaier.
When I ran the tests on my AIX system I got the same results as Goetz listed in the issue.
Looking at the failure I noticed that it was failing on a setsockopt call in the native code in the PlainDatagramSocketImpl.c file which returned a EADDRNOTAVAIL (Can't assign requested address)
Looking at my network configuration using "ifconfig -a", I noticed that my interface "en0" which the test was trying to use did not have an inet6 address configured (see below - some addresses have been obfuscated with x's).
en0:
flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI
CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
configuring the IPV6 on my AIX box I then had a inet6 address configured for en0
en0:
flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI
CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
with this configured the MulticastSocket tests all passed.
Should these tests work without having IPV6 configured on the interface?
Goetz, do you have IPV6 configured on the machine you were running these tests on?
Thanks Steve Groeger IBM Runtime Technologies Hursley, UK Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
On Fri, Nov 30, 2018 at 12:20 PM Steve Groeger <GROEGES@uk.ibm.com> wrote:
Hi Goetz,
I disabled IPv6 on my xLinux box and the MulticastSocket tests pass, as they detected that IPv6 is not enabled and then didnt try and set the IPv6 options.
Not being a network expert either, I think there's two things to consider here. It seems that IPv6 can be disabled globally (e.g. in the Linux kernel) or IPv6 can be enabled globally, but not all network devices supporting it. A quick search revealed that it seems to be fairly easy to disable IPv6 on a single interface on Linux while still having IPv6 globally enabled (see https://superuser.com/questions/575684/how-to-disable-ipv6-on-a-specific-int...). @Steve Groeger can you please check if the test still succeeds on Linux if you only disable IPv6 on the specific interface used by the test? If it still succeeds, there's probably something to fix on AIX. If it fails on Linux as well, there may be something to fix in the test (i.e. to detect that the corresponding interface doesn't support IPv6) or even in the Java network implementation (i.e. to handle both, IPv6 and IPv4-only interfaces on an IPv6 enabled system correctly). Thank you and best regards, Volker
I am currently unable to disable IPv6 on my AIX box to test this but would assume it would also work as the code checks to see whether IPv6 is enabled and doesnt try and set the IPV6 options. It seems the issue with the tests failing seems to be, if IPv6 is enabled but the interface doesn't have an IPv6 address associated with it, as in your case here:
bash-4.3$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
where you can see that the en0 interface has an inet address associated but doesnt have an inet6 address associated. I can see that IPv6 is enabled as the lo0 interface has an inet6 address (pointing to localhost)
As I stated below, my AIX system was configured in a similar way to yours and the tests failed. When I was able to add an inet6 address to en0, everything works correctly. NOTE: Not sure this was correct but I ran 'sudo autoconf6' which seemed to add the inet6 address to my en0 interface. After that all tests worked.
So I think the tests are working as expected, but the AIX system is not configured correctly, but I would like someone else to confirm this.
Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
From: "Lindenmaier, Goetz" <goetz.lindenmaier@sap.com> To: Steve Groeger <GROEGES@uk.ibm.com>, ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Date: 30/11/2018 10:18 Subject: RE: 8207404: MulticastSocket tests failing on Aix
i Steve,
thanks for looking at this issue.
Should these tests work without having IPV6 configured on the interface? In general, tests should not show errors if a system does not meet the requirements for the test. In such cases the test should be skipped somehow. Maybe only a test fix is needed.
Can you check on a non-aix machine without ipv6 whether the test passes?
Goetz, do you have IPV6 configured on the machine you were running these tests on? This is our test machine:
bash-4.3$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
I think this message should be posted to core-libs-dev, too. That's also the list where a potential fix needs to be reviewed.
Best regards, Goetz.
-----Original Message----- From: Steve Groeger <GROEGES@uk.ibm.com> Sent: Donnerstag, 29. November 2018 17:07 To: ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Cc: Lindenmaier, Goetz <goetz.lindenmaier@sap.com> Subject: 8207404: MulticastSocket tests failing on Aix
Hi All,
I have been having a look at this issue:
https://bugs.openjdk.java.net/browse/JDK-8207404
< https://bugs.openjdk.java.net/browse/JDK-8207404
which was raised by Goetz Lindenmaier.
When I ran the tests on my AIX system I got the same results as Goetz listed in the issue.
Looking at the failure I noticed that it was failing on a setsockopt call in the native code in the PlainDatagramSocketImpl.c file which returned a EADDRNOTAVAIL (Can't assign requested address)
Looking at my network configuration using "ifconfig -a", I noticed that my interface "en0" which the test was trying to use did not have an inet6 address configured (see below - some addresses have been obfuscated with x's).
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
configuring the IPV6 on my AIX box I then had a inet6 address configured for en0
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
with this configured the MulticastSocket tests all passed.
Should these tests work without having IPV6 configured on the interface?
Goetz, do you have IPV6 configured on the machine you were running these tests on?
Thanks Steve Groeger IBM Runtime Technologies Hursley, UK Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
This is probably best discussed on net-dev rather than core-libs-dev. Cheers, David On 1/12/2018 2:27 am, Volker Simonis wrote:
On Fri, Nov 30, 2018 at 12:20 PM Steve Groeger <GROEGES@uk.ibm.com> wrote:
Hi Goetz,
I disabled IPv6 on my xLinux box and the MulticastSocket tests pass, as they detected that IPv6 is not enabled and then didnt try and set the IPv6 options.
Not being a network expert either, I think there's two things to consider here. It seems that IPv6 can be disabled globally (e.g. in the Linux kernel) or IPv6 can be enabled globally, but not all network devices supporting it. A quick search revealed that it seems to be fairly easy to disable IPv6 on a single interface on Linux while still having IPv6 globally enabled (see https://superuser.com/questions/575684/how-to-disable-ipv6-on-a-specific-int...). @Steve Groeger can you please check if the test still succeeds on Linux if you only disable IPv6 on the specific interface used by the test? If it still succeeds, there's probably something to fix on AIX. If it fails on Linux as well, there may be something to fix in the test (i.e. to detect that the corresponding interface doesn't support IPv6) or even in the Java network implementation (i.e. to handle both, IPv6 and IPv4-only interfaces on an IPv6 enabled system correctly).
Thank you and best regards, Volker
I am currently unable to disable IPv6 on my AIX box to test this but would assume it would also work as the code checks to see whether IPv6 is enabled and doesnt try and set the IPV6 options. It seems the issue with the tests failing seems to be, if IPv6 is enabled but the interface doesn't have an IPv6 address associated with it, as in your case here:
bash-4.3$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
where you can see that the en0 interface has an inet address associated but doesnt have an inet6 address associated. I can see that IPv6 is enabled as the lo0 interface has an inet6 address (pointing to localhost)
As I stated below, my AIX system was configured in a similar way to yours and the tests failed. When I was able to add an inet6 address to en0, everything works correctly. NOTE: Not sure this was correct but I ran 'sudo autoconf6' which seemed to add the inet6 address to my en0 interface. After that all tests worked.
So I think the tests are working as expected, but the AIX system is not configured correctly, but I would like someone else to confirm this.
Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
From: "Lindenmaier, Goetz" <goetz.lindenmaier@sap.com> To: Steve Groeger <GROEGES@uk.ibm.com>, ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Date: 30/11/2018 10:18 Subject: RE: 8207404: MulticastSocket tests failing on Aix
i Steve,
thanks for looking at this issue.
Should these tests work without having IPV6 configured on the interface? In general, tests should not show errors if a system does not meet the requirements for the test. In such cases the test should be skipped somehow. Maybe only a test fix is needed.
Can you check on a non-aix machine without ipv6 whether the test passes?
Goetz, do you have IPV6 configured on the machine you were running these tests on? This is our test machine:
bash-4.3$ ifconfig -a en0: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
I think this message should be posted to core-libs-dev, too. That's also the list where a potential fix needs to be reviewed.
Best regards, Goetz.
-----Original Message----- From: Steve Groeger <GROEGES@uk.ibm.com> Sent: Donnerstag, 29. November 2018 17:07 To: ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Cc: Lindenmaier, Goetz <goetz.lindenmaier@sap.com> Subject: 8207404: MulticastSocket tests failing on Aix
Hi All,
I have been having a look at this issue:
https://bugs.openjdk.java.net/browse/JDK-8207404
< https://bugs.openjdk.java.net/browse/JDK-8207404
which was raised by Goetz Lindenmaier.
When I ran the tests on my AIX system I got the same results as Goetz listed in the issue.
Looking at the failure I noticed that it was failing on a setsockopt call in the native code in the PlainDatagramSocketImpl.c file which returned a EADDRNOTAVAIL (Can't assign requested address)
Looking at my network configuration using "ifconfig -a", I noticed that my interface "en0" which the test was trying to use did not have an inet6 address configured (see below - some addresses have been obfuscated with x's).
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
configuring the IPV6 on my AIX box I then had a inet6 address configured for en0
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
with this configured the MulticastSocket tests all passed.
Should these tests work without having IPV6 configured on the interface?
Goetz, do you have IPV6 configured on the machine you were running these tests on?
Thanks Steve Groeger IBM Runtime Technologies Hursley, UK Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Posting this to net-dev as well as ppc-aix-port-dev as this may be a more appropriate mailing list to get responses about networking. I have performed the test Volker mentioned in an earlier post (on xLinux machine, remove the ipv6 address from the ens32 interface but leaving inte6 enabled on the system). With this configuration the jdk/java/net/MulticastSocket/JoinLeave.java test still passes, whereas on AIX with a similar configuration the test fails. For those with knowledge of networking, should this MulticastSocket test pass if there is no ipv6 address enabled for the interface being used. On AIX the setsockopt the call to the mcast_set_if_by_if_v6 function in PlainDatagramSocketImpl.c returns an EADDRNOTAVAIL, whereas on xLinux it doesnt throw an error. Is this as expected? Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU From: Volker Simonis <volker.simonis@gmail.com> To: Steve Groeger <GROEGES@uk.ibm.com> Cc: "Lindenmaier, Goetz" <goetz.lindenmaier@sap.com>, ppc-aix-port-dev@openjdk.java.net, Java Core Libs <core-libs-dev@openjdk.java.net> Date: 30/11/2018 16:28 Subject: Re: 8207404: MulticastSocket tests failing on Aix On Fri, Nov 30, 2018 at 12:20 PM Steve Groeger <GROEGES@uk.ibm.com> wrote:
Hi Goetz,
I disabled IPv6 on my xLinux box and the MulticastSocket tests pass, as they detected that IPv6 is not enabled and then didnt try and set the
IPv6
options.
Not being a network expert either, I think there's two things to consider here. It seems that IPv6 can be disabled globally (e.g. in the Linux kernel) or IPv6 can be enabled globally, but not all network devices supporting it. A quick search revealed that it seems to be fairly easy to disable IPv6 on a single interface on Linux while still having IPv6 globally enabled (see https://superuser.com/questions/575684/how-to-disable-ipv6-on-a-specific-int... ). @Steve Groeger can you please check if the test still succeeds on Linux if you only disable IPv6 on the specific interface used by the test? If it still succeeds, there's probably something to fix on AIX. If it fails on Linux as well, there may be something to fix in the test (i.e. to detect that the corresponding interface doesn't support IPv6) or even in the Java network implementation (i.e. to handle both, IPv6 and IPv4-only interfaces on an IPv6 enabled system correctly). Thank you and best regards, Volker
I am currently unable to disable IPv6 on my AIX box to test this but would assume it would also work as the code checks to see whether IPv6 is enabled and doesnt try and set the IPV6 options. It seems the issue with the tests failing seems to be, if IPv6 is enabled but the interface doesn't have an IPv6 address associated with it, as in your case here:
bash-4.3$ ifconfig -a en0:
flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0:
flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
where you can see that the en0 interface has an inet address associated but doesnt have an inet6 address associated. I can see that IPv6 is enabled as the lo0 interface has an inet6 address (pointing to localhost)
As I stated below, my AIX system was configured in a similar way to
yours
and the tests failed. When I was able to add an inet6 address to en0, everything works correctly. NOTE: Not sure this was correct but I ran 'sudo autoconf6' which seemed to add the inet6 address to my en0 interface. After that all tests worked.
So I think the tests are working as expected, but the AIX system is not configured correctly, but I would like someone else to confirm this.
Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
From: "Lindenmaier, Goetz" <goetz.lindenmaier@sap.com> To: Steve Groeger <GROEGES@uk.ibm.com>, ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Date: 30/11/2018 10:18 Subject: RE: 8207404: MulticastSocket tests failing on Aix
i Steve,
thanks for looking at this issue.
Should these tests work without having IPV6 configured on the interface? In general, tests should not show errors if a system does not meet the requirements for the test. In such cases the test should be skipped somehow. Maybe only a test fix is needed.
Can you check on a non-aix machine without ipv6 whether the test passes?
Goetz, do you have IPV6 configured on the machine you were running these tests on? This is our test machine:
bash-4.3$ ifconfig -a en0:
flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN>
inet 10.xx.xxx.xxx netmask 0xfffffe00 broadcast 10.xx.xxx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0:
flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN>
inet 127.x.x.x netmask 0xff000000 broadcast 127.xxx.xxx.xxx inet6 ::1%1/0 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1
I think this message should be posted to core-libs-dev, too. That's also the list where a potential fix needs to be reviewed.
Best regards, Goetz.
-----Original Message----- From: Steve Groeger <GROEGES@uk.ibm.com> Sent: Donnerstag, 29. November 2018 17:07 To: ppc-aix-port-dev <ppc-aix-port-dev@openjdk.java.net> Cc: Lindenmaier, Goetz <goetz.lindenmaier@sap.com> Subject: 8207404: MulticastSocket tests failing on Aix
Hi All,
I have been having a look at this issue:
https://bugs.openjdk.java.net/browse/JDK-8207404
<
which was raised by Goetz Lindenmaier.
When I ran the tests on my AIX system I got the same results as Goetz
listed
in the issue.
Looking at the failure I noticed that it was failing on a setsockopt call in the native code in the PlainDatagramSocketImpl.c file which returned a EADDRNOTAVAIL (Can't assign requested address)
Looking at my network configuration using "ifconfig -a", I noticed that my interface "en0" which the test was trying to use did not have an inet6 address configured (see below
https://bugs.openjdk.java.net/browse/JDK-8207404 -
some
addresses have been obfuscated with x's).
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
configuring the IPV6 on my AIX box I then had a inet6 address configured for en0
en0: flags=1e084863,14c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTI CAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),LARGESEND,CHAIN> inet 9.20.xx.xx netmask 0xffffff00 broadcast 9.20.xx.xxx inet6 fe80::xxxx:xxxx:xxxx:xxxx/64 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
with this configured the MulticastSocket tests all passed.
Should these tests work without having IPV6 configured on the interface?
Goetz, do you have IPV6 configured on the machine you were running these tests on?
Thanks Steve Groeger IBM Runtime Technologies Hursley, UK Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Steve, On 05/12/2018 10:50, Steve Groeger wrote:
Posting this to net-dev as well as ppc-aix-port-dev as this may be a more appropriate mailing list to get responses about networking.
I have performed the test Volker mentioned in an earlier post (on xLinux machine, remove the ipv6 address from the ens32 interface but leaving inte6 enabled on the system). With this configuration the jdk/java/net/MulticastSocket/JoinLeave.java test still passes, whereas on AIX with a similar configuration the test fails. For those with knowledge of networking, should this MulticastSocket test pass if there is no ipv6 address enabled for the interface being used.
If there is no interface, that supports multicasting, with an IPv6 address, then the test will not execute the particular IPv6 multicasting scenario. That is fine, the IPv6 portion of the test is effectively skipped, since it cannot be tested on the particular platform. ( One could separate IPv4 from IPv6 in this test, and rather return a jtreg skipped status if a suitable interface with IPv6 is not found. But is does not seem worth while. ) -Chris.
Hi Chris, Thanks for responding. The IPv6 portion of the test is not being executed as you have mentioned. The errors I am seeing on AIX are when it runs the IPv4 portion of the test. The AIX system I am running on has IPv6 enabled but the interface that is being used for the IPv4 test (en0) doesn't have an IPv6/INET6 address configured for it. As can be seen from the output from the 'ifconfig -a' command en0: flags=1e084863,80480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 9.xxx.xxx.150 netmask 0xfffffe00 broadcast 9.xxx.xxx.255 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 lo0: flags=e08084b,c0<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,LARGESEND,CHAIN> inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255 inet6 ::1%1/64 tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1 The test does the following: try (MulticastSocket soc = new MulticastSocket()) { soc.setNetworkInterface(nif); soc.joinGroup(group); soc.leaveGroup(group); } catch (IOException e) { throw new UncheckedIOException(e); } The issue I am gettiing is when the test calls the following line soc.setNetworkInterface(nif); which basically ends up throwing an exception from the mcast_set_if_by_if_v6 native method in java.base/unix/native/libnet/PlainDatagramSocketImpl.c when it is doing the setsockopt which gets a EADDRNOTAVAIL error and throws an exception. The code is: if (setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF, (const char*)&index, sizeof(index)) < 0) { if (errno == EINVAL && index > 0) { JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "IPV6_MULTICAST_IF failed (interface has IPv4 " "address only?)"); } else { JNU_ThrowByNameWithMessageAndLastError (env, JNU_JAVANETPKG "SocketException", "Error setting socket option"); } return; } If I run the test with '-Djava.net.preferIPv4Stack=true` it al works fine. Digging into the java code I can see that when the MulticastSocket is created using try (MulticastSocket soc = new MulticastSocket()) { it ends up in the datagramSocketCreate function in Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate(JNIEnv *env, jobject this) { jobject fdObj = (*env)->GetObjectField(env, this, pdsi_fdID); int arg, fd, t = 1; char tmpbuf[1024]; int domain = ipv6_available() ? AF_INET6 : AF_INET; if (IS_NULL(fdObj)) { JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Socket closed"); return; } if ((fd = socket(domain, SOCK_DGRAM, 0)) == -1) { JNU_ThrowByNameWithMessageAndLastError (env, JNU_JAVANETPKG "SocketException", "Error creating socket"); return; } where it is creating a socket with a family of AF_INET6 because the ipv6_available() function returns true. then later we are trying to configure an interface on that socket that doesnt have an IPv6/INET6 address and hence why I think we get the EADDRNOTAVAIL error. I think I have an Linux system setup with a simarly configured interface (system has IPv6 configured but interface has no IPv6/INET6 address configured) but the test works fine when run on that system. This was why I was asking the question on whether this should work on AIX, or whether it should fail on Linux!!! Hoping that with the description above you might be able to let me know what the expected behaviour is. Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU From: Chris Hegarty <chris.hegarty@oracle.com> To: Steve Groeger <GROEGES@uk.ibm.com>, net-dev@openjdk.java.net Cc: ppc-aix-port-dev@openjdk.java.net Date: 07/01/2019 14:34 Subject: Re: 8207404: MulticastSocket tests failing on Aix Steve, On 05/12/2018 10:50, Steve Groeger wrote:
Posting this to net-dev as well as ppc-aix-port-dev as this may be a more appropriate mailing list to get responses about networking.
I have performed the test Volker mentioned in an earlier post (on xLinux
machine, remove the ipv6 address from the ens32 interface but leaving inte6 enabled on the system). With this configuration the jdk/java/net/MulticastSocket/JoinLeave.java test still passes, whereas on AIX with a similar configuration the test fails. For those with knowledge of networking, should this MulticastSocket test
pass if there is no ipv6 address enabled for the interface being used.
If there is no interface, that supports multicasting, with an IPv6 address, then the test will not execute the particular IPv6 multicasting scenario. That is fine, the IPv6 portion of the test is effectively skipped, since it cannot be tested on the particular platform. ( One could separate IPv4 from IPv6 in this test, and rather return a jtreg skipped status if a suitable interface with IPv6 is not found. But is does not seem worth while. ) -Chris. Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
On 09/01/2019 15:20, Steve Groeger wrote:
...
I think I have an Linux system setup with a simarly configured interface (system has IPv6 configured but interface has no IPv6/INET6 address configured) but the test works fine when run on that system.
This is what I observe too. Confirmed by looking at the test output in the jtr file.
This was why I was asking the question on whether this should work on AIX, or whether it should fail on Linux!!!
I suspect that this is an issue with the native setsockopt on AIX. That said, if it cannot be resolved on AIX, then maybe the networking native code on AIX, should workaround it. -Chris.
I think the difference is in setMulticastInterface() in PlainDatagramSocketImpl.c #ifdef __linux__ mcast_set_if_by_if_v4(env, this, fd, value); if (ipv6_available()) { if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); } mcast_set_if_by_if_v6(env, this, fd, value); } #else /* __linux__ not defined */ if (ipv6_available()) { mcast_set_if_by_if_v6(env, this, fd, value); } else { mcast_set_if_by_if_v4(env, this, fd, value); } #endif /* __linux__ */ We should probably follow the Linux way for AIX as well. On Fri, Jan 11, 2019 at 5:29 PM Chris Hegarty <chris.hegarty@oracle.com> wrote:
On 09/01/2019 15:20, Steve Groeger wrote:
...
I think I have an Linux system setup with a simarly configured interface (system has IPv6 configured but interface has no IPv6/INET6 address configured) but the test works fine when run on that system.
This is what I observe too. Confirmed by looking at the test output in the jtr file.
This was why I was asking the question on whether this should work on AIX, or whether it should fail on Linux!!!
I suspect that this is an issue with the native setsockopt on AIX. That said, if it cannot be resolved on AIX, then maybe the networking native code on AIX, should workaround it.
-Chris.
On 11 Jan 2019, at 17:28, Volker Simonis <volker.simonis@gmail.com> wrote:
I think the difference is in setMulticastInterface() in PlainDatagramSocketImpl.c
#ifdef __linux__ mcast_set_if_by_if_v4(env, this, fd, value); if (ipv6_available()) { if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); } mcast_set_if_by_if_v6(env, this, fd, value); } #else /* __linux__ not defined */ if (ipv6_available()) { mcast_set_if_by_if_v6(env, this, fd, value); } else { mcast_set_if_by_if_v4(env, this, fd, value); } #endif /* __linux__ */
We should probably follow the Linux way for AIX as well.
I agree. -Chris.
On Fri, Jan 11, 2019 at 5:29 PM Chris Hegarty <chris.hegarty@oracle.com> wrote:
On 09/01/2019 15:20, Steve Groeger wrote: ...
I think I have an Linux system setup with a simarly configured interface (system has IPv6 configured but interface has no IPv6/INET6 address configured) but the test works fine when run on that system.
This is what I observe too. Confirmed by looking at the test output in the jtr file.
This was why I was asking the question on whether this should work on AIX, or whether it should fail on Linux!!!
I suspect that this is an issue with the native setsockopt on AIX. That said, if it cannot be resolved on AIX, then maybe the networking native code on AIX, should workaround it.
-Chris.
Hi Chris / Volker, I had already tried doing the same as is done for Linux, ie calling this first mcast_set_if_by_if_v4(env, this, fd, value); This still fails for some reason with EADDRNOTAVAIL. This error gets cleared by the if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); } as ipv6_available() still returns true, but we then still try and call mcast_set_if_by_if_v6(env, this, fd, value); which again fails with EADDRNOTAVAIL. So we have the same result. Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU From: Chris Hegarty <chris.hegarty@oracle.com> To: Volker Simonis <volker.simonis@gmail.com> Cc: Steve Groeger <GROEGES@uk.ibm.com>, ppc-aix-port-dev@openjdk.java.net, net-dev <net-dev@openjdk.java.net> Date: 12/01/2019 14:21 Subject: Re: 8207404: MulticastSocket tests failing on Aix
On 11 Jan 2019, at 17:28, Volker Simonis <volker.simonis@gmail.com> wrote:
I think the difference is in setMulticastInterface() in PlainDatagramSocketImpl.c
#ifdef __linux__ mcast_set_if_by_if_v4(env, this, fd, value); if (ipv6_available()) { if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); } mcast_set_if_by_if_v6(env, this, fd, value); } #else /* __linux__ not defined */ if (ipv6_available()) { mcast_set_if_by_if_v6(env, this, fd, value); } else { mcast_set_if_by_if_v4(env, this, fd, value); } #endif /* __linux__ */
We should probably follow the Linux way for AIX as well.
I agree. -Chris.
On Fri, Jan 11, 2019 at 5:29 PM Chris Hegarty <chris.hegarty@oracle.com> wrote:
On 09/01/2019 15:20, Steve Groeger wrote: ...
I think I have an Linux system setup with a simarly configured interface (system has IPv6 configured but interface has no IPv6/INET6 address configured) but the test works fine when run on that system.
This is what I observe too. Confirmed by looking at the test output in the jtr file.
This was why I was asking the question on whether this should work on AIX, or whether it should fail on Linux!!!
I suspect that this is an issue with the native setsockopt on AIX. That said, if it cannot be resolved on AIX, then maybe the networking native code on AIX, should workaround it.
-Chris.
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
On Mon, Jan 14, 2019 at 2:19 PM Steve Groeger <GROEGES@uk.ibm.com> wrote:
Hi Chris / Volker,
I had already tried doing the same as is done for Linux, ie calling this first
mcast_set_if_by_if_v4(env, this, fd, value);
This still fails for some reason with EADDRNOTAVAIL.
Finding this out is probably the main challenge in order to solve this issue and one of the reason why we asked IBM for assistance :) I suppose there must be a possibility to set a socket option for an IPv4 socket on AIX even if IPv6 is enabled. Otherwise this is probably an AIX problem/bug which should be fixed there (where, again, we need assistance from IBM). The man-page (https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/apis/ssocko.htm) mentions the following: IP_MULTICAST_IF: et interface over which outgoing multicast datagrams should be sent. This option is only supported for sockets with an address family of AF_INET and type of SOCK_DGRAM or SOCK_RAW. Maybe the interface is erroneously in the AF_INET6 family? The man-page only mentions the following for EADDRNOTAVAIL: EADDRNOTAVAIL: Address not available. For the IP_ADD_MEMBERSHIP or IP_DROP_MEMBERSHIP operations, this error code indicates that an incorrect address was specified for either the imr_multiaddr or imr_interface parameter value.
This error gets cleared by the
if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); }
as ipv6_available() still returns true, but we then still try and call
mcast_set_if_by_if_v6(env, this, fd, value);
which again fails with EADDRNOTAVAIL. So we have the same result.
Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
From: Chris Hegarty <chris.hegarty@oracle.com> To: Volker Simonis <volker.simonis@gmail.com> Cc: Steve Groeger <GROEGES@uk.ibm.com>, ppc-aix-port-dev@openjdk.java.net, net-dev <net-dev@openjdk.java.net> Date: 12/01/2019 14:21 Subject: Re: 8207404: MulticastSocket tests failing on Aix ________________________________
On 11 Jan 2019, at 17:28, Volker Simonis <volker.simonis@gmail.com> wrote:
I think the difference is in setMulticastInterface() in PlainDatagramSocketImpl.c
#ifdef __linux__ mcast_set_if_by_if_v4(env, this, fd, value); if (ipv6_available()) { if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); } mcast_set_if_by_if_v6(env, this, fd, value); } #else /* __linux__ not defined */ if (ipv6_available()) { mcast_set_if_by_if_v6(env, this, fd, value); } else { mcast_set_if_by_if_v4(env, this, fd, value); } #endif /* __linux__ */
We should probably follow the Linux way for AIX as well.
I agree.
-Chris.
On Fri, Jan 11, 2019 at 5:29 PM Chris Hegarty <chris.hegarty@oracle.com> wrote:
On 09/01/2019 15:20, Steve Groeger wrote: ...
I think I have an Linux system setup with a simarly configured interface (system has IPv6 configured but interface has no IPv6/INET6 address configured) but the test works fine when run on that system.
This is what I observe too. Confirmed by looking at the test output in the jtr file.
This was why I was asking the question on whether this should work on AIX, or whether it should fail on Linux!!!
I suspect that this is an issue with the native setsockopt on AIX. That said, if it cannot be resolved on AIX, then maybe the networking native code on AIX, should workaround it.
-Chris.
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Hi Volker, The reason the mcast_set_if_by_if_v4(env, this, fd, value); probably fails is that the socket that we are trying to set the IPPROTO_IP, IP_MULTICAST_IF options on has been created with the AF_INET6 family, and these options may not be valid. The socket is setup with the AF_INET6 family because ipv6_available() returns true, as the AIX system does support INET6/IPv6. It is just that the interface we are using doesnt have an INET6 address associated with it. I am checking with the AIX/C compiler team in IBM to see if this a bug or not. Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU From: Volker Simonis <volker.simonis@gmail.com> To: Steve Groeger <GROEGES@uk.ibm.com> Cc: Chris Hegarty <chris.hegarty@oracle.com>, net-dev <net-dev@openjdk.java.net>, ppc-aix-port-dev@openjdk.java.net Date: 14/01/2019 14:11 Subject: Re: 8207404: MulticastSocket tests failing on Aix On Mon, Jan 14, 2019 at 2:19 PM Steve Groeger <GROEGES@uk.ibm.com> wrote:
Hi Chris / Volker,
I had already tried doing the same as is done for Linux, ie calling this
first
mcast_set_if_by_if_v4(env, this, fd, value);
This still fails for some reason with EADDRNOTAVAIL.
This error gets cleared by the
if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); }
as ipv6_available() still returns true, but we then still try and call
mcast_set_if_by_if_v6(env, this, fd, value);
which again fails with EADDRNOTAVAIL. So we have the same result.
Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
From: Chris Hegarty <chris.hegarty@oracle.com> To: Volker Simonis <volker.simonis@gmail.com> Cc: Steve Groeger <GROEGES@uk.ibm.com>, ppc-aix-port-dev@openjdk.java.net, net-dev <net-dev@openjdk.java.net> Date: 12/01/2019 14:21 Subject: Re: 8207404: MulticastSocket tests failing on Aix ________________________________
On 11 Jan 2019, at 17:28, Volker Simonis <volker.simonis@gmail.com> wrote:
I think the difference is in setMulticastInterface() in PlainDatagramSocketImpl.c
#ifdef __linux__ mcast_set_if_by_if_v4(env, this, fd, value); if (ipv6_available()) { if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); } mcast_set_if_by_if_v6(env, this, fd, value); } #else /* __linux__ not defined */ if (ipv6_available()) { mcast_set_if_by_if_v6(env, this, fd, value); } else { mcast_set_if_by_if_v4(env, this, fd, value); } #endif /* __linux__ */
We should probably follow the Linux way for AIX as well.
I agree.
-Chris.
On Fri, Jan 11, 2019 at 5:29 PM Chris Hegarty <chris.hegarty@oracle.com> wrote:
On 09/01/2019 15:20, Steve Groeger wrote: ...
I think I have an Linux system setup with a simarly configured interface (system has IPv6 configured but interface has no IPv6/INET6 address configured) but the test works fine when run on that system.
This is what I observe too. Confirmed by looking at the test output in the jtr file.
This was why I was asking the question on whether this should work on AIX, or whether it should fail on Linux!!!
I suspect that this is an issue with the native setsockopt on AIX. That said, if it cannot be resolved on AIX, then maybe the networking native code on AIX, should workaround it.
-Chris.
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number
Finding this out is probably the main challenge in order to solve this issue and one of the reason why we asked IBM for assistance :) I suppose there must be a possibility to set a socket option for an IPv4 socket on AIX even if IPv6 is enabled. Otherwise this is probably an AIX problem/bug which should be fixed there (where, again, we need assistance from IBM). The man-page ( https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/apis/ssocko.htm) mentions the following: IP_MULTICAST_IF: et interface over which outgoing multicast datagrams should be sent. This option is only supported for sockets with an address family of AF_INET and type of SOCK_DGRAM or SOCK_RAW. Maybe the interface is erroneously in the AF_INET6 family? The man-page only mentions the following for EADDRNOTAVAIL: EADDRNOTAVAIL: Address not available. For the IP_ADD_MEMBERSHIP or IP_DROP_MEMBERSHIP operations, this error code indicates that an incorrect address was specified for either the imr_multiaddr or imr_interface parameter value. 741598. 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Hi Steve, I have looked into this topic. I started some work in that area a few years ago and never finished it. I think the root cause of the issue got already pointed out in this discussion. The JVM (correctly) detects that the system is capable of IPv6 and hence opens new sockets with address family AF_INET6. This type of socket shall allow for communication in both domains, IPv6 and IPv4. To ensure the dual stack socket, we also set socket option IPV6_V6ONLY to '0' which should make sure it's not an IPv6 only socket. This is the way, the standard TCP/UDP socket communication works in the JDK, also on AIX. Now, for multicasting, the VM wants to set the multicast interface. At that point, the socket is not yet bound to a local address or has joined a multicast group which might restrict the address type. So, we need either setsockopt(IPV6_MULTICAST_IF) or setsockopt(IP_MULTICAST_IF) to work. The documentation cited by Volker (https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/apis/ssocko.htm) is quite explicit in that IP_MULTICAST_IF is for AF_INET sockets and IPV6_MULTICAST_IF is for AF_INET6 type sockets. So I would expect, that IPV6_MULTICAST_IF works, even for an interface without configured IPv6 address. So, while this is nothing for the compiler folks, it is something for the AIX runtime/network people. Can you address that within IBM? Maybe the AIX experts have a suggestion if there's already a way to code around this. And if it's not possible to get this to work with the existing APIs, would it be possible for you to open a PMR with IBM or find any other means to get that fixed in the OS? Anyway, I think even if IBM can fix this in AIX, it'll be in future versions only. So I'll go ahead and create a patch for modifying the failing tests to be more tolerant to such type of system configurations on AIX. I will send an RFR mail soon. Best regards Christoph From: net-dev <net-dev-bounces@openjdk.java.net> On Behalf Of Steve Groeger Sent: Montag, 14. Januar 2019 15:31 To: Volker Simonis <volker.simonis@gmail.com> Cc: ppc-aix-port-dev@openjdk.java.net; net-dev <net-dev@openjdk.java.net> Subject: Re: 8207404: MulticastSocket tests failing on Aix Hi Volker, The reason the mcast_set_if_by_if_v4(env, this, fd, value); probably fails is that the socket that we are trying to set the IPPROTO_IP, IP_MULTICAST_IF options on has been created with the AF_INET6 family, and these options may not be valid. The socket is setup with the AF_INET6 family because ipv6_available() returns true, as the AIX system does support INET6/IPv6. It is just that the interface we are using doesnt have an INET6 address associated with it. I am checking with the AIX/C compiler team in IBM to see if this a bug or not. Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com<mailto:groeges@uk.ibm.com> Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU From: Volker Simonis <volker.simonis@gmail.com<mailto:volker.simonis@gmail.com>> To: Steve Groeger <GROEGES@uk.ibm.com<mailto:GROEGES@uk.ibm.com>> Cc: Chris Hegarty <chris.hegarty@oracle.com<mailto:chris.hegarty@oracle.com>>, net-dev <net-dev@openjdk.java.net<mailto:net-dev@openjdk.java.net>>, ppc-aix-port-dev@openjdk.java.net<mailto:ppc-aix-port-dev@openjdk.java.net> Date: 14/01/2019 14:11 Subject: Re: 8207404: MulticastSocket tests failing on Aix ________________________________ On Mon, Jan 14, 2019 at 2:19 PM Steve Groeger <GROEGES@uk.ibm.com<mailto:GROEGES@uk.ibm.com>> wrote:
Hi Chris / Volker,
I had already tried doing the same as is done for Linux, ie calling this first
mcast_set_if_by_if_v4(env, this, fd, value);
This still fails for some reason with EADDRNOTAVAIL.
Finding this out is probably the main challenge in order to solve this issue and one of the reason why we asked IBM for assistance :) I suppose there must be a possibility to set a socket option for an IPv4 socket on AIX even if IPv6 is enabled. Otherwise this is probably an AIX problem/bug which should be fixed there (where, again, we need assistance from IBM). The man-page (https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_71/apis/ssocko.htm) mentions the following: IP_MULTICAST_IF: et interface over which outgoing multicast datagrams should be sent. This option is only supported for sockets with an address family of AF_INET and type of SOCK_DGRAM or SOCK_RAW. Maybe the interface is erroneously in the AF_INET6 family? The man-page only mentions the following for EADDRNOTAVAIL: EADDRNOTAVAIL: Address not available. For the IP_ADD_MEMBERSHIP or IP_DROP_MEMBERSHIP operations, this error code indicates that an incorrect address was specified for either the imr_multiaddr or imr_interface parameter value.
This error gets cleared by the
if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); }
as ipv6_available() still returns true, but we then still try and call
mcast_set_if_by_if_v6(env, this, fd, value);
which again fails with EADDRNOTAVAIL. So we have the same result.
Thanks Steve Groeger IBM Runtime Technologies Hursley, Winchester Tel: (44) 1962 816911 Mobex: 279990 Mobile: 07718 517 129 Fax (44) 1962 816800 Lotus Notes: Steve Groeger/UK/IBM Internet: groeges@uk.ibm.com<mailto:groeges@uk.ibm.com>
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
From: Chris Hegarty <chris.hegarty@oracle.com<mailto:chris.hegarty@oracle.com>> To: Volker Simonis <volker.simonis@gmail.com<mailto:volker.simonis@gmail.com>> Cc: Steve Groeger <GROEGES@uk.ibm.com<mailto:GROEGES@uk.ibm.com>>, ppc-aix-port-dev@openjdk.java.net<mailto:ppc-aix-port-dev@openjdk.java.net>, net-dev <net-dev@openjdk.java.net<mailto:net-dev@openjdk.java.net>> Date: 12/01/2019 14:21 Subject: Re: 8207404: MulticastSocket tests failing on Aix ________________________________
On 11 Jan 2019, at 17:28, Volker Simonis <volker.simonis@gmail.com<mailto:volker.simonis@gmail.com>> wrote:
I think the difference is in setMulticastInterface() in PlainDatagramSocketImpl.c
#ifdef __linux__ mcast_set_if_by_if_v4(env, this, fd, value); if (ipv6_available()) { if ((*env)->ExceptionCheck(env)){ (*env)->ExceptionClear(env); } mcast_set_if_by_if_v6(env, this, fd, value); } #else /* __linux__ not defined */ if (ipv6_available()) { mcast_set_if_by_if_v6(env, this, fd, value); } else { mcast_set_if_by_if_v4(env, this, fd, value); } #endif /* __linux__ */
We should probably follow the Linux way for AIX as well.
I agree.
-Chris.
On Fri, Jan 11, 2019 at 5:29 PM Chris Hegarty <chris.hegarty@oracle.com<mailto:chris.hegarty@oracle.com>> wrote:
On 09/01/2019 15:20, Steve Groeger wrote: ...
I think I have an Linux system setup with a simarly configured interface (system has IPv6 configured but interface has no IPv6/INET6 address configured) but the test works fine when run on that system.
This is what I observe too. Confirmed by looking at the test output in the jtr file.
This was why I was asking the question on whether this should work on AIX, or whether it should fail on Linux!!!
I suspect that this is an issue with the native setsockopt on AIX. That said, if it cannot be resolved on AIX, then maybe the networking native code on AIX, should workaround it.
-Chris.
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
participants (6)
-
Chris Hegarty
-
David Holmes
-
Langer, Christoph
-
Lindenmaier, Goetz
-
Steve Groeger
-
Volker Simonis