Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Aug 2024 15:52:55 -0700
From:      Alex Arslan <ararslan@comcast.net>
To:        Bakul Shah <bakul@iitbombay.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Diagnosing virtual machine network issues
Message-ID:  <DB67A5F9-1B15-482F-AD12-0FD4547EC0D0@comcast.net>
In-Reply-To: <A9069EB9-2CFE-4A9A-98AD-2C8085873163@comcast.net>
References:  <FA265FAA-216D-4DCC-92C0-50017C17F7DE@comcast.net> <4a5a177a-5356-453c-8a09-f1d63d5d2e16@sentex.net> <4AB1C33B-DD93-4484-B63A-9FF8FE612B15@comcast.net> <E72DA395-3C66-4520-B58B-31C19E7462A3@comcast.net> <799c7a15-52b8-4b44-bcbd-5ab6a3ef97a6@gmail.com> <0747ED5F-2ED6-461C-9C0B-CFD0EE480D82@comcast.net> <2B0A1E6F-7B89-4F7C-9ECE-ABA94E476D5A@iitbombay.org> <A9069EB9-2CFE-4A9A-98AD-2C8085873163@comcast.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_6BB90C8F-19B1-41B0-94E0-8A904F8698C2
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On Jul 30, 2024, at 2:53=E2=80=AFPM, Alex Arslan =
<ararslan@comcast.net> wrote:
>=20
>=20
>> On Jul 30, 2024, at 2:22=E2=80=AFPM, Bakul Shah <bakul@iitbombay.org> =
wrote:
>>=20
>>> On Jul 30, 2024, at 2:11=E2=80=AFPM, Alex Arslan =
<ararslan@comcast.net> wrote:
>>>=20
>>>> Can you provide more context?  I'm not seeing earlier messages =
anywhere in my email folders.  Is this a Qemu issue?
>>>=20
>>> The original message is from just over a month ago, archived here:
>>> =
https://lists.freebsd.org/archives/freebsd-hackers/2024-June/003378.html
>>> Basically, we have FreeBSD 13.2 VMs running under KVM on a Linux =
machine.
>>> Some code is using libcurl to make a request to an invalid domain =
and is
>>> testing that the error is a resolution failure. This test passes on =
all
>>> platforms except specifically in these FreeBSD VMs; I can't =
reproduce
>>> locally on FreeBSD. That made me think that there's an issue with =
how the
>>> VM was set up, prompting the original message and discussion. Then =
what
>>> I recently found was that we set a 30-second timeout for the libcurl
>>> request, which FreeBSD hits in the VM, as it evidently spends a full
>>> 30 seconds attempting to resolve the host, while e.g. Linux reports =
a
>>> resolution failure immediately.
>>=20
>> What does /etc/resolv.conf look like on the FreeBSD VM?
>=20
>=20
> Just a comment and a name server line:
>=20
> $ cat /etc/resolv.conf
> # Generated by resolvconf
> nameserver 192.168.122.1

I believe that is the host IP, so I guess the VM is using the host for =
DNS
resolution? Interestingly, if I add `nameserver 8.8.8.8` below the line
with the host IP, it takes 10 seconds rather than 30 to reach the =
expected
domain resolution failure. If I put 8.8.8.8 above the host IP, the =
domain
resolution failure is instantaneous.

Not a particularly satisfying conclusion to this saga as I don't =
understand
why it's happening but at least I have a workaround that should =
hopefully
do the job. I really appreciate everyone's help and input thus far!

What's the best way to add `nameserver 8.8.8.8` to /etc/resolv.conf as
part of the VM's configuration?=

--Apple-Mail=_6BB90C8F-19B1-41B0-94E0-8A904F8698C2
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;"><br =
id=3D"lineBreakAtBeginningOfMessage"><div><br><blockquote =
type=3D"cite"><div>On Jul 30, 2024, at 2:53=E2=80=AFPM, Alex Arslan =
&lt;ararslan@comcast.net&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div><meta http-equiv=3D"content-type"=
 content=3D"text/html; charset=3Dutf-8"><div style=3D"overflow-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: =
after-white-space;"><br><div><blockquote type=3D"cite"><div>On Jul 30, =
2024, at 2:22=E2=80=AFPM, Bakul Shah &lt;bakul@iitbombay.org&gt; =
wrote:</div><div><br style=3D"caret-color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: =
normal; font-weight: 400; letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: =
none;"><blockquote type=3D"cite" style=3D"font-family: Helvetica; =
font-size: 12px; font-style: normal; font-variant-caps: normal; =
font-weight: 400; letter-spacing: normal; orphans: auto; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;">On Jul 30, 2024, at 2:11=E2=80=AFPM, Alex Arslan =
&lt;ararslan@comcast.net&gt; wrote:<br><br><blockquote type=3D"cite">Can =
you provide more context? &nbsp;I'm not seeing earlier messages anywhere =
in my email folders. &nbsp;Is this a Qemu issue?<br></blockquote><br>The =
original message is from just over a month ago, archived =
here:<br>https://lists.freebsd.org/archives/freebsd-hackers/2024-June/0033=
78.html<br>Basically, we have FreeBSD 13.2 VMs running under KVM on a =
Linux machine.<br>Some code is using libcurl to make a request to an =
invalid domain and is<br>testing that the error is a resolution failure. =
This test passes on all<br>platforms except specifically in these =
FreeBSD VMs; I can't reproduce<br>locally on FreeBSD. That made me think =
that there's an issue with how the<br>VM was set up, prompting the =
original message and discussion. Then what<br>I recently found was that =
we set a 30-second timeout for the libcurl<br>request, which FreeBSD =
hits in the VM, as it evidently spends a full<br>30 seconds attempting =
to resolve the host, while e.g. Linux reports a<br>resolution failure =
immediately.<br></blockquote><br style=3D"caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none;"><span style=3D"caret-color: rgb(0, 0, 0); =
font-family: Helvetica; font-size: 12px; font-style: normal; =
font-variant-caps: normal; font-weight: 400; letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; =
text-decoration: none; float: none; display: inline !important;">What =
does /etc/resolv.conf look like on the FreeBSD =
VM?</span></div></blockquote></div><div><br></div>Just a comment and a =
name server line:<div><br><div><div>$ cat /etc/resolv.conf</div><div># =
Generated by resolvconf</div><div>nameserver =
192.168.122.1</div></div></div></div></div></blockquote><br></div><div><di=
v>I believe that is the host IP, so I guess the VM is using the host for =
DNS</div><div>resolution? Interestingly, if I add `nameserver 8.8.8.8` =
below the line</div><div>with the host IP, it takes 10 seconds rather =
than 30 to reach the expected</div><div>domain resolution failure. If I =
put 8.8.8.8 above the host IP, the domain</div><div>resolution failure =
is instantaneous.</div><div><br></div><div>Not a particularly satisfying =
conclusion to this saga as I don't understand</div><div>why it's =
happening but at least I have a workaround that should =
hopefully</div><div>do the job.&nbsp;I really appreciate everyone's help =
and input thus far!</div><div><br></div><div>What's the best way to add =
`nameserver 8.8.8.8` to /etc/resolv.conf as</div><div>part of the VM's =
configuration?</div></div></body></html>=

--Apple-Mail=_6BB90C8F-19B1-41B0-94E0-8A904F8698C2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DB67A5F9-1B15-482F-AD12-0FD4547EC0D0>