feedback

curl IPv6 Race Condition and Discovery Service Workaround

My team and I recently ran into an issue with curl where it would randomly error out with "host not found" when trying to ping a specific URL.

Here is how the Cycle team described it to me:

"it's a race condition that exists within that version of curl where it doesn't know what to do when it gets a "no ip found" for ipv6"

While this has been fixed in newer versions, those aren't available on our version of Debian.

As a workaround, we've added a custom DNS resolution record for that URL in the Discovery service in Cycle.

I hope this helps anyone else facing the same issue! Thank you to the Cycle team for your help with this.

avatar
3
  • Hey Andrew, thanks for posting this feedback and it was fun to debug this with you.

    For context, some operating systems like debian and ubuntu have a really hard time handling empty dns responses for IPv6 lookups. That paired with debian being out of date with the latest version of cURL (they have 7.8 when cURL main branch is >8.9) allows for a race condition to exist where receiving a "no ip found" response from the IPv6 lookup, crashes the entire lookup instead of just returning the IPv4.

    avatar
    platform
  • I got this issue using Ubuntu 22.04. Switching to Alpine made all these problems go away instantly.

    avatar
  • Customized docker images with a couple seconds of sleep injected into entrypoint script worked for us on various base images.

    avatar
v2024.12.08.01 © 2024 Petrichor Holdings, Inc.