Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
83c4585
Add optional QNX pmem buffer support
dallison May 8, 2026
cbc6229
Add QNX PMEM buffer recovery support
dallison May 8, 2026
4e09a37
Merge main into QNX PMEM buffers
dallison May 9, 2026
c19c1a3
Add PMEM buffer callbacks
dallison May 9, 2026
831117e
Add split buffer support.
dallison May 10, 2026
c834523
Fix split buffer object names.
dallison May 10, 2026
2928a38
Stabilize split buffer cleanup tests.
dallison May 10, 2026
57bb88c
Stabilize concurrent publisher test.
dallison May 10, 2026
a14739c
Reduce macOS concurrent publisher load.
dallison May 10, 2026
69cde5e
Remove split buffer allocator plumbing
dallison May 10, 2026
370140d
Run client tests with split buffers
dallison May 11, 2026
e0f8610
Cap split-buffer latency and stress tests
dallison May 11, 2026
0c75e59
Run split-buffer client tests in CI
dallison May 11, 2026
30b5dc4
Reduce split-buffer concurrent publisher test load
dallison May 11, 2026
6fa8d09
Reduce macOS split-buffer test dimensions
dallison May 11, 2026
373916b
Trim split-buffer CI test runtime
dallison May 11, 2026
07264a8
Fix split-buffer lifecycle and RPC request publishing.
dallison May 11, 2026
dbe012e
Restore CMake CI coverage.
dallison May 11, 2026
4b4edce
Fix CMake Rust client test server lookup.
dallison May 11, 2026
34d7955
Make latency and stress tests resource-aware.
dallison May 11, 2026
a698c00
Add sanitizer and Valgrind CI diagnostics.
dallison May 11, 2026
6f7a206
Fix macOS split-buffer resize test expectations.
dallison May 11, 2026
1e8800a
Report experimental sanitizer diagnostics as warnings.
dallison May 11, 2026
af43818
Stop running latency and stress tests in CI.
dallison May 12, 2026
ed919e1
Add optimized CI test runs.
dallison May 12, 2026
74f2f59
Add optimized latency graph reports.
dallison May 12, 2026
620d6f1
Fix macOS builtin plugin loading in opt tests.
dallison May 12, 2026
5f88eed
Compare optimized latency against PR baseline.
dallison May 12, 2026
9e707f9
Limit latency report change highlights.
dallison May 12, 2026
c9e376a
Remove noisy latency checks from CI
dallison May 12, 2026
88efb6f
Restore latency CI smoke run
dallison May 12, 2026
b4f6d00
Bump module version to 2.7.0
dallison May 12, 2026
df8a560
Expose C client address helpers
dallison May 12, 2026
6e65d30
Expand C client API coverage
dallison May 12, 2026
14ee864
Restore shadow split-buffer recovery
dallison May 12, 2026
52a42a5
Retry transient macOS shared memory maps
dallison May 12, 2026
7d1db28
Relax Rust dropped message count assertion
dallison May 12, 2026
42cb737
Fix split-buffer shadow test flakes
dallison May 12, 2026
0d8c420
Fix Rust test socket collisions
dallison May 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
bazel-ipc
build
7 changes: 7 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ build:asan --copt -g
build:asan --copt -fno-omit-frame-pointer
build:asan --linkopt -fsanitize=address

build:tsan --strip=never
build:tsan --copt -fsanitize=thread
build:tsan --copt -DTHREAD_SANITIZER
build:tsan --copt -g
build:tsan --copt -fno-omit-frame-pointer
build:tsan --linkopt -fsanitize=thread

# Enable the built-in platform-specific configuration feature
common --enable_platform_specific_config

Expand Down
11 changes: 11 additions & 0 deletions .cursor/rules/test-runner.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
description: Use Bazelisk for repository test commands
alwaysApply: true
---

# Test Runner

Use `bazelisk` rather than `bazel` for this repository.

- Run the full test suite with `bazelisk test //...`.
- Prefer `bazelisk test <target>` for focused Bazel test runs.
183 changes: 177 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,36 @@ name: CI

on: [push, pull_request]

permissions:
contents: read

