Here are illustrative logs of output and strace logs.
Note that while the musl toolchain is built in a container on a much more powerful machine, this "musl_getaddrinfo_test" app is built locally on the machine with the 3.8 kernel.
I ran the following to get the output on the smaller i686 machine immediately after the app is built.
Apologies for the ruby code wrapping the shell commands.
@musl_ver = `#{CREW_MUSL_PREFIX}/lib/libc.so 2>&1 >/dev/null | head -2 | tail -1 | awk '{print $2}'`.chomp
puts 'Testing the musl resolver to see if it can resolve google.com:'.lightblue
system "./musl_getaddrinfo_test
google.com set_ai_family 2>&1 |tee -a /tmp/musl_#{@musl_ver}_getaddrinfo_test_google.com_set_ai_family.txt "
system "./musl_getaddrinfo_test
google.com 2>&1 |tee -a /tmp/musl_#{@musl_ver}_getaddrinfo_test_google.com.txt"
system "strace -o /tmp/musl_#{@musl_ver}_getaddrinfo_test_google.com_set_ai_family_STRACE.txt ./musl_getaddrinfo_test
google.com set_ai_family"
system "strace -o /tmp/musl_#{@musl_ver}_getaddrinfo_test_google.com_STRACE.txt ./musl_getaddrinfo_test
google.com"
And here is the output for each run before running again via strace. Note how IPv6 addresses show up sporadically, and for 1.2.2 nothing at all shows up, but everything works fine according to the strace logs. (Strace is built against glibc 2.23.)
==> musl_1.2.0-git-17-g33338ebc_getaddrinfo_test_google.com_set_ai_family.txt <==
AF_INET: 142.251.40.110
==> musl_1.2.0-git-17-g33338ebc_getaddrinfo_test_google.com.txt <==
AF_INET: 142.251.40.110
==> musl_1.2.0-git-39-g5cf1ac24_getaddrinfo_test_google.com_set_ai_family.txt <==
AF_INET: 142.251.40.142
==> musl_1.2.0-git-39-g5cf1ac24_getaddrinfo_test_google.com.txt <==
getaddrinfo: Try again
==> musl_1.2.0-git-40-g1b4e84c5_getaddrinfo_test_google.com_set_ai_family.txt <==
AF_INET: 142.251.40.206
==> musl_1.2.0-git-40-g1b4e84c5_getaddrinfo_test_google.com.txt <==
AF_INET6: 2607:f8b0:4006:81f::200e
AF_INET: 142.251.40.206
==> musl_1.2.0-git-6-g2f2348c9_getaddrinfo_test_google.com_set_ai_family.txt <==
AF_INET: 142.250.65.206
==> musl_1.2.0-git-6-g2f2348c9_getaddrinfo_test_google.com.txt <==
AF_INET: 142.250.65.206
==> musl_1.2.1_getaddrinfo_test_google.com_set_ai_family.txt <==
AF_INET: 142.251.40.110
==> musl_1.2.1_getaddrinfo_test_google.com.txt <==
getaddrinfo: Try again
==> musl_1.2.2_getaddrinfo_test_google.com_set_ai_family.txt <==
getaddrinfo: Try again
==> musl_1.2.2_getaddrinfo_test_google.com.txt <==
getaddrinfo: Try again