[Bug 293867] net/ucx: fix FreeBSD runtime issues blocking UCX-backed MPI paths

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 17 Mar 2026 01:41:35 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293867

            Bug ID: 293867
           Summary: net/ucx: fix FreeBSD runtime issues blocking
                    UCX-backed MPI paths
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: rikka.goering@outlook.de
 Attachment #268870 maintainer-approval+
             Flags:
             Flags: maintainer-feedback+

Created attachment 268870
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=268870&action=edit
net/ucx: fix FreeBSD runtime portability issues

I am attaching a patch series for net/ucx that fixes several FreeBSD-specific
runtime issues found while testing UCX integration with net/openmpi.

The series is split into four logical changes:

1) fix FreeBSD runtime portability issues
   - replace Linux-specific interface discovery and sysfs assumptions
   - avoid Linux-only IPOIB / bridge detection paths
   - add FreeBSD fallbacks for memory remapping and affinity helpers
   - improve pthread_create() error reporting

2) harden async thread state handling
   - avoid dereferencing the global async thread context when startup or
     teardown did not complete successfully

3) fix FreeBSD UCM relocation handling
   - rebase dynamic-section pointers obtained through dl_iterate_phdr()
     by dlpi_addr before dereference on FreeBSD
   - fix PT_LOAD end range calculation when tracking the object address span

4) fix mm signal socket binding on FreeBSD
   - replace Linux autobind assumptions for AF_UNIX sockets in the mm
     signaling path with explicit pathname binding and cleanup

These changes were developed while investigating why OpenMPI built with UCX
support exposed the UCX components correctly but still failed at runtime on
FreeBSD.

Current status after applying the series:

- UCX smoke tests and reduced standalone UCP / worker tests now succeed on
FreeBSD
- OpenMPI no longer fails in the earlier UCM relocation path
- the plain OpenMPI path works with:
    PMIX_MCA_gds=hash
    OMPI_MCA_pml=ob1
    OMPI_MCA_osc=sm
    OMPI_MCA_btl=self,tcp

However, the UCX-backed OpenMPI path still does not initialize successfully and
currently fails during PML UCX component initialization after the UCX context
has already been created successfully. So this series improves and unblocks the
UCX runtime substantially, but does not yet make the OpenMPI UCX path fully
usable on FreeBSD.

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