https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292322

Martin Vidovic <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Martin Vidovic <[email protected]> ---
I've hit this exact problem when setting up HAST on FreeBSD 15.0 and decided to
investigate, here is the summary:

The timeout on the secondary node ("Unable to receive header") was traced to
the parent/worker connection migration path in hastd (on primary) rather than
the replication protocol itself.

The connection migration code transfers a protocol name and a connected socket
descriptor over a local AF_UNIX socketpair. The protocol name is sent using
send(2), while the descriptor is sent separately using sendmsg(2) with
SCM_RIGHTS.

The receive side calls recv(2) with a buffer sized for the maximum protocol
name length and uses MSG_WAITALL. On FreeBSD 15.0 this causes the receiver to
wait indefinitely for the full buffer size rather than returning after
receiving the protocol name. Because of this the primary never sends the HAST
header and the resource doesn't appear in /dev/hast/.

A review has been submitted with a patch that sends the protocol name and
descriptor together using a single sendmsg()/recvmsg() exchange.

With the patch applied, the primary successfully creates /dev/hast/, the
secondary receives the HAST protocol header, and synchronization completes
successfully.

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

Reply via email to