jobs:
test:
name: test (${{ matrix.os }}, ${{ matrix.mode }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60 # liberal upper bound to protect against tests stalling
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
mode: fastbuild
bazel_flags:
- os: ubuntu-latest
mode: opt
bazel_flags: -c opt
- os: ubuntu-24.04-arm
mode: fastbuild
bazel_flags:
- os: ubuntu-24.04-arm
mode: opt
bazel_flags: -c opt
- os: macos-latest
mode: fastbuild
bazel_flags: --config=macos_arm64
- os: macos-latest
mode: opt
bazel_flags: --config=macos_arm64 -c opt

steps:
- name: Checkout code
Expand All @@ -25,7 +43,7 @@ jobs:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}-${{ matrix.os }}
disk-cache: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.mode }}
# Share repository cache between workflows.
repository-cache: true

Expand All @@ -37,21 +55,174 @@ jobs:

- name: Run tests
run: |
bazel test //... \
bazel test \
//... \
--verbose_failures \
--test_output=errors \
${{ matrix.bazel_flags }}

- name: Run split-buffer client tests
run: |
bazel test \
//client:client_test \
//c_client:client_test \
--verbose_failures \
--test_output=errors \
--test_arg=--use_split_buffers \
${{ matrix.bazel_flags }}

- name: Upload Bazel test logs
uses: actions/upload-artifact@v7
if: failure() # Upload artifacts only if a step failed
with:
name: bazel-test-logs-${{ matrix.os }}
name: bazel-test-logs-${{ matrix.os }}-${{ matrix.mode }}
path: bazel-testlogs

