Skip to content

Native Ariadne hosts: ship the cvc:// component library, and dial grpc:// hostnames on Windows - #1021

Merged
transfix merged 5 commits into
masterfrom
fix/native-ariadne-components-grpc-dns
Nov 4, 2026
Merged

transfix merged 5 commits into
masterfrom
fix/native-ariadne-components-grpc-dns

Conversation

@transfix

@transfix transfix commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Two bugs keep the published 3.7.9 native packages from running a conference document that the browser page runs. I found both by following a native-client README step by step against the published arigl 3.7.9 on Windows.

The component library isn't in any native package

src/cvc installs share/libcvc/ariadne/components on every platform. cvc:// looks for it beside the installed library (<bin or lib>/../share/libcvc/ariadne), as docs/ARIADNE.md §6.4 says. But the libcvc and libcvc-cuda recipes' package.files never listed it, so no cvcpkg bundle carried it. A document importing cvc://components/room_users.ari or chat.ari loaded natively without those windows:

arigl: warning: ari: import 'cvc://components/room_users.ari' could not be resolved: ari: cvc://components/room_users.ari not found on the component search path [D:/a/libcvc/libcvc/stage/share/libcvc/ariadne, .]

The compiled-in fallback is the CI runner's staging prefix, which doesn't exist on a user's machine. The browser pages embed the directory, so they never showed this.

The install rule also named no COMPONENT, so the release tarballs left it out too. They are made with cpack -D CPACK_COMPONENTS_ALL=libcvc.

  • Both recipes list share/libcvc/ariadne/.
  • The install rule is COMPONENT libcvc, like the library's own rules. The recipe's plain cmake --install installs every component, so the bundles are unaffected by this part.
  • package-linux fails if its tarball has no share/libcvc/ariadne/components/chat.ari.
  • docs/ARIADNE.md §6.5 notes that bundles up to 3.7.9 lack the directory, and that CVC_ARIADNE_PATH works around it.

grpc://<hostname> aborts on Windows

With the published Windows arigl 3.7.9 (gRPC 1.68.2, c-ares 1.34.8), CVC_ARIADNE_RELAY=grpc://<host>:7700 killed the process at connect:

F0000 ... grpc_polled_fd_windows.cc:227] Check failed: *from_len <= recv_from_source_addr_len_

The same relay by IP worked, and so did GRPC_DNS_RESOLVER=native. localhost never hit this path, because c-ares answers it without a query. That is why the TLS test, which dials localhost, has passed on Windows all along.

The gRPC state and stream transports now call cvc::grpc_dns::default_to_native_on_windows() (src/cvc/state/grpc_dns_resolver.h) from their constructors. It sets GRPC_DNS_RESOLVER=native once, before the process makes its first gRPC object, unless the variable is already set. gRPC reads the variable once, at its first initialization, so it has to come first. Those two transports are the only places libcvc creates gRPC channels and servers.

New test: StateTransportGrpcTest.ConnectsToAPeerNamedByHost. It dials a peer as localhost:<port> on every platform, and on Windows asserts that a transport left GRPC_DNS_RESOLVER set. CI can't make a real DNS query, so the crash itself isn't reproduced in CI.

Checked

  • Both workarounds, against the published 3.7.9 Windows arigl: with GRPC_DNS_RESOLVER=native and CVC_ARIADNE_PATH set to v3.7.9's src/cvc/ariadne, a native client joined a live relay over grpc://<hostname>:7700 with no component warnings. The relay saw it with pose snapshots at 60 Hz.
  • MSVC: both changed transports and the test compile against a local gRPC build tree (/Zs).
  • clang-format 18.1.8: no changes.
  • Recipes: both parse, and the added lines are ASCII.
  • Not run locally: a full Windows build with the new test, or a cvcpkg pack. CI's windows-2022 and package-linux jobs cover those.

Master's recipe / ubuntu-latest checks currently fail for every PR: ubuntu-latest moved to 26.04 with GCC 15. This branch merges #1019's branch (the <algorithm> includes, Linux CI pinned to ubuntu-22.04, and a pycvc test fix), so its own CI runs. Those commits drop out of this diff once #1019 lands. With the pin, the Linux lanes report as recipe / ubuntu-22.04 / ..., so master's required checks must name those instead of recipe / ubuntu-latest / ... before this PR or #1019 can merge.

