Skip to content

NS queries hang/fail silently on JDK 25 Linux (works on JDK 21) #408

@anurlien1

Description

@anurlien1

Environment:

  • dnsjava: 3.6.2
  • JDK 25 (Eclipse Temurin), Linux (Alpine container on Debian 12 host)
  • Spring Boot application, long-running process
  • Resolver: ExtendedResolver with explicit servers (8.8.8.8, 1.1.1.1), no system DNS discovery involved

What happens:

NS queries issued via ExtendedResolver consistently fail or return no results when running under JDK 25 on Linux. No exception is thrown, queries appear to time out silently. The same code, same configuration, same DNS servers work correctly under JDK 21 without any changes.

What we tried:

  • Increased query timeout to 20s, no change
  • Forced TCP transport, no change
  • Switched dnsjava's NIO selector to poll() to address potential epoll edge-triggered race, no change
  • Replaced virtual thread executors with a bounded platform thread pool, no change

Downgrading the runtime from JDK 25 to JDK 21 resolves the issue immediately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions