From nobody Sun Jan 05 05:33:04 2025 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 4YQmDv4ffdz5kN6L for ; Sun, 05 Jan 2025 05:33:19 +0000 (UTC) (envelope-from chris.torek@gmail.com) Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YQmDv2YyCz449c; Sun, 5 Jan 2025 05:33:19 +0000 (UTC) (envelope-from chris.torek@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-3011c7b39c7so158976461fa.1; Sat, 04 Jan 2025 21:33:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1736055196; x=1736659996; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=wGP5Pm+vpQxpH+RQ5CrMkv5pcpM3rwDApcJTMVHxRAw=; b=lQG9/4ZSRztX2VTzPwprmooOEHR5sbIVc/nSYw69mFl48YJY9+EPz7H1y9Wnd69KIl pucxSjK8lnkwjJTrzIdbnhQCEF2Dm35A+7cDpd9bbDGef025rfSDOiA+Rppnj9zpOjPb caysABObNCjEKuP/9dWg3HlVhmzJjKb4hOJgS85ztxliQ89vdxM8/9gGLLeoLO+boHB/ dxhzlKjs84+BFQ50LGclTLIZQwaACp4mymMbsJ/dMvOIR1qKbvBuOS6ZlX4NPQvBqCuO EsBOBIkJ9SjS7e1qZ1FTlRFfc8erTrR9hGOVM37fCU9XpiXY500lSw/atWHNzzx7umrk M3dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736055196; x=1736659996; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wGP5Pm+vpQxpH+RQ5CrMkv5pcpM3rwDApcJTMVHxRAw=; b=oMu9t3UaYlrCv4G5aoufthsSlc1JeDU5yCeJRCB55Ab48t7j19nut/tpISRShc51VH gdLWmWeKvWy3qWiaoCQcimM6qxcAFJ2CpCL11IIEf8FBwbU9SFTymI4OWvjSkpr5jkNN iEK7OL+OD4cXiaIAY6DfXMwX0kAwUwNKW6f0ES8FWYHenF87OODINn+seRiHOn8patNT TyqgkccDI/pMt1/4jZZOn1t7kNCLj72LXzWJFQYTx957OpGNZo2G+8qSC7aeKGENY8oY C3s3Ol28qyKMBKXRTyOogXIjmFE4sCs7EGDMARkuGJfELuoLGPoEnjC7Ozf17eNdSgbj Xihw== X-Forwarded-Encrypted: i=1; AJvYcCX1LawtDJsOrKHyek5cb528T26saNv8YxIFD7Mk4W/LZ9z3Dic2ab5rFbLAV0Z61ZaE7dF/Ebk9+fkyy5JXHf0=@freebsd.org X-Gm-Message-State: AOJu0YyzScb087cGi9aLEQLChd0OY9AWencnXYXdeFSqCxisjC7Tj1Os lJv/hNcJWhhDo4lrdtcU+PUtUsSi29de951nNxXZMDRk+GPNMLj/rvqhe6bb8qCbgd3tih4JkzV yWOFvQBfvlh9wNlNZ6/AxBjnzsnwKFeK4 X-Gm-Gg: ASbGncucTIvnLoTUb8/RhlvGUw12cKCpD6eMkfWQBB+ctYi3iXgq20bGIhCRXUT4deX hWc+NJDOW7i0xlJKMKmuEoUCm4RR3bpEy0Ddie5Q= X-Google-Smtp-Source: AGHT+IGFTtxpCISGEEYdBtUKpQPadsOH2dAHdtbIQRNzWgqTTl7X7EguIAvt4DnJOVaSOU4bHdAeioJ2iwzIZJlpmuY= X-Received: by 2002:a05:6512:3f0c:b0:540:2223:9b0b with SMTP id 2adb3069b0e04-54229561953mr20236483e87.35.1736055196103; Sat, 04 Jan 2025 21:33:16 -0800 (PST) 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 References: <9e71d8eb-74c3-4bcb-89b1-90d4f9746168@quip.cz> <33db3282-25c4-42fb-8d97-1918d52fa9e2@denninger.net> <4094b79b-c54a-4953-b693-1b4e8387cf9f@freebsd.org> <87928610-fcad-400e-b7b3-076c6d3f1200@freebsd.org> <12dcc55d-67ae-467b-9249-3d60047d05f0@denninger.net> <04794cad-eda5-4ab8-ae29-4cc4d53ac033@freebsd.org> In-Reply-To: <04794cad-eda5-4ab8-ae29-4cc4d53ac033@freebsd.org> From: Chris Torek Date: Sat, 4 Jan 2025 21:33:04 -0800 Message-ID: Subject: Re: curious crashes when under memory pressure To: Craig Leres Cc: Karl Denninger , freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4YQmDv2YyCz449c X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] On Sat, Jan 4, 2025 at 2:04=E2=80=AFPM Craig Leres wrot= e: > Chris said he was "swapping to a zfs mirror" but I'm swapping to a gmirro= r. I thought I was, but now I'm not sure any more :-) (I set this up many months ago). Poking around, it looks like I have a three way geom mirror (why 3? I have no idea, well, some vague idea, but, well...). I have `/dev/mirror/swap` as the swapon device in `/etc/fstab`, and `gmirror list` says: Geom name: swap State: COMPLETE Components: 3 Balance: load Slice: 4096 Flags: NONE GenID: 0 SyncID: 1 ID: 777312945 Type: AUTOMATIC Providers: 1. Name: mirror/swap Mediasize: 137438952960 (128G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e0 Consumers: 1. Name: ada2p3 Mediasize: 137438953472 (128G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e1 State: ACTIVE Priority: 2 Flags: NONE GenID: 0 SyncID: 1 ID: 466179938 [repeat for ada1p3 and ada0p3 but with priorities counting down to 0 and with different IDs.] So I guess I'm swapping to a geom mirror. I suspect it has three drives in it because I was originally thinking I had to swap to a zfs vdev mirror. You can stop here, but if not: MORE DETAILS I originally put four drives in the machine (3 8TB + 1 old 2 TB), and only three were working (ada0 through 2), so I set up a three-way zfs file system on it. The fourth one worked on Linux but not on FreeBSD. Eventually I moved it to a different channel and it started working fine and I still don't know what that's all about, though there were several kernel updates along the way (patch releases of FreeBSD 14) as well. At some point I discovered you can't crash-dump to a mirror, so I set up a 64 GB partition on ada3 and made it the dump device. It might not be working, I haven't forcibly tested it yet. Worse, `gpart show -l` shows it as `swap2`, a duplicate of ada2's `swap2` except half the size (??). It shows up fine as /dev/label/crash though. `geom swap list -a` says: Geom name: swap Consumers: 1. Name: mirror/swap Mediasize: 137438952960 (128G) Sectorsize: 512 Stripesize: 4096 Stripeoffset: 0 Mode: r1w1e0 Strippng `geom -t` output a bit (egrep disk\|swap): ada3p2 LABEL gpt/swap2 gpt/swap2 DEV swap MIRROR mirror/swap mirror/swap DEV swap SWAP swap MIRROR mirror/swap mirror/swap DEV swap SWAP swap MIRROR mirror/swap mirror/swap DEV swap SWAP swap.sync MIRROR Here's `gpart show -p | grep swap`: 2048 134217728 ada3p2 freebsd-swap (64G) 534528 268435456 ada2p3 freebsd-swap (128G) 534528 268435456 ada1p3 freebsd-swap (128G) 534528 268435456 ada0p3 freebsd-swap (128G) and `gpart show -l | grep swap`: 2048 134217728 2 swap2 (64G) 534528 268435456 3 swap2 (128G) 534528 268435456 3 swap1 (128G) 534528 268435456 3 swap0 (128G) I went straight from an original FreeBSD 9 setup with an ancient MBR (persisting unchanged through several upgrades) to FreeBSD 14 (now 15) at home, so I get a bit lost between gpart, geom, and zfs/zpool differences at times. Chris