Date: Thu, 22 Oct 2020 12:11:17 -0400 From: Mike Jakubik <mike.jakubik@swiftsmsgateway.com> To: "Freebsd Stable" <freebsd-stable@freebsd.org> Subject: Custom kernel breaks py-glances in 12.2 Message-ID: <175511429f5.ff83169625753.7800820802617382912@swiftsmsgateway.com>
index | next in thread | raw e-mail
Hi,
When i compile a non GENERIC kernel (which mainly removes some debugging and devices i do not have) the Python program glances fails with the following message.
[root@jailer ~]# glances
Traceback (most recent call last):
 File "/usr/local/bin/glances", line 8, in <module>
   sys.exit(main())
 File "/usr/local/lib/python3.9/site-packages/glances/__init__.py", line 143, in main
   start(config=config, args=args)
 File "/usr/local/lib/python3.9/site-packages/glances/__init__.py", line 108, in start
   mode = GlancesMode(config=config, args=args)
 File "/usr/local/lib/python3.9/site-packages/glances/standalone.py", line 78, in __init__
   self.stats.update()
 File "/usr/local/lib/python3.9/site-packages/glances/stats.py", line 234, in update
   self._plugins[p].update()
 File "/usr/local/lib/python3.9/site-packages/glances/plugins/glances_plugin.py", line 925, in wrapper
   ret = fct(self, *args, **kw)
 File "/usr/local/lib/python3.9/site-packages/glances/plugins/glances_plugin.py", line 935, in wrapper
   ret = fct(*args, **kw)
 File "/usr/local/lib/python3.9/site-packages/glances/plugins/glances_cpu.py", line 84, in update
   stats = self.update_local()
 File "/usr/local/lib/python3.9/site-packages/glances/plugins/glances_cpu.py", line 118, in update_local
   cpu_stats = psutil.cpu_stats()
 File "/usr/local/lib/python3.9/site-packages/psutil/__init__.py", line 1866, in cpu_stats
   return _psplatform.cpu_stats()
 File "/usr/local/lib/python3.9/site-packages/psutil/_psbsd.py", line 293, in cpu_stats
   ctxsw, intrs, soft_intrs, syscalls, traps = cext.cpu_stats()
OSError: [Errno 12] Cannot allocate memory (originated from sysctlbyname('vm.stats.sys.v_soft'))
[root@jailer ~]# sysctl vm.stats.sys.v_soft
vm.stats.sys.v_soft: 3101
[root@jailer ~]# uname -a
FreeBSD jailer.local 12.2-STABLE FreeBSD 12.2-STABLE r366936 JAILERÂ amd64
I don't understand what is breaking it as everything else works fine and i only removed the usual stuff i do. Below is the custom kernel config.
Thanks.
# $FreeBSD: stable/12/sys/amd64/conf/GENERIC 365612 2020-09-10 20:46:16Z erj $
cpu            HAMMER
ident          JAILER
options        SCHED_ULE              # ULE scheduler
options        NUMA                   # Non-Uniform Memory Architecture support
options        PREEMPTION             # Enable kernel thread preemption
options        VIMAGE                 # Subsystem virtualization, e.g. VNET
options        INET                   # InterNETworking
options        INET6                  # IPv6 communications protocols
options        IPSEC                  # IP (v4/v6) security
options        IPSEC_SUPPORT          # Allow kldload of ipsec and tcpmd5
options        TCP_OFFLOAD            # TCP offload
options        TCP_BLACKBOX           # Enhanced TCP event logging
options        TCP_HHOOK              # hhook(9) framework for TCP
options        TCP_RFC7413            # TCP Fast Open
options        SCTP                   # Stream Control Transmission Protocol
options        FFS                    # Berkeley Fast Filesystem
options        SOFTUPDATES            # Enable FFS soft updates support
options        UFS_ACL                # Support for access control lists
options        UFS_DIRHASH            # Improve performance on big directories
options        PROCFS                 # Process filesystem (requires PSEUDOFS)
options        PSEUDOFS               # Pseudo-filesystem framework
options        GEOM_LABEL             # Provides labelization
options        EFIRT                  # EFI Runtime Services support
options        SCSI_DELAY=5000        # Delay (in ms) before probing SCSI
options        KTRACE                 # ktrace(1) support
options        STACK                  # stack(9) support
options        SYSVSHM                # SYSV-style shared memory
options        SYSVMSG                # SYSV-style message queues
options        SYSVSEM                # SYSV-style semaphores
options        _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options        PRINTF_BUFR_SIZE=128   # Prevent printf output being interspersed.
options        KBD_INSTALL_CDEV       # install a CDEV entry in /dev
options        HWPMC_HOOKS            # Necessary kernel hooks for hwpmc(4)
options        AUDIT                  # Security event auditing
options        CAPABILITY_MODE        # Capsicum capability mode
options        CAPABILITIES           # Capsicum capabilities
options        MAC                    # TrustedBSD MAC Framework
options        DDB_CTF                # Kernel ELF linker loads CTF data
options        INCLUDE_CONFIG_FILE    # Include this file in kernel
options        RACCT                  # Resource accounting framework
options        RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default
options        RCTL                   # Resource limits
# Make an SMP-capable kernel by default
options        SMP                    # Symmetric MultiProcessor Kernel
options        EARLY_AP_STARTUP
# Bus support.
device         acpi
options        ACPI_DMAR
device         pci
options        PCI_HP                 # PCI-Express native HotPlug
options        PCI_IOV                # PCI SR-IOV support
# ATA controllers
device         ahci                   # AHCI-compatible SATA controllers
device         ata                    # Legacy ATA/SATA controllers
# ATA/SCSI peripherals
device         scbus                  # SCSI bus (required for ATA/SCSI)
device         da                     # Direct Access (disks)
device         cd                     # CD
device         pass                   # Passthrough device (direct ATA/SCSI access)
device         ses                    # Enclosure Services (SES and SAF-TE)
#device        ctl                    # CAM Target Layer
# RAID controllers interfaced to the SCSI subsystem
device         amr                    # AMI MegaRAID
device         ciss                   # Compaq Smart RAID 5*
# atkbdc0 controls both the keyboard and the PS/2 mouse
device         atkbdc                 # AT keyboard controller
device         atkbd                  # AT keyboard
device         psm                    # PS/2 mouse
device         kbdmux                 # keyboard multiplexer
device         vga                    # VGA video card driver
options        VESA                   # Add support for VESA BIOS Extensions (VBE)
device         splash                 # Splash screen and screen saver support
# syscons is the default console driver, resembling an SCO console
device         sc
options        SC_PIXEL_MODE          # add support for the raster text mode
# vt is the new video console driver
device         vt
device         vt_vga
device         vt_efifb
# Serial (COM) ports
device         uart                   # Generic UART driver
# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device         miibus                 # MII bus support
device         bce                    # Broadcom BCM5706/BCM5708 Gigabit Ethernet
# Pseudo devices.
device         crypto                 # core crypto support
device         loop                   # Network loopback
device         random                 # Entropy device
device         padlock_rng            # VIA Padlock RNG
device         rdrand_rng             # Intel Bull Mountain RNG
device         ether                  # Ethernet support
device         vlan                   # 802.1Q VLAN support
device         tuntap                 # Packet tunnel.
device         md                     # Memory "disks"
device         gif                    # IPv6 and IPv4 tunneling
device         firmware               # firmware assist module
device         cryptodev
device         aesni
# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device         bpf                    # Berkeley packet filter
# USB support
options        USB_DEBUG              # enable debug msgs
device         uhci                   # UHCI PCI->USB interface
device         ohci                   # OHCI PCI->USB interface
device         ehci                   # EHCI PCI->USB interface (USB 2.0)
device         xhci                   # XHCI PCI->USB interface (USB 3.0)
device         usb                    # USB Bus (required)
device         ukbd                   # Keyboard
device         umass                  # Disks/Mass storage - Requires scbus and da
# Netmap provides direct access to TX/RX rings on supported NICs
device         netmap                 # netmap(4) support
From owner-freebsd-stable@freebsd.org Thu Oct 22 17:37:51 2020
Return-Path: <owner-freebsd-stable@freebsd.org>
Delivered-To: freebsd-stable@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 6535C44DB89;
Thu, 22 Oct 2020 17:37:51 +0000 (UTC)
(envelope-from sergey.dyatko@gmail.com)
Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com
[IPv6:2a00:1450:4864:20::244])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4CHF1p4694z4Cfm;
Thu, 22 Oct 2020 17:37:50 +0000 (UTC)
(envelope-from sergey.dyatko@gmail.com)
Received: by mail-lj1-x244.google.com with SMTP id h20so2818611lji.9;
Thu, 22 Oct 2020 10:37:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s 161025;
hÚte:from:to:cc:subject:message-id:in-reply-to:references
:mime-version:content-transfer-encoding;
bh=MhoOwATKEWNb+CUubFE0qpbga7DCwAufLRF1GI67eHc=;
b=smFfopyybvrzr+pmaUkf7IBdThKftSCsAlzXiQT4VI49loRSNj8E5GNtlMTOjrQtiJ
j+aQmm7ds1MsAtjZ9C1WG1Q7tMEa3O/TC+BoMDq7gsv4+F6tBVQZev3H+Y5+VvIBRP46
ecVlCuf65QlfmX9KdunidkRPBb5RJ3P6HQV4zhcKU9W3oWyI8tftE3Dt5yi6GNYWm2gZ
Embty9ZbYaAJwwbc2mu/Qi4XAmdrS/3a/BQ0QaztmW/jDRigemx44n12T5u9+7I+Tw+p
MGxN3rQDHuF9/YZaXgTdeTIjS+FUOnbb8DB4zkhlD8tpltGBTTTMG88Ci53WWstUQ50w
BuBA=X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d100.net; s 161025;
h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
:references:mime-version:content-transfer-encoding;
bh=MhoOwATKEWNb+CUubFE0qpbga7DCwAufLRF1GI67eHc=;
b=DVQylvZoymL3QvqhB5znWkJfQKqgi5MU6pI7/P+Fw3s8OVxFu6D/R9GdLpF0rVxLLy
TJJUT4fUtbHyCVeWi9qq4ksHb/6k6BBnHjG7qzbjRHNJM110f92dTTpW37CCeRYwXLic
sbcHZaVfKzTbTHonymcogvW9fsSkOKAmQUkBJIOgn5M3F9qSV6pPY+blVI1PMUpA0LkP
G8+a9kSi1t0GZ7Evn0h4ap/WonqyLXUehAU5ztYcEZ5S1joCgWcSphLaQdedSjDKAQzS
Y6Rukut1E4zFiwqqwxET3waWjz7IEirNH5r1IXH0m5Jbd8saNpIXryyXGR1Nwoa9upqW
t2wQ=X-Gm-Message-State: AOAM5339QmtO1nF56RFiDZkJS3AGfoO7EcO/ZHbJ0rwFSAVeGsRCYgzr
CS4sfQqVviOvqv4hHIcslrqXm47vs40X-Google-Smtp-Source: ABdhPJzPieafJ/G5sump7HcpCI+vTgHuAIgI5rigXQEJtUGEy+kBKuOu1D/yawjJoq7RenHeU2PouQ=X-Received: by 2002:a2e:6e14:: with SMTP id j20mr1301609ljc.361.1603388268743;
Thu, 22 Oct 2020 10:37:48 -0700 (PDT)
Received: from laptop.domain
(mm-223-241-125-178.mfilial.dynamic.pppoe.byfly.by. [178.125.241.223])
by smtp.gmail.com with ESMTPSA id j12sm388880ljg.22.2020.10.22.10.37.47
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits%6/256);
Thu, 22 Oct 2020 10:37:48 -0700 (PDT)
Date: Thu, 22 Oct 2020 20:37:52 +0300
From: "Sergey V. Dyatko" <sergey.dyatko@gmail.com>
To: freebsd-current@freebsd.org
Cc: freebsd-stable@freebsd.org
Subject: Re: Zpool doesn't boot anymore after FreeBSD 12.1
Message-ID: <20201022203752.36fb6f3f@laptop.domain>
In-Reply-To: <33381216-498a-51ff-839c-da772c43b60e@FreeBSD.org>
References: <CAJajdNWgiKyd1jmX4uPogWU4Ty=OiEgDnQGaoLZUWgj_pr9WKw@mail.gmail.com>
<CAJajdNXPhGj-mKj6R_N94Bfnhvm=nHr3RwfBm4qoTB3g_=6kGw@mail.gmail.com>
<CAJajdNV0nGdhAm6cgs2SKMBsY=Hi1Azb8fA_0PFrLUuejCT8ag@mail.gmail.com>
<e109cba7-2716-7a83-3d39-66de48b93c8b@FreeBSD.org>
<CAJajdNXo-rqBjR8FL4GTw6sy691NFH0B-CnHv_88i5P6XJECDA@mail.gmail.com>
<33381216-498a-51ff-839c-da772c43b60e@FreeBSD.org>
X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; amd64-portbld-freebsd13.0)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Rspamd-Queue-Id: 4CHF1p4694z4Cfm
X-Spamd-Bar: ---
Authentication-Results: mx1.freebsd.org;
dkim=pass header.d=gmail.com header.s 161025 header.b=smFfopyy;
dmarc=pass (policy=none) header.from=gmail.com;
spf=pass (mx1.freebsd.org: domain of sergeydyatko@gmail.com designates
2a00:1450:4864:20::244 as permitted sender)
smtp.mailfrom=sergeydyatko@gmail.com
X-Spamd-Result: default: False [-3.36 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[];
FREEMAIL_FROM(0.00)[gmail.com];
R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36];
TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[3];
DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2];
DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
NEURAL_HAM_SHORT(-0.41)[-0.406];
RECEIVED_SPAMHAUS_PBL(0.00)[178.125.241.223:received];
FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+];
FREEMAIL_ENVFROM(0.00)[gmail.com];
ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US];
TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.966];
R_DKIM_ALLOW(-0.20)[gmail.com:s 161025]; FROM_HAS_DN(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.987];
MIME_GOOD(-0.10)[text/plain];
RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::244:from];
RCVD_TLS_ALL(0.00)[];
MAILMAN_DEST(0.00)[freebsd-stable,freebsd-current]
X-BeenThere: freebsd-stable@freebsd.org
X-Mailman-Version: 2.1.33
Precedence: list
List-Id: Production branch of FreeBSD source code <freebsd-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-stable>,
<mailto:freebsd-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-stable/>
List-Post: <mailto:freebsd-stable@freebsd.org>
List-Help: <mailto:freebsd-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-stable>,
<mailto:freebsd-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Oct 2020 17:37:51 -0000
On Thu, 22 Oct 2020 16:42:16 +0300
Andriy Gapon <avg@FreeBSD.org> wrote:
> On 22/10/2020 16:39, Cassiano Peixoto wrote:
> > Hi Andriy,
> >
> > I've just tried copying my zfsloader from 11.2-STABLE (R350026) to FreeBSD
> > 12.1 and 12.2 (STABLE) and fixed the issue.
> >
> > I also tried to use zfsloader of 11.3 but didn't work and the same issue
> > happened.
> >
> > So it seems that something has changed on zfsloader after 11.2 that brings
> > this issue.
> >
> > My question is: Should it be expected or is it a bug to be fixed?
> >
>
> In my opinion it's a bug.
> zfsloader should not require that disks must be partitioned.
>
+1
That's why I have terribly outdated 13-CURRENT on bunch of servers and can't
update them.
Most of them look like this:
[tiger@st25]:~>zpool status
pool: st25
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
st25 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
ada4 ONLINE 0 0 0
ada5 ONLINE 0 0 0
mirror-3 ONLINE 0 0 0
ada6 ONLINE 0 0 0
ada7 ONLINE 0 0 0
errors: No known data errors
They haven't separate boot device and have from 7 to 30+ Tb of data that I
can't backup anywhere for re-install server with disk partitioning. Some time
ago I managed to get aroud this reverting 2 commits ( r342151 + don't
remember revision) but then there where some other improvements after which I
lost the opportunity to revert this commits
--
wbr, Sergey
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?175511429f5.ff83169625753.7800820802617382912>
