[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/91583] New: InetAddress performs an unnecessary reverse l
guillerodriguez.dev at gmail dot com
[Bug classpath/91583] New: InetAddress performs an unnecessary reverse lookup of the ANY_IF address
Wed, 28 Aug 2019 16:31:17 +0000
Bug ID: 91583
Summary: InetAddress performs an unnecessary reverse lookup of
the ANY_IF address
Assignee: unassigned at gcc dot gnu.org
Reporter: guillerodriguez.dev at gmail dot com
Target Milestone: ---
The InetAddress class creates a ANY_IF object in its static initializer. This
will map to 0.0.0.0 for IP4, or to :: for IP6. Then it tries to retrieve the
hostname for this address.
This is pointless (this is a special, invalid address which should not have an
associated hostname). Normally this is more or less harmless: in a typical
configuration it will result in DNS reverse lookups, which should fail fast
with NXDOMAIN (but it is still unnecessary overhead).
But there are cases (for example if the application runs at boot time and the
network is not yet fully up) where this can additionally lead to DNS timeouts.
See, for example:
Also, OpenJDK avoids this reverse lookup by making up "fake" hostnames for
these addresses, presumably to avoid this kind of problems.
|[Prev in Thread]
||[Next in Thread]|
- [Bug classpath/91583] New: InetAddress performs an unnecessary reverse lookup of the ANY_IF address,
guillerodriguez.dev at gmail dot com <=