adoptium / adoptium/aqa-tests

On AIX platform : Executing java/nio/channels/DatagramChannel/SendReceiveMaxSize.java results in java.net.SocketException

Open
#2,896 2 comments 0 reactions 0 assignees View on GitHub
JBS Reported/Fixed Upstream
Dominant language
HTML
Stars
155
Forks
346
Avg merge
2d 9h
Merged PRs (30d)
36

Description

**Describe the bug**
On AIX platforms executing java/nio/channels/DatagramChannel/SendReceiveMaxSize.java results in java.net.SocketException

> 15:54:02 test SendReceiveMaxSize.testSendReceiveMaxSize(SendReceiveMaxSize$$Lambda$44/0x0000000022c98498@2af5ae5c, 65507, /129.33.196.209): success
> 15:54:02 test SendReceiveMaxSize.testSendReceiveMaxSize(SendReceiveMaxSize$$Lambda$47/0x0000000022c98920@4656d4e2, 65527, /0:0:0:0:0:0:0:1): failure
> 15:54:02 java.net.SocketException: A message for a socket data transfer is too long.
>

This is observed for both JDK-16 and JDK-17

**To Reproduce**
For details please refer https://github.com/adoptium/aqa-tests/issues/2535

**Expected behavior**
1. With IPv4, largest UDP datagram size that can be sent is 65507
2. With IPv6, largest UDP datagram size that can be is 65487

**Screenshots**
Please refer https://github.com/adoptium/aqa-tests/issues/2535

**Additional context**
Test observations noted in https://github.com/adoptium/aqa-tests/issues/2535 are consistent with AIX documentation update at https://www.ibm.com/docs/en/aix/7.1?topic=tuning-udp and https://www.ibm.com/docs/en/aix/7.2?topic=tuning-udp

> The largest UDP datagram that can be sent is 64 KB, minus the UDP header size (8 bytes) and the IP header size (20 bytes for IPv4 or 40 bytes for IPv6 headers).

Largest UDP datagram size is off by one likely due to unsigned short representation of the UDP packet size.

So my understanding is, its not a JDK bug and hence would need a test case update.

Contributor guide

Open the contributing guide

Research direction

Start with java/nio/channels/DatagramChannel/SendReceiveMaxSize.java and reproduce the IPv4 and IPv6 cases on AIX, using the linked AQA issue and AIX UDP documentation for context. Determine the test adjustment needed for the observed maximum datagram sizes, then run the test to confirm the AIX cases no longer fail while the expected limits remain covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
networking, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.