diagnostics:
name: diagnostics (${{ matrix.os }}, ${{ matrix.mode }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
mode: asan
experimental: false
bazel_flags: --config=asan
run_under:
- os: macos-latest
mode: asan
experimental: false
bazel_flags: --config=macos_arm64 --config=asan
run_under:
- os: ubuntu-latest
mode: tsan
experimental: true
bazel_flags: --config=tsan
run_under:
- os: macos-latest
mode: tsan
experimental: true
bazel_flags: --config=macos_arm64 --config=tsan
run_under:
- os: ubuntu-latest
mode: valgrind
experimental: false
bazel_flags:
run_under: --run_under='valgrind --tool=memcheck --leak-check=full --show-leak-kinds=definite,indirect --errors-for-leak-kinds=definite,indirect --error-exitcode=1'

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Install Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-${{ matrix.os }}-${{ matrix.mode }}
repository-cache: true

- name: Install Valgrind
if: matrix.mode == 'valgrind'
run: |
sudo apt-get update
sudo apt-get install -y valgrind

- name: Run ${{ matrix.mode }} C client test
run: |
set +e
bazel test \
//c_client:client_test \
--verbose_failures \
--test_output=errors \
${{ matrix.bazel_flags }} \
${{ matrix.run_under }}
status=$?
if [ "$status" -ne 0 ] && [ "${{ matrix.experimental }}" = "true" ]; then
echo "::warning::Experimental ${{ matrix.mode }} diagnostics failed with exit code $status"
exit 0
fi
exit "$status"

- name: Run ${{ matrix.mode }} split-buffer client tests
run: |
set +e
bazel test \
//client:client_test \
//c_client:client_test \
--verbose_failures \
--test_output=errors \
--test_arg=--use_split_buffers \
${{ matrix.bazel_flags }} \
${{ matrix.run_under }}
status=$?
if [ "$status" -ne 0 ] && [ "${{ matrix.experimental }}" = "true" ]; then
echo "::warning::Experimental ${{ matrix.mode }} diagnostics failed with exit code $status"
exit 0
fi
exit "$status"

- name: Upload diagnostic Bazel test logs
uses: actions/upload-artifact@v7
if: ${{ failure() || matrix.experimental }}
with:
name: bazel-diagnostic-test-logs-${{ matrix.os }}-${{ matrix.mode }}
path: bazel-testlogs

latency:
name: latency (${{ matrix.platform }}, opt)
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: linux
bazel_flags: -c opt
- os: macos-latest
platform: macos
bazel_flags: --config=macos_arm64 -c opt

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Install Bazel
uses: bazel-contrib/setup-bazel@0.18.0
with:
bazelisk-cache: true
disk-cache: ${{ github.workflow }}-${{ matrix.os }}-latency-opt
repository-cache: true

- name: Run optimized latency tests
run: |
bazel test \
//client:latency_test \
--test_filter=LatencyTest.PublisherLatencyHistogram:LatencyTest.SubscriberLatency:LatencyTest.PubSubLatency \
--verbose_failures \
--test_output=all \
--test_env=SUBSPACE_LATENCY_OS=${{ matrix.platform }} \
--test_env=SUBSPACE_LATENCY_MODE=opt \
--test_env=SUBSPACE_LATENCY_REVISION=current \
${{ matrix.bazel_flags }}

- name: Upload latency Bazel test logs
uses: actions/upload-artifact@v7
if: failure()
with:
name: bazel-latency-test-logs-${{ matrix.platform }}
path: bazel-testlogs/client/latency_test

cmake:
name: cmake (${{ matrix.build_type }})
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]

steps:
- name: Checkout code
Expand All @@ -63,10 +234,10 @@ jobs:
sudo apt-get install -y protobuf-compiler

- name: Configure CMake
run: cmake -S . -B build/cmake -DCMAKE_BUILD_TYPE=Debug
run: cmake -S . -B build/cmake-${{ matrix.build_type }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

- name: Build CMake targets
run: cmake --build build/cmake --parallel $(nproc)
run: cmake --build build/cmake-${{ matrix.build_type }} --parallel $(nproc)

- name: Run CMake tests
run: ctest --test-dir build/cmake --output-on-failure
run: ctest --test-dir build/cmake-${{ matrix.build_type }} --output-on-failure
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ add_subdirectory(shadow)
add_subdirectory(c_client)
add_subdirectory(rust_client)

if(TARGET client_test AND TARGET nop_plugin)
add_dependencies(client_test nop_plugin)
endif()

if(TARGET client_test AND TARGET split_buffer_free_test_plugin)
add_dependencies(client_test split_buffer_free_test_plugin)
endif()

# --- Python bindings and tests ---
if(SUBSPACE_PYTHON)
add_subdirectory(client/python)
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module(
name = "subspace",
version = "2.6.3",
version = "2.7.0",
)

bazel_dep(name = "bazel_skylib", version = "1.9.0")
Expand Down
10 changes: 5 additions & 5 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions asio_rpc/client/rpc_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,6 @@ RpcClient::InvokeMethod(int method_id, const google::protobuf::Any &request,

absl::StatusOr<void *> buffer;
for (;;) {
if (method->request_publisher->NumSubscribers() == 0) {
Destroy();
return absl::InternalError("No subscribers; is the RPC server running?");
}
buffer = method->request_publisher->GetMessageBuffer(
int32_t(req.ByteSizeLong()));
if (!buffer.ok()) {
Expand Down Expand Up @@ -451,10 +447,6 @@ absl::Status RpcClient::InvokeMethod(

absl::StatusOr<void *> buffer;
for (;;) {
if (method->request_publisher->NumSubscribers() == 0) {
Destroy();
return absl::InternalError("No subscribers; is the RPC server running?");
}
buffer = method->request_publisher->GetMessageBuffer(
int32_t(req.ByteSizeLong()));
if (!buffer.ok()) {
Expand Down
2 changes: 1 addition & 1 deletion c_client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cc_test(
"@abseil-cpp//absl/hash:hash_testing",
"@abseil-cpp//absl/status",
"@abseil-cpp//absl/status:statusor",
"@googletest//:gtest_main",
"@googletest//:gtest",
"@coroutines//:co",
],
)
Expand Down
3 changes: 2 additions & 1 deletion c_client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ target_link_libraries(subspace_c_client PUBLIC

add_executable(c_client_test client_test.cc)
add_test(NAME c_client_test COMMAND c_client_test)
target_link_libraries(c_client_test PUBLIC subspace_c_client libserver gtest gtest_main)
add_test(NAME c_client_split_buffer_test COMMAND c_client_test --use_split_buffers)
target_link_libraries(c_client_test PUBLIC subspace_c_client libserver gtest absl::flags_parse)
Loading
Loading