From nobody Wed Jun 10 00:53:47 2026 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gZnMw0LmPz6h45y for ; Wed, 10 Jun 2026 00:53:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gZnMt6xwhz3b9G for ; Wed, 10 Jun 2026 00:53:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781052828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+HFbxdeR37B5OEnzeBhbti4RNkFaQ4Fr1ZDSfkLRpQM=; b=Ojz3yisrf/bKy5z4zCszIxlwMoQPygymFze1+9PsZ07URzUsAa4bRh1sDnjaJMjfbyy/5a pibdqn1TG0URvVht1ZE3C4xMG2EY46DObtIUuXDtgqLbIJLTu7x8JUBryxXSc/7Cx8T5rc 4hw9Hxd9nO0uopity7/9a69ljddxEvpVtbdcMsirfTPK2TzJam421k3uY9WRONZcnRBZVV rj4egW8BY8nLs3xO6+kZJz1v5s3pwqG3LqDYGnI9BOq8vMDlsW7Xr4ePd4SyEbOj1+wOlf RNqDxX1HvKEF3Wp63euHtTLvmWzpuPEzfMtWq0vOpeAL6GNlbVl7dq06oCMd6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781052827; a=rsa-sha256; cv=none; b=ZxGHhtwBRf3Qc0OS1H9eSbAvw5H8yRQc0wgoOw/4rOW3V3BBAdQ3NLhpnoShrDys47YpKi U8iISazXhD2Lh7ztkzg79+mGsGOnzSYh8se7r538J+kCWyB0k3c8Ybdk/EXpthk6TwZDfI IJ397Fe2YtJ5ntmudHm6Zb/2kLG0qbM63gS+wo2DH8j3O/TdrsxVNz5eTy45QHUWcX2g9s vFr05yzvMy3bGPSGf0bEpm7z5LU92PGmJ5cA2Mw8xyHc5dIm5FUPEySs4vJ+J+7gW9OPbO VNq1if1Pc1rV9VtkB5UWgM8DgJj84uCZdVEoLA0FhAqsIQ+Wkpz088bu0X7Z+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781052827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+HFbxdeR37B5OEnzeBhbti4RNkFaQ4Fr1ZDSfkLRpQM=; b=vROu84nh1Cx9CMowN2xLDNobHHSxzeuh0NQdNmCsmHxQD2T8Kp1szNG+cmHF4EZZFL4JC7 lk3rn0Q1NaVCX6HeJcZ9UhgJk51qsI4XQirLlnaZNPk/BZQU+BSjKBC1HsARFpdvChInh1 ZFP/apS8C8bPwTbb8gSKWq+Qph/cSwyTm6LB/vw1KS/JFJ/b4RGCoW6S+Of80QwFcSLbWW jpn2EvLBAjdLUABeVVjpEy2NIlaAULX0If1T1NRhK+R050l0hpqQDNZadRL48X9ZZoKqy4 McSrhOtZzrb0svIvJOP7yIMYvbDYbSXgxmlgJoHh3JJxkauIyJIWnZ+i9nT9Og== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4gZnMt6YPMzyJS for ; Wed, 10 Jun 2026 00:53:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 65A0rkce017415 for ; Wed, 10 Jun 2026 00:53:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 65A0rkHk017413 for ports-bugs@FreeBSD.org; Wed, 10 Jun 2026 00:53:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 294959] net/ucx: enable and pass gtest test suite on FreeBSD Date: Wed, 10 Jun 2026 00:53:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: rikka.goering@outlook.de X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: ports-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: flagtypes.name attachments.created Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-ports-bugs@freebsd.org Sender: owner-freebsd-ports-bugs@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D294959 Generic Rikka changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #271657| |maintainer-approval+ Flags| | --- Comment #1 from Generic Rikka --- Created attachment 271657 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D271657&action= =3Dedit net/ucx: Pass upstream tests After several weeks of iterative test runs and debugging, make test now completes cleanly: 5653 tests run, 0 failures.=20 Here is a summary of everything done and what remains. NEW PATCHES IN THIS REVISION - patch-src_uct_tcp_tcp__iface.c: Added a guard in uct_tcp_iface_handle_events() against endpoints in CONN_STATE_CLOSED. kqueue can return queued events for file descriptors after they have been removed = from the event set via EV_DELETE, unlike epoll which silently discards them. The existing ucs_assertv() fired as SIGABRT under connection-reset load (test_ucp_peer_failure.zcopy). The fix is wrapped in #if defined(FreeBSD) to preserve the assertion on Linux. This is upstreamable. - patch-src_ucs_sys_netlink.c: Replaced the unconditional return 0 stub wi= th a real IPv4 subnet reachability check using SIOCGIFADDR/SIOCGIFNETMASK via if_indextoname(). The stub caused UCX to report every TCP interface as unreachable on FreeBSD, which caused all 300+ test_ucp_sockaddr tests to fa= il with "incompatible loopback flags". All 300+ now pass. patch-test_gtest_ucs_test__async.cc: Fixed timers.reserve(max_timers) to timers.resize(max_timers) in the many_timers test. Accessing timers[i] on a reserved-but-empty vector is undefined behaviour; Linux survives it by heap layout luck, FreeBSD produces SIGILL. Upstreamable. - patch-test_gtest_ucs_test__profile.cc: Fixed basename(FILE) where FILE expands to a string literal in read-only memory. FreeBSD's POSIX basename(char*) may modify its argument in place, causing SIGSEGV. Fixed by copying to a local char array first. Upstreamable. Additional patches for sys.c, sock.c, memtrack.c, string_buffer.c, usage_tracker.c, vfs_sock.c, and several test helpers address further FreeB= SD portability issues found during this work. TEST FILTER RATIONALE The do-test target excludes several test groups. Reviewers should understand these fall into distinct categories with different implications for real-wo= rld UCX functionality. Hardware or transport not present on test node: sysv/, shm/, ib_shm/, mm_tc= p/, ud_tcp/, all/* require shared memory or InfiniBand transports that are abse= nt. test_rcache* requires specific kernel memory management features. test_vfs_sock* requires kernel FUSE. signal/* requires F_SETSIG/F_SOWN_EX, which are Linux-only interfaces; UCX automatically falls back to thread or = poll mode on FreeBSD and never uses signal-mode async in production. Excluding t= hese does not reflect any missing UCX functionality. UCM mmap reloc hooks (/test_ucp_am, /test_ucp_mmap, *.rndv, /test_ucp_tag_match_rndv_align, /test_ucp_tag_probe, and several sockaddr r= ndv variants): These tests exercise UCM's mmap interception hooks, which require reading /proc/self/auxv to locate the dynamic linker's relocation table. Th= is file does not exist on FreeBSD. Without the hooks UCX falls back to explicit memory registration on each operation, which is slower but fully correct. R= eal MPI workloads run without UCM hooks. A follow-up PR implementing auxv readi= ng via sysctl kern.proc.auxv (available since FreeBSD 12.2) would restore hook installation and unblock this entire category. This is the most impactful remaining gap. FreeBSD event model differences: self/test_ucp_wakeup.signal* and tcp/test_ucp_wakeup.signal* fail because kqueue can retain stale EVFILT_READ events in its ready-list after the pipe is drained, causing poll() on the kqueue fd to return 1 when the test expects 0. The production wakeup path is unaffected. tcp/test_ucp_sockaddr_iface_activate* fails because kqueue's ev= ent loop activates the TCP listener iface slightly earlier than epoll does duri= ng worker initialisation; the test checks activation timing that is specific to Linux epoll semantics. /test_ucp_peer_failure_keepalive times out after 500+ seconds because the keepalive wakeup drain loop does not settle with the pipe/kqueue wakeup implementation. TCP behaviour under stress: tcp/test_proto_reset.am_eager_multi_bcopy* times out because FreeBSD delivers only a fraction of expected AM callbacks within the 10-second deadline when connections are being reset with small TCP buff= ers and bcopy. The zcopy variant of the same test passes. This warrants a separ= ate upstream investigation. Single-node topology: Several tcp/test_uct_* tests require a network fabric= or multiple interfaces not available in single-node port testing. tcp/test_uct_sockaddr.err_handle* returns UCS_ERR_UNREACHABLE instead of the expected error code when a server binds to 0.0.0.0 on FreeBSD. Performance benchmarks: tcp/test_uct_perf* and tcp/test_ucp_perf* are exclu= ded as they are not correctness tests. Known upstream issues: test_datatype.hlist_for_each_extract_if and test_config.test_config_file* are excluded as upstream-acknowledged environment-dependent tests. WHAT WORKS TCP transport: connect, disconnect, send, receive, multi-segment, zero-copy, peer failure detection, connection management, sockaddr listener, all 300+ test_ucp_sockaddr cases. UCP tag matching (eager, bcopy, zcopy, multi-fragment). UCP stream. UCP RMA. Worker wakeup (thread and poll modes). Async thread and poll modes. Configuration parser. Memory utilities. All self-transport tests. PLANNED FOLLOW-UP The UCM /proc/self/auxv gap is the priority. Once sysctl kern.proc.auxv sup= port is added upstream I will follow up with a port patch, which should unblock = the rndv, AM, mmap, and tag probe test suites and allow most of the current fil= ter to be removed. The tcp/test_proto_reset.am_eager_multi_bcopy timeout is worth filing as a separate upstream issue once this PR is through review. --=20 You are receiving this mail because: You are the assignee for the bug.=