From nobody Sun Dec 28 19:16:20 2025 X-Original-To: freebsd-current@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 4dfTc24x0Bz6MDQK for ; Sun, 28 Dec 2025 19:16:34 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 4dfTc22fBzz3pDR for ; Sun, 28 Dec 2025 19:16:34 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-64b9cb94ff5so10025109a12.2 for ; Sun, 28 Dec 2025 11:16:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766949393; x=1767554193; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+ysEYxJd/zIFtLNou4ofqIuPSGmb6nP8RBKLPoE46BY=; b=Z+6VLHhc//eYmhz61KRABjcFJpW2xPWdKp5/PWdy3RhB1koKLUvV5aVt0O/0Fppf0g 5wB1PmFO6Lc06AhEC0FuzKbiXKDMlRoL+JntTzya0Qugkb0kVxVMwmOXFvjKa8VoL3RT FGTD3tWOro+afuc9ddcXub7ypnn2etyyqdfjPrcS2B0Lv2X/zRBTB4h94l0JNr9mkfLd AImdVMAAlEsfDq+fPMsfKk2RnRFWPCnxIeJmbHXHNPD9mZdEDKUyjFlVrGMPEG0Vj8nh EfMTQgxFZD2qSL8u1p07JGAGU2c6jL0GxGX1Wi2uTuTlb+7LIxr6dQnHM/IaBxgT5/DG Kx2g== X-Forwarded-Encrypted: i=1; AJvYcCXYCBRRB9MAQ9z/3cNBkkl0dzIFUl4wpNm/MdFW/jIicDGPIdpZYEd3ryNhuNBifx8Zn3xC8s+Coyi3InNEE+0=@freebsd.org X-Gm-Message-State: AOJu0Ywzcj5AlMvqKEbmsxW1yM5ssOsKefWjEc96ZAXgNmGuON707Xzx zXzBgr5d7XXDFSKUH7T3kc11Naxm+RePRWUSuzomctO18ACC4CeYo04MMZqgn02m0x/i4XDB1OQ eV3F6Z31I+e4QCPu9vVeTbrLzR1sD+qg= X-Gm-Gg: AY/fxX7hpxEWxpPDbfZpIgX5CU3zmT0BMH2oOGgu2xJwIUnRwtpUU+Fakw9yIV+fWNt uIkaVIUqy73gG9C1sFhY62OUGzGO0N4stcndOYuZAyRhyHVnMMN0Bb78xs01MyJEljZX+o12lq7 ApWZIyVmtykYkuT0Ks6A7NyaxLTYBtUeAIL6PYhQdhTZQO9Q0IbYMn7yk0RnQqk8UBZGzoLz1Us 6x9Yy5n5+LS0OpMGznmMdUMtgtGW2nUMjnUSZoWXf7JuwJQO+rxv/Nwq47zrYeukIm2Ypt9OJ+6 qEnWXg== X-Google-Smtp-Source: AGHT+IFBF4zhvK+jYS+CGoeg4qPr2YBHRrCZQfo3jfdKrvym6K7ZLXNrrh8QZTAuT55k4qksfZSowQjg0gQkOc9NqCs= X-Received: by 2002:a05:6402:354b:b0:64b:7795:a6e3 with SMTP id 4fb4d7f45d1cf-64b8eeea6b7mr25509071a12.32.1766949392362; Sun, 28 Dec 2025 11:16:32 -0800 (PST) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 References: <1B16024B-5AEC-4F75-BAC5-C6936208082F@yahoo.com> In-Reply-To: From: Alan Somers Date: Sun, 28 Dec 2025 12:16:20 -0700 X-Gm-Features: AQt7F2r5uwHuh_nl0TqekSU_A19NDuThzd12239_0HFiyrVe212dORD7B2HorLQ Message-ID: Subject: Re: armv7 main's gpart [show]: signal 11 core dump during boot, before login; xo_format_string_direct; official pkgbase distribution (kernel and world) To: Mark Millard Cc: js@freebsd.org, FreeBSD Current , freebsd-arm Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dfTc22fBzz3pDR The output of "kern.geom.confxml" would also be useful. Also, I suggest that we move this discussion into Bugzilla. On Sun, Dec 28, 2025 at 11:33=E2=80=AFAM Mark Millard w= rote: > > On Dec 28, 2025, at 08:54, Mark Millard wrote: > > > [Resend including freebsd-arm.] > > > > On Dec 28, 2025, at 08:48, Mark Millard wrote: > > > > js@freebsd.org wrote on > > Date: Sun, 28 Dec 2025 11:01:59 UTC : > > > >> I'll take a look at it and try to setup a reproducer, unfortunately my > >> time is a bit limited during the holidays so I can't promise any quick > >> fixes right now. > >> > >> Could you share the output of > >> > >> gpart --libxo:JP show > >> > >> with me? If possible. > > > > On the Orange Pi Plus 2e (Cortex-A7, not aarch64, > > just armv7): > > > > # gpart --libxo:JP show > > Segmentation fault (core dumped) > > > > I'll note that the 0x6e480000 in r0 that is shown > > later below is the same failing address reported > > in my original list submittal about the issue. > > > > > > For reference: > > > > (gdb) bt > > #0 strlen () at /usr/src/lib/libc/arm/string/strlen.S:46 > > #1 0x20151020 in xo_format_string (xop=3D0x2009b120, xbp=3D0x2009b150,= flags=3D4096, xfp=3D0xbfbfd1f8) at /usr/src/contrib/libxo/libxo/libxo.c:29= 66 > > #2 xo_do_format_field (xop=3D, xop@entry=3D0x2009b120, = xbp=3D0x2009b150, fmt=3Dfmt@entry=3D0xbfbfd268 "%s", flen=3D= , flags=3D4096) at /usr/src/contrib/libxo/libxo/libxo.c:3503 > > #3 0x2014d0a8 in xo_simple_field (xop=3D0x2009b120, encode_only=3D0, v= alue=3D0x0, vlen=3D0, fmt=3D0xbfbfd268 "%s", flen=3D2, flags=3D4096) at /us= r/src/contrib/libxo/libxo/libxo.c:3817 > > #4 xo_format_value (xop=3D, xop@entry=3D0x2009b120, nam= e=3Dname@entry=3D0x204bf931 "state}\n", nlen=3Dnlen@entry=3D5, value=3D0x0,= vlen=3D0, fmt=3D0xbfbfd268 "%s", flen=3D2, encoding=3D0x0, elen=3D0, > > flags=3D4096) at /usr/src/contrib/libxo/libxo/libxo.c:4535 > > #5 0x20148710 in xo_do_emit_fields (xop=3D, xop@entry= =3D0x2009b120, fields=3D, fields@entry=3D0xbfbfd768, max_fie= lds=3Dmax_fields@entry=3D17, fmt=3D) > > at /usr/src/contrib/libxo/libxo/libxo.c:6372 > > #6 0x201476a0 in xo_do_emit (xop=3Dxop@entry=3D0x2009b120, flags=3D, fmt=3Dfmt@entry=3D0x204bf8e3 "=3D>{t:start/%*jd} {t:sectors/= %*jd} {t:name/%*s} {:scheme} ({h:size/%ld}){t:state}\n") > > at /usr/src/contrib/libxo/libxo/libxo.c:6551 > > #7 0x20147840 in xo_emit (fmt=3D0x204bf8e3 "=3D>{t:start/%*jd} {t:sec= tors/%*jd} {t:name/%*s} {:scheme} ({h:size/%ld}){t:state}\n") at /usr/sr= c/contrib/libxo/libxo/libxo.c:6622 > > #8 0x204d1fd4 in gpart_show_geom (gp=3Dgp@entry=3D0x20089168, element= =3Delement@entry=3D0x204bfe51 "type", show_providers=3Dshow_providers@entry= =3D0) at /usr/src/lib/geom/part/geom_part.c:654 > > #9 0x204d1048 in gpart_show (req=3D0x20089000, fl=3D) a= t /usr/src/lib/geom/part/geom_part.c:793 > > #10 0x000230dc in run_command (argc=3D0, argv=3D) at /us= r/src/sbin/geom/core/geom.c:497 > > #11 0x00022308 in main (argc=3D1, argv=3D0xbfbfed10) at /usr/src/sbin/g= eom/core/geom.c:861 > > (gdb) list > > . . . > > > > I'll note that the details are different, but I get failures > in an armv7 chroot on aarch64 that supports armv7 code. So > that is another type of environment that might be of use based > on pkgbase distribution materials. > > Your --libxo:JP command in that context gets some output > before also getting a segmentation fault: > > # gpart --libxo:JP show > { > "__version": "1", > "PART": [ > { > "start": 34, > "sectors": 1000215149, > "name": "nda0", > "scheme": "GPT", > "size": 2, > "state": "(null)", > "partitions": [ > { > "start": 34, > "sectors": 2014, > "free": true, > "size": 2 > }, > { > "start": 2048, > "sectors": 532480, > "index": 1, > "name": "nda0p1", > "type": "efi", > "label": "EFI system partition", > "rawtype": "c12a7328-f81f-11d2-ba4b-00a0c93ec93b", > "size": 541854500 > }, > { > "start": 534528, > "sectors": 32768, > "index": 2, > "name": "nda0p2", > "type": "ms-reserved", > "label": "Microsoft reserved partition", > "rawtype": "e3c9e316-0b5c-4db8-817d-f92df00215ae", > "size": 541854500 > }, > { > "start": 567296, > "sectors": 997287936, > "index": 3, > "name": "nda0p3", > "type": "ms-basic-data", > "label": "Basic data partition", > "rawtype": "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7", > "size": 541854500 > }, > { > "start": 997855232, > "sectors": 2359296, > "index": 4, > "name": "nda0p4", > "type": "ms-recovery", > "label": "(null)", > "rawtype": "de94bba4-06d1-4d40-a16a-bfd50179d6ac", > "size": 541854500 > }, > { > "start": 1000214528, > "sectors": 655, > "free": true, > "size": 2 > } > ] > }, > { > "start": 34, > "sectors": 2930277101, > "name": "da0", > "scheme": "GPT", > "size": 0, > "state": "(null)", > "partitions": [ > { > "start": 34, > "sectors": 32734, > "free": true, > "size": 0 > }, > { > "start": 32768, > "sectors": 501760, > "index": 1, > "name": "da0p1", > "type": "efi", > "label": "PBaseEFI", > "rawtype": "c12a7328-f81f-11d2-ba4b-00a0c93ec93b", > "size": 541854500 > }, > { > "start": 534528, > "sectors": 20971520, > "index": 2, > "name": "da0p2", > "type": "freebsd-swap", > "label": "PBaseSwp10", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > "size": 541854500 > }, > { > "start": 21506048, > "sectors": 29360128, > "index": 3, > "name": "da0p3", > "type": "freebsd-swap", > "label": "PBaseSwp14", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > "size": 541854500 > }, > { > "start": 50866176, > "sectors": 33554432, > "index": 4, > "name": "da0p4", > "type": "freebsd-swap", > "label": "PBaseSwp16", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > "size": 541854500 > }, > "type": "freebsd-swap", > "label": "PBaseSwp32", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > "size": 541854500 > }, > { > "start": 151529472, > "sectors": 96468992, > "index": 6, > "name": "da0p6", > "type": "freebsd-swap", > "label": "PBaseSwp46", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > "size": 541854500 > }, > { > "start": 247998464, > "sectors": 268435456, > "index": 7, > "name": "da0p7", > "type": "freebsd-swap", > "label": "PBaseSwp128", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > "size": 541854500 > }, > { > "start": 516433920, > "sectors": 7340032, > "index": 8, > "name": "da0p8", > "type": "freebsd-swap", > "label": "PBaseSwp3p5", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > "size": 541854500 > }, > { > "start": 523773952, > "sectors": 13096960, > "free": true, > "size": 0 > }, > { > "start": 536870912, > "sectors": 2357198848, > "index": 9, > "name": "da0p9", > "type": "freebsd-ufs", > "label": "PBaseUFS", > "rawtype": "516e7cb6-6ecf-11d6-8ff8-00022d09712b", > "size": 541854500 > }, > { > "start": 2894069760, > "sectors": 36207375, > "free": true, > "size": 0 > } > ] > }Segmentation fault (core dumped) > > # gpart show > =3D> 34 1000215149 nda0 GPT (2)(null) > 34 2014 - free - (2) > 2048 532480 1 efi (517M) > 534528 32768 2 ms-reserved (517M) > 567296 997287936 3 ms-basic-data (517M) > 997855232 2359296 4 ms-recovery (517M) > 1000214528 655 - free - (2) > > =3D> 34 2930277101 da0 GPT (0)(null) > 34 32734 - free - (0) > 32768 501760 1 efi (517M) > 534528 20971520 2 freebsd-swap (517M) > 21506048 29360128 3 freebsd-swap (517M) > 50866176 33554432 4 freebsd-swap (517M) > 84420608 67108864 5 freebsd-swap (517M) > 151529472 96468992 6 freebsd-swap (517M) > 247998464 268435456 7 freebsd-swap (517M) > 516433920 7340032 8 freebsd-swap (517M) > 523773952 13096960 - free - (0) > 536870912 2357198848 9 freebsd-ufs (517M) > 2894069760 36207375 - free - (0) > > Segmentation fault (core dumped) > > From an aarch64 context instead pf the armv7 chroot: > > # gpart show > you have mail > =3D> 34 1000215149 nda0 GPT (477G) > 34 2014 - free - (1007K) > 2048 532480 1 efi (260M) > 534528 32768 2 ms-reserved (16M) > 567296 997287936 3 ms-basic-data (476G) > 997855232 2359296 4 ms-recovery (1G) > 1000214528 655 - free - (328K) > > =3D> 34 2930277101 da0 GPT (1T) > 34 32734 - free - (16M) > 32768 501760 1 efi (245M) > 534528 20971520 2 freebsd-swap (10G) > 21506048 29360128 3 freebsd-swap (14G) > 50866176 33554432 4 freebsd-swap (16G) > 84420608 67108864 5 freebsd-swap (32G) > 151529472 96468992 6 freebsd-swap (46G) > 247998464 268435456 7 freebsd-swap (128G) > 516433920 7340032 8 freebsd-swap (4G) > 523773952 13096960 - free - (6G) > 536870912 2357198848 9 freebsd-ufs (1T) > 2894069760 36207375 - free - (17G) > > Here is a "diff -u" of the libxo:JP outputs: > > # diff -u gpart_show_armv7_failure_libxo_jp.txt gpart_show_aarch64_good_l= ibxo_jp.txt > --- gpart_show_armv7_failure_libxo_jp.txt 2025-12-28 10:27:57.98555= 8000 -0800 > +++ gpart_show_aarch64_good_libxo_jp.txt 2025-12-28 10:28:41.45696= 8000 -0800 > @@ -7,14 +7,14 @@ > "sectors": 1000215149, > "name": "nda0", > "scheme": "GPT", > - "size": 2, > - "state": "(null)", > + "size": 512110190592, > + "state": "", > "partitions": [ > { > "start": 34, > "sectors": 2014, > "free": true, > - "size": 2 > + "size": 1031168 > }, > { > "start": 2048, > @@ -24,7 +24,7 @@ > "type": "efi", > "label": "EFI system partition", > "rawtype": "c12a7328-f81f-11d2-ba4b-00a0c93ec93b", > - "size": 541854500 > + "size": 272629760 > }, > { > "start": 534528, > @@ -34,7 +34,7 @@ > "type": "ms-reserved", > "label": "Microsoft reserved partition", > "rawtype": "e3c9e316-0b5c-4db8-817d-f92df00215ae", > - "size": 541854500 > + "size": 16777216 > }, > { > "start": 567296, > @@ -44,7 +44,7 @@ > "type": "ms-basic-data", > "label": "Basic data partition", > "rawtype": "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7", > - "size": 541854500 > + "size": 510611423232 > }, > { > "start": 997855232, > @@ -54,13 +54,13 @@ > "type": "ms-recovery", > "label": "(null)", > "rawtype": "de94bba4-06d1-4d40-a16a-bfd50179d6ac", > - "size": 541854500 > + "size": 1207959552 > }, > { > "start": 1000214528, > "sectors": 655, > "free": true, > - "size": 2 > + "size": 335360 > } > ] > }, > @@ -69,14 +69,14 @@ > "sectors": 2930277101, > "name": "da0", > "scheme": "GPT", > - "size": 0, > - "state": "(null)", > + "size": 1500301910016, > + "state": "", > "partitions": [ > { > "start": 34, > "sectors": 32734, > "free": true, > - "size": 0 > + "size": 16759808 > }, > { > "start": 32768, > @@ -86,7 +86,7 @@ > "type": "efi", > "label": "PBaseEFI", > "rawtype": "c12a7328-f81f-11d2-ba4b-00a0c93ec93b", > - "size": 541854500 > + "size": 256901120 > }, > { > "start": 534528, > @@ -96,7 +96,7 @@ > "type": "freebsd-swap", > "label": "PBaseSwp10", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > - "size": 541854500 > + "size": 10737418240 > }, > { > "start": 21506048, > @@ -106,7 +106,7 @@ > "type": "freebsd-swap", > "label": "PBaseSwp14", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > - "size": 541854500 > + "size": 15032385536 > }, > { > "start": 50866176, > @@ -116,12 +116,17 @@ > "type": "freebsd-swap", > "label": "PBaseSwp16", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > - "size": 541854500 > + "size": 17179869184 > }, > + { > + "start": 84420608, > + "sectors": 67108864, > - "size": 541854500 > + "size": 34359738368 > }, > { > "start": 151529472, > @@ -131,7 +136,7 @@ > "type": "freebsd-swap", > "label": "PBaseSwp46", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > - "size": 541854500 > + "size": 49392123904 > }, > { > "start": 247998464, > @@ -141,7 +146,7 @@ > "type": "freebsd-swap", > "label": "PBaseSwp128", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > - "size": 541854500 > + "size": 137438953472 > }, > { > "start": 516433920, > @@ -151,13 +156,13 @@ > "type": "freebsd-swap", > "label": "PBaseSwp3p5", > "rawtype": "516e7cb5-6ecf-11d6-8ff8-00022d09712b", > - "size": 541854500 > + "size": 3758096384 > }, > { > "start": 523773952, > "sectors": 13096960, > "free": true, > - "size": 0 > + "size": 6705643520 > }, > { > "start": 536870912, > @@ -167,13 +172,16 @@ > "type": "freebsd-ufs", > "label": "PBaseUFS", > "rawtype": "516e7cb6-6ecf-11d6-8ff8-00022d09712b", > - "size": 541854500 > + "size": 1206885810176 > }, > { > "start": 2894069760, > "sectors": 36207375, > "free": true, > - "size": 0 > + "size": 18538176000 > } > ] > - }Segmentation fault (core dumped) > + } > + ] > +} > + > > > > > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > >