From nobody Fri Aug 02 22:52:55 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbLjF13SPz5RMGB for ; Fri, 02 Aug 2024 22:53:37 +0000 (UTC) (envelope-from ararslan@comcast.net) Received: from resqmta-c2p-569298.sys.comcast.net (resqmta-c2p-569298.sys.comcast.net [IPv6:2001:558:fd00:56::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbLjD0l2Sz4dr4 for ; Fri, 2 Aug 2024 22:53:36 +0000 (UTC) (envelope-from ararslan@comcast.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=comcast.net header.s=20190202a header.b=ahg7BmD2; dmarc=pass (policy=quarantine) header.from=comcast.net; spf=pass (mx1.freebsd.org: domain of ararslan@comcast.net designates 2001:558:fd00:56::4 as permitted sender) smtp.mailfrom=ararslan@comcast.net Received: from resomta-c2p-555662.sys.comcast.net ([96.102.18.235]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resqmta-c2p-569298.sys.comcast.net with ESMTPS id a0ZesF9cBaAKOa19Ns7Fc2; Fri, 02 Aug 2024 22:53:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1722639209; bh=uAUPCNTYQN4/hyXgCFkcTPDLr5AgxNj7MLitpnteAnE=; h=Received:Received:From:Message-Id:Content-Type:Mime-Version: Subject:Date:To:Xfinity-Spam-Result; b=ahg7BmD2vpfxkFS9MWUcZMTA3Had/dtKgftkxGDiVcK/3CgDCy9DXpMhaJ7eBPIdt TsA5WHn+fa4CedftmYOVrTyUn79HD+13iyv/Gh/ko8/J+aqlf6YAahTO8l763ixAZh KbNxBFE//XgDYywIAFJivhZZzDMAIMAz/wqcHAN2VqGMH0/qw+QTFUE5orFO11CNs6 1Iar9heJNTfGyV/lB2LNn/YszkdpIcjBUIqBzrmfjHPId8pOeC6+BXTTTjwsOxKB5b m8Q8ki1RHHQiuPsx5UW5rMViu8il3sTXhdeuejvLpo2zl6JmCyUtp/F64YLYzL36Py kWP8qkCEEqo7w== Received: from smtpclient.apple ([67.160.29.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resomta-c2p-555662.sys.comcast.net with ESMTPSA id a18zsvnM8khVga190syxId; Fri, 02 Aug 2024 22:53:07 +0000 From: Alex Arslan Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_6BB90C8F-19B1-41B0-94E0-8A904F8698C2" List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: Diagnosing virtual machine network issues Date: Fri, 2 Aug 2024 15:52:55 -0700 In-Reply-To: Cc: FreeBSD Hackers To: Bakul Shah References: <4a5a177a-5356-453c-8a09-f1d63d5d2e16@sentex.net> <4AB1C33B-DD93-4484-B63A-9FF8FE612B15@comcast.net> <799c7a15-52b8-4b44-bcbd-5ab6a3ef97a6@gmail.com> <0747ED5F-2ED6-461C-9C0B-CFD0EE480D82@comcast.net> <2B0A1E6F-7B89-4F7C-9ECE-ABA94E476D5A@iitbombay.org> X-Mailer: Apple Mail (2.3774.600.62) X-CMAE-Envelope: MS4xfEi5xW9svWWQhtHtTCSkdvfJ/nDaW80+k6h5DZcSpKm+zrRNC0TxOepmESr83BeqxG8cGjh/ztFNgN8sZwia8Mmjg/gobE//fA925DZpJKbdvsrnGtR4 NVv3MWEasyKPCOzsxafQ1eTtN2l+nWJXB1C88CXYYb9k4Ne+WXl3VOmM1uxt5WALUYrG/qT9hDjhrv3RQfam+fOseIaxlBg8bfhGX51SV79KUlZrgd0eCMSS X-Spamd-Bar: / X-Spamd-Result: default: False [-1.00 / 15.00]; HFILTER_HELO_5(3.00)[resqmta-c2p-569298.sys.comcast.net]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[comcast.net,quarantine]; R_SPF_ALLOW(-0.20)[+ip6:2001:558:fd00:56::/64]; R_DKIM_ALLOW(-0.20)[comcast.net:s=20190202a]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; FREEMAIL_FROM(0.00)[comcast.net]; RCVD_TLS_ALL(0.00)[]; ASN(0.00)[asn:7922, ipnet:2001:558::/29, country:US]; FREEMAIL_ENVFROM(0.00)[comcast.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[comcast.net:+]; MLMMJ_DEST(0.00)[freebsd-hackers@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DWL_DNSWL_NONE(0.00)[comcast.net:dkim] X-Rspamd-Queue-Id: 4WbLjD0l2Sz4dr4 --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 = wrote: >=20 >=20 >> On Jul 30, 2024, at 2:22=E2=80=AFPM, Bakul Shah = wrote: >>=20 >>> On Jul 30, 2024, at 2:11=E2=80=AFPM, Alex Arslan = 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

On Jul 30, 2024, at 2:53=E2=80=AFPM, Alex Arslan = <ararslan@comcast.net> wrote:


On Jul 30, = 2024, at 2:22=E2=80=AFPM, Bakul Shah <bakul@iitbombay.org> = wrote:

On Jul 30, 2024, at 2:11=E2=80=AFPM, Alex Arslan = <ararslan@comcast.net> wrote:

Can = you provide more context?  I'm not seeing earlier messages anywhere = in my email folders.  Is this a Qemu issue?

The = original message is from just over a month ago, archived = here:
https://lists.freebsd.org/archives/freebsd-hackers/2024-June/0033= 78.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.

What = does /etc/resolv.conf look like on the FreeBSD = VM?

Just a comment and a = name server line:

$ 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--