On Dec 28, 2025, at 08:54, Mark Millard <[email protected]> wrote:

> [Resend including freebsd-arm.]
> 
> On Dec 28, 2025, at 08:48, Mark Millard <[email protected]> wrote:
> 
> [email protected] <js_at_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=0x2009b120, xbp=0x2009b150, 
> flags=4096, xfp=0xbfbfd1f8) at /usr/src/contrib/libxo/libxo/libxo.c:2966
> #2  xo_do_format_field (xop=<optimized out>, xop@entry=0x2009b120, 
> xbp=0x2009b150, fmt=fmt@entry=0xbfbfd268 "%s", flen=<optimized out>, 
> flags=4096) at /usr/src/contrib/libxo/libxo/libxo.c:3503
> #3  0x2014d0a8 in xo_simple_field (xop=0x2009b120, encode_only=0, value=0x0, 
> vlen=0, fmt=0xbfbfd268 "%s", flen=2, flags=4096) at 
> /usr/src/contrib/libxo/libxo/libxo.c:3817
> #4  xo_format_value (xop=<optimized out>, xop@entry=0x2009b120, 
> name=name@entry=0x204bf931 "state}\n", nlen=nlen@entry=5, value=0x0, vlen=0, 
> fmt=0xbfbfd268 "%s", flen=2, encoding=0x0, elen=0, 
>   flags=4096) at /usr/src/contrib/libxo/libxo/libxo.c:4535
> #5  0x20148710 in xo_do_emit_fields (xop=<optimized out>, 
> xop@entry=0x2009b120, fields=<optimized out>, fields@entry=0xbfbfd768, 
> max_fields=max_fields@entry=17, fmt=<optimized out>)
>   at /usr/src/contrib/libxo/libxo/libxo.c:6372
> #6  0x201476a0 in xo_do_emit (xop=xop@entry=0x2009b120, flags=<optimized 
> out>, fmt=fmt@entry=0x204bf8e3 "=>{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=0x204bf8e3 "=>{t:start/%*jd}  {t:sectors/%*jd} 
>  {t:name/%*s}  {:scheme}  ({h:size/%ld}){t:state}\n") at 
> /usr/src/contrib/libxo/libxo/libxo.c:6622
> #8  0x204d1fd4 in gpart_show_geom (gp=gp@entry=0x20089168, 
> element=element@entry=0x204bfe51 "type", 
> show_providers=show_providers@entry=0) at 
> /usr/src/lib/geom/part/geom_part.c:654
> #9  0x204d1048 in gpart_show (req=0x20089000, fl=<optimized out>) at 
> /usr/src/lib/geom/part/geom_part.c:793
> #10 0x000230dc in run_command (argc=0, argv=<optimized out>) at 
> /usr/src/sbin/geom/core/geom.c:497
> #11 0x00022308 in main (argc=1, argv=0xbfbfed10) at 
> /usr/src/sbin/geom/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
=>        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)

=>        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
=>        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)

=>        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_libxo_jp.txt
--- gpart_show_armv7_failure_libxo_jp.txt       2025-12-28 10:27:57.985558000 
-0800
+++ gpart_show_aarch64_good_libxo_jp.txt        2025-12-28 10:28:41.456968000 
-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)
+    }
+  ]
+}
+




===
Mark Millard
marklmi at yahoo.com


Reply via email to