[Bug 297253] net-p2p/c-lightning 26.06.1 (and 25.12.1_2). Last good: 25.09.

[email protected] Mon, 03 Aug 2026 23:49:36 +0000
Newsgroups gmane.os.freebsd.devel.ports.bugs
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D297253

            Bug ID: 297253
           Summary: net-p2p/c-lightning 26.06.1 (and 25.12.1_2). Last
                    good: 25.09.
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: [email protected]
          Reporter: [email protected]
          Assignee: [email protected]
             Flags: maintainer-feedback?([email protected])
                CC:

Summary:

net-p2p/c-lightning 26.06.1 (and 25.12.1_2) build and install cleanly but f=
ail
to start: lightning_hsmd aborts with FATAL SIGNAL 6 the moment it is spawned
with its message fd, and lightningd exits with HSM sent unknown message typ=
e.
This reproduces on a brand-new node (freshly generated hsm_secret, empty
database, regtest, no bitcoind) so it is not related to any user data, wall=
et
state, or migration. The last working version is 25.09, which runs on the
identical host and jail; downgrading to it immediately restores service.

Environment:

- Host: FreeBSD 15.1-RELEASE-p1, amd64 (kernel/userland/running all -p1), r=
oot
on ZFS
- Container: BastilleBSD thin jail, base 15.1-RELEASE
- Hardware: Zimablade (Intel N-series CPU)
- Good pkg: c-lightning-25.09 (pinned via pkg lock)
- Failing pkgs: c-lightning-25.12.1_2, c-lightning-26.06.1 (default
quarterly/latest repo)

Reproduction (from scratch =E2=80=94 no user data):

bastille create clntest 15.1-RELEASE 10.17.89.9 bastille0
bastille cmd clntest pkg install -y c-lightning          # 26.06.1
bastille cmd clntest mkdir -p /tmp/clntest
bastille cmd clntest chown c-lightning:c-lightning /tmp/clntest
bastille cmd clntest su -m c-lightning -c \
  'lightningd --network=3Dregtest --lightning-dir=3D/tmp/clntest --log-leve=
l=3Ddebug'

Observed:

INFO    lightningd: v26.06.1
... (all bundled plugins start OK) ...
DEBUG   lightningd: testing /usr/local/.../lightning_hsmd     <- hsmd SELF-=
TEST
PASSES
DEBUG   hsmd: pid 8522, msgfd 70                              <- real spawn=
 w/
message fd
lightning_hsmd: FATAL SIGNAL 6 (version v26.06.1)             <- aborts
immediately
0x...  _thr_kill
0x...  __raise
0x...  abort
... (rest of backtrace is address-only; hsmd binary is stripped) ...
lightningd: HSM sent unknown message type
/usr/local/etc/rc.d/lightningd: WARNING: failed to start lightningd


The abort precedes any Bitcoin-backend connection, so it is independent of
network/RPC/Tor config. On our production node, downgrading (pkg install -f
c-lightning-25.09) starts normally with the same node id and channels; the
wallet DB is never migrated because the abort happens before the DB is open=
ed.

Analysis:

HSM sent unknown message type means lightningd received a wire message from
hsmd it could not parse. Notably the lightning_hsmd self-test succeeds but =
the
real subdaemon aborts as soon as it is handed its message fd and processes =
the
first hsm_init message. That points at the hsmd message/fd-handling path (a
wire/ABI or fd-passing mismatch) introduced somewhere in the 25.09 =E2=86=
=92 25.12
window and still present in 26.06.1 =E2=80=94 not data corruption, config, =
or
environment (a fresh jail fails too).

Binary / crash details:

lightning_hsmd is stripped, so CLN's own crash handler prints the only
backtrace available (address-only). The frame offsets are stable and identi=
cal
across every run (production upgrade and the clean clntest jail), so they c=
an
be resolved with addr2line against the official package binary:

lightning_hsmd offsets (in-binary): 0x374a24 0x35d927 0x395193 0x39508c
0x3968ca 0x35d026

file:  ELF 64-bit LSB executable, x86-64, FreeBSD 15.0 (1500068), dynamical=
ly
linked, stripped
ldd:   libm.so.5, libsqlite3.so.0, libsodium.so.26, libz.so.6, libgcc_s.so.=
1,
       libc.so.7, libthr.so.3, libsys.so.7

No core is produced (CLN's signal handler prints its backtrace and exits).
Happy to provide a full debug log, or to build the port with debug symbols /
run under a debugger if a symbolized backtrace would help.

Requests:
- Can the maintainer reproduce a fresh-node (regtest) start of 26.06.1 on 1=
5.1?
- A build of hsmd with debug symbols would let us pin the exact abort site =
=E2=80=94
happy to run it.
- Can provide pkg info -D c-lightning, ldd of lightning_hsmd, full debug lo=
g,
and a symbolized backtrace on request.

--=20
You are receiving this mail because:
You are the assignee for the bug.=