From owner-freebsd-questions@freebsd.org Wed May 13 20:00:55 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3235B2FE512 for ; Wed, 13 May 2020 20:00:55 +0000 (UTC) (envelope-from per@hedeland.org) Received: from mailout.easydns.com (mailout.easydns.com [64.68.202.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49Mlsf2W6Tz4TtW for ; Wed, 13 May 2020 20:00:54 +0000 (UTC) (envelope-from per@hedeland.org) Received: from localhost (localhost [127.0.0.1]) by mailout.easydns.com (Postfix) with ESMTP id 60483C452A for ; Wed, 13 May 2020 20:00:53 +0000 (UTC) Received: from mailout.easydns.com ([127.0.0.1]) by localhost (emo12-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6jgD1ak5kkyQ for ; Wed, 13 May 2020 20:00:53 +0000 (UTC) Received: from hedeland.org (81-228-157-209-no289.tbcn.telia.com [81.228.157.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easydns.com (Postfix) with ESMTPSA id 22F8CC1B8A for ; Wed, 13 May 2020 20:00:52 +0000 (UTC) Received: from pluto.hedeland.org (pluto.hedeland.org [10.1.1.5]) by tellus.hedeland.org (8.15.2/8.15.2) with ESMTPS id 04DK0oNn067182 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO) for ; Wed, 13 May 2020 22:00:51 +0200 (CEST) (envelope-from per@hedeland.org) Subject: Re: Shared object "libnetgraph.so.4" not found, required by "netstat" To: freebsd-questions@freebsd.org References: <20200512154502.GH59811@bastion.zyxst.net> <20200513180158.GA23072@bastion.zyxst.net> <70cc3458-237f-847c-03f0-0767c26f6b89@fastmail.com> From: Per Hedeland Message-ID: <8570e125-f34d-840a-5803-376d43bc9723@hedeland.org> Date: Wed, 13 May 2020 22:00:50 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <70cc3458-237f-847c-03f0-0767c26f6b89@fastmail.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49Mlsf2W6Tz4TtW X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of per@hedeland.org has no SPF policy when checking 64.68.202.10) smtp.mailfrom=per@hedeland.org X-Spamd-Result: default: False [-0.18 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[209.157.228.81.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.47)[-0.471,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[hedeland.org]; NEURAL_HAM_MEDIUM(-0.70)[-0.699,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[10.202.68.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16686, ipnet:64.68.200.0/22, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.19)[ip: (0.21), ipnet: 64.68.200.0/22(-0.40), asn: 16686(1.23), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 May 2020 20:00:55 -0000 On 2020-05-13 20:31, Yuri Pankov wrote: > tech-lists wrote: >> On Tue, May 12, 2020 at 04:44:35PM +0100, tech-lists wrote: >>> Hi, >>> >>> I'm getting this error in my daily reports: >>> >>> ld-elf.so.1: Shared object "libnetgraph.so.4" not found, required by "netstat" >>> >>> seems to hapen when daily cron runs network interface totals. >>> >>> This is a freebsd bhyve vm running on a freebsd host: >>> >>> vm: FreeBSD 12.1-RELEASE-p3 GENERIC amd64 >>> >>> # freebsd-version -kru >>> 12.1-RELEASE-p3 >>> 12.1-RELEASE-p3 >>> 12.1-RELEASE-p4 >>> >>> it's kept up-to-date with freebsd-update. The messages I get from >>> freebsd-update are a little odd: >>> >>> # freebsd-update fetch >>> src component not installed, skipped >>> Looking up update.FreeBSD.org mirrors... 3 mirrors found. >>> Fetching metadata signature for 12.1-RELEASE from update1.freebsd.org... done. >>> Fetching metadata index... done. >>> Inspecting system... done. >>> Preparing to download files... done. >>> >>> No updates needed to update system to 12.1-RELEASE-p4. >>> # freebsd-update install >>> src component not installed, skipped >>> No updates are available to install. >>> Run '/usr/sbin/freebsd-update fetch' first. >>> >>> I thought netgraph etc would be taken care of by freebsd-update? How can I >>> fix? >>> >>> thanks, >> >> I upgraded again today with freebsd-update and rebooted. >> >> % freebsd-version -kru >> 12.1-RELEASE-p5 >> 12.1-RELEASE-p5 >> 12.1-RELEASE-p5 >> >> same error: >> >> Network interface status: >> ld-elf.so.1: Shared object "libnetgraph.so.4" not found, required by "netstat" >> >> What's odd is it's only this one bhyve vm with it. There are other bhyve vms >> on the same host at the same revision without this issue. There's no >> /etc/src.conf or /etc/make.conf. It's otherwise working fine. > > Is it possible that you modified netstat on this specific VM and freebsd-update refuses to update it? Does the binary match with other VMs? Hm, netstat should be expected to require libnetgraph.so.4 - at least on 12.1-RELEASE: $ ldd /usr/bin/netstat /usr/bin/netstat: libkvm.so.7 => /lib/libkvm.so.7 (0x80026b000) libmemstat.so.3 => /usr/lib/libmemstat.so.3 (0x80027e000) libxo.so.0 => /lib/libxo.so.0 (0x800284000) libutil.so.9 => /lib/libutil.so.9 (0x8002a4000) libnetgraph.so.4 => /usr/lib/libnetgraph.so.4 (0x8002bb000) libc.so.7 => /lib/libc.so.7 (0x8002c2000) libelf.so.2 => /lib/libelf.so.2 (0x8006bb000) I.e. the problem is presumably not with netstat, but that /usr/lib/libnetgraph.so.4 doesn't actually exist on the specific VM. I don't know whether freebsd-update can be expected to re-create files that have "gone missing" other than due to changes between FreeBSD versions, but I wouldn't think so (AFAIK /usr/lib/libnetgraph.so.4 has been part of the release since at least 10.3-RELEASE - probably much longer, it's just the oldest version I have around). Does it work to run netstat outside of cron? --Per Hedeland