ubuntu-latest now runs ubuntu-26.04 with GCC 15.2, whose libstdc++ no
longer brings <algorithm> in through <random>, <thread> and the rest.
state_compression_registry_test stopped compiling on every Linux job
("'sort' is not a member of 'std'"). state_brick_frustum_test's
std::find leaned on the same transitive include. A scan of src, inc,
examples and bindings found no other file calling an <algorithm> or
<numeric> function without reaching the header itself.

(cherry picked from commit e8ec8e7)
ubuntu-latest became the 26.04 image (gcc 15.2), and the jobs that used it broke on a std::sort
without <algorithm>: a toolchain no published bundle is built with. publish-cvcpkg.yml already
pins its linux targets to ubuntu-22.04 (glibc 2.35, gcc 11.4), because an artifact built on a
newer image carries GLIBC_2.x versions an older system can't load.

Pinned to ubuntu-22.04: ci.yml's package-linux and pycvc-linux, ci-recipe.yml's two linux lanes,
and release.yml's linux job (the SDK archives) and its linux sdk-smoke lanes.

(cherry picked from commit e59cbf2)
…c:// hostnames on Windows

Two bugs kept the native packages from running a conference document that the browser page runs.

The component library: src/cvc installs share/libcvc/ariadne/components on every platform, and
cvc:// looks for it beside the installed library, but the libcvc and libcvc-cuda recipes'
package.files never listed it. No native bundle carried it, so a document importing
cvc://components/room_users.ari or chat.ari loaded without those windows. The install rule also
named no component, so the release tarballs (cpack's libcvc component) left it out as well. Both
recipes now list share/libcvc/ariadne/, the rule is COMPONENT libcvc, and package-linux fails if its
tarball has no components.

gRPC DNS on Windows: gRPC 1.68.2's c-ares resolver, with c-ares 1.34.8, aborts the process on its
first lookup of a hostname (grpc_polled_fd_windows.cc: "Check failed: *from_len <=
recv_from_source_addr_len_"). So arigl with CVC_ARIADNE_RELAY=grpc://<host>:7700 died at connect,
while grpc://<an IP> worked. The gRPC state and stream transports now set GRPC_DNS_RESOLVER=native
on Windows, before the process makes its first gRPC object, unless it is already set.
test_a_python_kernels_wait_for_the_gil_isnt_charged stamps window["from"]
in Python and then makes the C call that holds the GIL. Between the two the
interpreter can hand the GIL to the waiting kernel thread, at an
eval-breaker check, when `hold` is preempted on a busy machine. The kernel
then runs just after the stamp, with no wait, and the precondition assert
(ran_at - from >= 0.2) failed on pycvc-linux / cp312. Such a try is now
retried like the other no-wait cases: a kernel that waited ran after the C
call, at about window["to"].
@transfix
transfix merged commit c3e902b into master Nov 4, 2026
14 of 28 checks passed
@transfix
transfix deleted the fix/native-ariadne-components-grpc-dns branch November 4, 2026 07:42
transfix added a commit that referenced this pull request Nov 4, 2026
test_a_python_kernels_wait_for_the_gil_isnt_charged failed pycvc-linux / cp312 on its precondition (ran_at - window["from"] >= 0.2). The kernel did wait the hold out, but the hold ran short of its 0.3 s: _PER_ITEM is the best of five calibration runs at import, and when every run is slow (a busy runner, a frequency step), each sum(range(n)) finishes early.

A try whose hold is under 0.25 s now asks the next hold for more (0.3 / held, at most 3 s). A GIL handover before the hold's C call, and an over-long hold, count as stalls. With _PER_ITEM made 2x and 4x pessimistic, the old test fails 2 and 3 runs out of 3 and this one passes every run without skipping.

The <algorithm> includes, the ubuntu-22.04 pin and the first half of this fix reached master through #1021.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant