pkg upgrade segfaults on 15-STABLE

From: Ricardo Branco <rbranco_at_suse.com>
Date: Sat, 08 Nov 2025 13:07:26 UTC
$ pkg --version
2.3.1

# pkg upgrade
...
[1/7] Upgrading FreeBSD-utilities from 15.snap20251105170707 to
15.snap20251107233400...
[1/7] Extracting FreeBSD-utilities-15.snap20251107233400:   0%Child process
pid=51001 terminated abnormally: Segmentation fault

I then tried with pkg-static and got the same error.

# gdb /usr/local/sbin/pkg-static pkg-static.core
Reading symbols from /usr/local/sbin/pkg-static...
[New LWP 101133]
Core was generated by `pkg-static upgrade'.
Program terminated with signal SIGSEGV, Segmentation fault.
Address not mapped to object.
#0  strcmp_baseline () at /usr/src/lib/libc/amd64/string/strcmp.S:136
136 movdqu (%rsi, %rdx, 1), %xmm4
(gdb) bt full
#0  strcmp_baseline () at /usr/src/lib/libc/amd64/string/strcmp.S:136
No locals.
#1  0x00000000006bc5cc in create_regfile ()
No symbol table info available.
#2  0x00000000006be317 in do_extract_regfile ()
No symbol table info available.
#3  0x00000000006bd870 in do_extract ()
No symbol table info available.
#4  0x00000000006ba771 in pkg_add_common ()
No symbol table info available.
#5  0x000000000070cf40 in pkg_jobs_execute ()
No symbol table info available.
#6  0x00000000005092e2 in exec_upgrade ()
No symbol table info available.
#7  0x0000000000501bef in main ()
No symbol table info available.

I compiled and installed the latest pkg from ports (2.4.2) and could
upgrade but got:

[1/2] Upgrading FreeBSD-runtime from 15.snap20251105215539 to
15.snap20251106170756...
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   6%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   7%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   7%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   7%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   7%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   7%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   8%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   8%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   8%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   8%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   8%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   8%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   9%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   9%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:   9%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  10%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  10%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  10%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  10%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  10%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  10%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  11%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  11%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  11%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  11%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  11%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  11%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  12%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  12%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  12%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  12%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  12%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  13%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  16%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  16%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  16%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756:  89%
pkg: 3way merge: no checksum for the original local file
[1/2] Extracting FreeBSD-runtime-15.snap20251106170756: 100%
[2/2] Upgrading FreeBSD-utilities from 15.snap20251105170707 to
15.snap20251107233400...
[2/2] Extracting FreeBSD-utilities-15.snap20251107233400:   0%
pkg: 3way merge: no checksum for the original local file
[2/2] Extracting FreeBSD-utilities-15.snap20251107233400:   0%
pkg: 3way merge: no checksum for the original local file
[2/2] Extracting FreeBSD-utilities-15.snap20251107233400:   0%
pkg: 3way merge: no checksum for the original local file
[2/2] Extracting FreeBSD-utilities-15.snap20251107233400:   0%
pkg: 3way merge: no checksum for the original local file
[2/2] Extracting FreeBSD-utilities-15.snap20251107233400:   0%
pkg: 3way merge: no checksum for the original local file
[2/2] Extracting FreeBSD-utilities-15.snap20251107233400:   0%
pkg: 3way merge: no checksum for the original local file
[2/2] Extracting FreeBSD-utilities-15.snap20251107233400:   0%
pkg: 3way merge: no checksum for the original local file
[2/2] Extracting FreeBSD-utilities-15.snap20251107233400: 100%

Cheers,
Ricardo