question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

io.netty.resolver.dns.DnsNameResolver#doResolveCached race condition

See original GitHub issue

Expected behavior

No exception.

Actual behavior

2018-01-15 05:33:32,915 ERROR [Redisson-Epoll-1-15] (org.redisson.connection.DNSMonitor) Unable to resolve xxx.0001.use1.cache.amazonaws.com
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:653) ~[?:1.8.0_144]
    at java.util.ArrayList.get(ArrayList.java:429) ~[?:1.8.0_144]
    at io.netty.resolver.dns.DnsNameResolver.doResolveCached(DnsNameResolver.java:613) ~[netty-resolver-dns-4.1.19.Final.jar:4.1.19.Final]
    at io.netty.resolver.dns.DnsNameResolver.doResolve(DnsNameResolver.java:593) ~[netty-resolver-dns-4.1.19.Final.jar:4.1.19.Final]
    at io.netty.resolver.dns.DnsNameResolver.doResolve(DnsNameResolver.java:527) ~[netty-resolver-dns-4.1.19.Final.jar:4.1.19.Final]
    at io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:63) ~[netty-resolver-4.1.19.Final.jar:4.1.19.Final]
    at io.netty.resolver.dns.InflightNameResolver.resolve(InflightNameResolver.java:100) ~[netty-resolver-dns-4.1.19.Final.jar:4.1.19.Final]
    at io.netty.resolver.dns.InflightNameResolver.resolve(InflightNameResolver.java:66) ~[netty-resolver-dns-4.1.19.Final.jar:4.1.19.Final]
    at io.netty.resolver.dns.InflightNameResolver.resolve(InflightNameResolver.java:51) ~[netty-resolver-dns-4.1.19.Final.jar:4.1.19.Final]
    at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:57) ~[netty-resolver-4.1.19.Final.jar:4.1.19.Final]
    at io.netty.resolver.InetSocketAddressResolver.doResolve(InetSocketAddressResolver.java:32) ~[netty-resolver-4.1.19.Final.jar:4.1.19.Final]
    at io.netty.resolver.AbstractAddressResolver.resolve(AbstractAddressResolver.java:108) ~[netty-resolver-4.1.19.Final.jar:4.1.19.Final]
    at org.redisson.connection.DNSMonitor$1.run(DNSMonitor.java:89) ~[redisson-3.5.7.jar:?]
    at io.netty.util.concurrent.PromiseTask$RunnableAdapter.call(PromiseTask.java:38) ~[netty-common-4.1.19.Final.jar:4.1.19.Final]

Steps to reproduce

No reproducer.

Minimal yet complete reproducer code (or URL to code)

n/a

Netty version

4.1.19.Final

JVM version (e.g. java -version)

java version “1.8.0_131” Java™ SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot™ 64-Bit Server VM (build 25.131-b11, mixed mode)

OS version (e.g. uname -a)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Scottmitchcommented, Feb 5, 2018

@sindhuvaidy - This is expected. The fix is included in 4.1.21. Please upgrade.

2reactions
johnoucommented, Jan 15, 2018

@normanmaurer yeah figured as much, that’s why I also mentioned the double check on the size in the sync block.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Package io.netty.resolver.dns
Cache which stores the nameservers that should be used to resolve a specific ... Represents the results from a previous DNS query which...
Read more >
How to prevent DNS / directory race condition after power ...
It appears the solution is to set up a non-AD DNS that is not replicated and is not using active directory at all,...
Read more >
Race condition in Wireguard connection when resolving DNS ...
Setup I'm using the wireguard support in NetworkManager to connect to a wireguard server that has full dual-stack support:
Read more >
ISC BIND Race Condition Vulnerability (CVE-2019-6471)
The remote name server is affected by a race condition vulnerability. Description. According to its self-reported version, the instance of ISC ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found