mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Markus Geiger <markus.geiger@nielsen.com>
Cc: musl@lists.openwall.com
Subject: Re: [musl] [BUG] Non-FQDN domain resolving failure on musl-1.2.x
Date: Mon, 27 Jun 2022 13:35:50 +0200	[thread overview]
Message-ID: <CAMsuMPj0UOwaAjBc4WG3JcKUvj15Qksdrzsc1x2h0xEHnYBZmQ@mail.gmail.com> (raw)
In-Reply-To: <20220625015655.GR7074@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 4282 bytes --]

Hi,

Thanks for the info. I'm not a everyday gdb user (once a year?) – but
I debugged the issue.

In musl 1.2.2 we run into EAI_AGAIN in name_from_dns on
network/lookup_name.c:166
In musl 1.1.24 we don't.

Just that I'm not quite sure if that behavior is correct – if you can
verify that it is correct behaviour treat this issue as resolved. And
thX for looking into it.

gdb backtrace -----------------------------------------------------------------------

#0  name_from_dns (buf=buf@entry=0x7f5d11872490,
canon=canon@entry=0x7f5d11872390 "slack.com",
name=name@entry=0x7f5d118e1c10 "slack.com",
    family=family@entry=0, conf=conf@entry=0x7f5d1187219c) at
src/network/lookup_name.c:166
#1  0x00007f5d11cd8ac2 in name_from_dns_search (family=0,
name=0x7f5d118e1c10 "slack.com", canon=0x7f5d11872390 "slack.com",
buf=0x7f5d11872490)
    at src/network/lookup_name.c:219
#2  __lookup_name (buf=buf@entry=0x7f5d11872490,
canon=canon@entry=0x7f5d11872390 "slack.com",
name=name@entry=0x7f5d118e1c10 "slack.com",
    family=family@entry=0, flags=flags@entry=0) at src/network/lookup_name.c:322
#3  0x00007f5d11cd5fdd in getaddrinfo (host=0x7f5d118e1c10
"slack.com", serv=serv@entry=0x7f5d11872a7c "443",
hint=hint@entry=0x7f5d1188d320,
    res=res@entry=0x7f5d11872a20) at src/network/getaddrinfo.c:91
--Type <RET> for more, q to quit, c to continue without paging--
#4  0x00007f5d11c36ed8 in Curl_getaddrinfo_ex (nodename=<optimized
out>, servname=servname@entry=0x7f5d11872a7c "443",
hints=hints@entry=0x7f5d1188d320, result=result@entry=0x7f5d1188d318)
    at curl_addrinfo.c:124
#5  0x00007f5d11c317ce in getaddrinfo_thread
(arg=arg@entry=0x7f5d1188d2e8) at asyn-thread.c:305
#6  0x00007f5d11c39548 in curl_thread_create_thunk (arg=<optimized
out>) at curl_threads.c:57
#7  0x00007f5d11cf1221 in start (p=0x7f5d11872b00) at
src/thread/pthread_create.c:203
#8  0x00007f5d11cf33e0 in __clone () at src/thread/x86_64/clone.s:22

in we run into the line with return EAI_AGAIN with following locals
-----------------------------------------------------------------------

qbuf = {
  ":s\001\000\000\001\000\000\000\000\000\000\005slack\003com\000\000\001\000\001",
'\000' <repeats 13 times>, "\061\067\062.17.0.3\tee6c51ce088c\n\000st
ip6-loopback\n", '\000' <repeats 103 times>,
"\006\037\207\021]\177\000\000\350\034\207\021]\177\000\000\000\000\000\000\000\000\000\000"...,
  ";\237\001\000\000\001\000\000\000\000\000\000\005slack\003com\000\000\034\000\001\000\000\000\000\000|*\207\021]\177\000\000\210\035\207\021]\177\000\000\n\000\000\000\000\000\000\000|*\207\021]\177\000\000H\034\207\021]\177\000\000\006\037\207\021]\177\000\000\335\332\316\021]\177\000\000\000\000\000\000\000\000\000\000\377\377\377\377\377\377\377\377",
'\000' <repeats 16 times>,
"\177*\207\021]\177\000\000\377\377\377\377\377\377\377\377", '\000'
<repeats 32 times>, "\377\377\377\377\377\377\377\377", '\000'
<repeats 24 times>...}
abuf = {
  "\n\000\000\000\000\000\000\000\314\000\000\000\000\000\000\000m\000\000\000\000\000\000\000\321\000\000\000\000\000\000\000t
ip6-lo\234!\207\021]\177\000\000\373\036\207\021]\177\000\000\234!\207\021]\177\000\000\001\000\000\000\000\000\000\000\351X\316\021]\177\000\000\217\035\207\021]\177\000\000\000\000\000\000\000\000\000\000\370\037\207\021]\177\000\000\370\000\000\000\000\000\000\000\b\036\207\021]\177\000\000\b\036\207\021]\177\000\000\360\036\207\021]\177\000\000R[\316\021]\177\000\000uters\n172.17.0.s\360\036\207\021]\177\000\000\247b\316\021]\177\000\000\000\000\000\000\000\000\000\000\"
\207\021]\177\000\000\b\036\207\021]\177\000\000"...,
  "nameserver 10.204.109.209\000\000\000\000\000\000\000\020\034\216\021]\177\000\000\377\377\377\377\377\377\377\377",
'\000' <repeats 64 times>, "\020\034\216\021]\177", '\000' <repeats 90
times>...}
qp = {0x7f5d11871ac0 ":s\001", 0x7f5d11871bd8 ";\237\001"}
ap = {0x7f5d11871cf0 "\n", 0x7f5d11871ef0 "nameserver 10.204.109.209"}
qlens = {27, 27}
alens = {0, 0}
i = 0
nq = 2
ctx = {addrs = 0x7f5d11872490, canon = 0x7f5d11872390 "slack.com", cnt = 0}

For diff please see attachment since Google Mail Plain Text mode just
.... you know.

I guess it has something to do with RR_AAAA.

Greetings,
Markus Geiger

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 157076 bytes --]

  reply	other threads:[~2022-06-27 11:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 10:28 Markus Geiger
2022-06-24 14:59 ` Rich Felker
2022-06-24 15:10   ` Jeffrey Walton
2022-06-24 15:15     ` Rich Felker
2022-06-24 17:14   ` Markus Geiger
2022-06-25  1:56     ` Rich Felker
2022-06-27 11:35       ` Markus Geiger [this message]
2022-06-27 14:06         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMsuMPj0UOwaAjBc4WG3JcKUvj15Qksdrzsc1x2h0xEHnYBZmQ@mail.gmail.com \
    --to=markus.geiger@nielsen.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).