Repository navigation
Conversation
Initial plasma commit
Minimal travis file
Add readme
Clean up and add client
Python library for plasma
fix error handling
Basic Python unit tests.
Remove directories as well with make clean.
Test Python 3 in Travis.
Object store manager
Remove C struct duplication and python plasma manager
* refactor plasma to use an event loop * unify comment style * Clean up Makefile flags. * Randomize socket names in tests so multiple copies of the tests can be run in parallel without conflict.
* Run clang-format and add pre-commit hook for it. * Modify .travis.yml to check * Try to fix problems with .travis.yml * Try to fix .travis.yml yet again * Update .clang-format to Philipp's preferences * Don't allow lint to fail in Travis * Remove git-hooks directory * Improve clang-format failure output * Fix clang-format error * Report which commit clang-format is comparing against, and add whitespace error * Handle non-PR Travis in clang-format, and add another error * Check $TRAVIS_PULL_REQUEST correctly and add another error * Fix syntax error in check-git-clang-format-output.sh * Add whitespace error * Remove extra whitespace, add clang-format to README
* Use dlmalloc to manage shared memory * add stresstest
4 tasks done
ShockYoungCHN
pushed a commit
to ShockYoungCHN/ray
that referenced
this pull request
Jun 4, 2026
- Methodology: add the corrected throughput model — shuffle barrier makes it total ≈ T(read+map) + T(reduce+write) (not one overlapped min()); include WRITE as a stage; ceiling = current binding stage, so speeding up any binding stage raises GB/s by ~its time-share. 512GB shares: phase1 ~51% (read-bound), phase2 ~47% (reduce restore ~10-16% + write). - Methodology: add "Reduce restore path — inefficiencies & fixes" section (no fetch/decode overlap, batch=16 pull window, head-of-line blocking, max_io_workers=4, write/read fusing asymmetry, tiny shards) with file:line refs and the ray-project#1+ray-project#4 high-impact combo. - design plot: annotate shuffle barrier + PHASE 1/2 brackets and shares. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
elliot-barn
pushed a commit
that referenced
this pull request
Jul 1, 2026
…uctural PRs (#64414) ## Description Two related fixes that get the incremental Read the Docs build (DOC-1047, #64277) actually working. ### 1. Repair the cache producer (`ci/ray_ci/doc/`) The postmerge `doc: build` step has crashed on every run since the Sphinx 8.2.3 upgrade (#64070), so **no doc build cache has been uploaded since Jun 23**. `make html` builds the docs with the docbuild image's Python (Sphinx 8.2.3) and writes `environment.pickle`, but `_massage_cache` then unpickled it in-process under Bazel's pinned Sphinx (6.2.1): ``` File ".../ci/ray_ci/doc/build_cache.py", line 50, in _massage_cache environment_cache = pickle.load(f) ModuleNotFoundError: No module named 'sphinx.util._files' ``` (`sphinx.util._files` is new in Sphinx 8.x, so 6.2.1 can't load the pickle.) → upload crashes → no cache. Without a fresh cache, RtD only finds the last pre-upgrade (7.x) cache, rejects it as `build environment version not current`, and rebuilds cold every time — so the incremental path never engages. **Fix:** run the pickle massage under the doc-build environment's Python (`PYTHONPATH` unset), mirroring how `_build()` runs `make html`, so the pickle is read by the same Sphinx that wrote it. Extracted into `ci/ray_ci/doc/massage_cache.py` (stdlib-only) per review. ### 2. Skip the incremental build for structural PRs (`.readthedocs.yaml`) Incremental Sphinx doesn't delete output for sources removed/renamed in a PR, and the restored cache carries generated stubs — so a structural PR can leave stale pages in the preview. The fail-fast fallback only catches cases that emit a `-W` warning; a clean rename/delete (references updated) is silent. So if `git diff --diff-filter=D` finds any removed/moved source under `doc/source/`, route straight to the clean build (`rtd-fallback`). The proper prune-on-restore fix (so these PRs can *use* the cache) is tracked in **DOC-1314**. ## Related issues Related to **[DOC-1047](https://anyscale1.atlassian.net/browse/DOC-1047)** (epic [DOC-1046](https://anyscale1.atlassian.net/browse/DOC-1046)); unblocks the incremental RtD builds added in #64277. Follow-up: **[DOC-1314](https://anyscale1.atlassian.net/browse/DOC-1314)**. ## Additional information - `ci/ray_ci/doc:test_build_cache` passes (3/3); `test_massage_cache` exercises the real subprocess massage. - The cache-upload path runs postmerge + master only, so change #1 is fully verifiable only after merge — expected: the next postmerge produces a Sphinx-8.2.3 cache that RtD then accepts. - `.readthedocs.yaml` structural-detection uses `if ! git diff --quiet --no-renames --diff-filter=D … 2>/dev/null` — the same shape as the existing `post_checkout` step. An earlier `| grep` + `can't` version was silently dropped by RTD's job-script preprocessor (the build step logged `exit-code: None` and never ran), so the script now uses only constructs already proven in `post_checkout`, with no in-script apostrophes or pipes. Validated via YAML parse + `bash -n`. - This bundles a `.readthedocs.yaml` (consumer) change with the `ci/` (producer) fix at the author's request; happy to split if a reviewer prefers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Ronny Roland <[email protected]> Signed-off-by: Ronny <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
elliot-barn
pushed a commit
that referenced
this pull request
Jul 9, 2026
…uctural PRs (#64414) ## Description Two related fixes that get the incremental Read the Docs build (DOC-1047, #64277) actually working. ### 1. Repair the cache producer (`ci/ray_ci/doc/`) The postmerge `doc: build` step has crashed on every run since the Sphinx 8.2.3 upgrade (#64070), so **no doc build cache has been uploaded since Jun 23**. `make html` builds the docs with the docbuild image's Python (Sphinx 8.2.3) and writes `environment.pickle`, but `_massage_cache` then unpickled it in-process under Bazel's pinned Sphinx (6.2.1): ``` File ".../ci/ray_ci/doc/build_cache.py", line 50, in _massage_cache environment_cache = pickle.load(f) ModuleNotFoundError: No module named 'sphinx.util._files' ``` (`sphinx.util._files` is new in Sphinx 8.x, so 6.2.1 can't load the pickle.) → upload crashes → no cache. Without a fresh cache, RtD only finds the last pre-upgrade (7.x) cache, rejects it as `build environment version not current`, and rebuilds cold every time — so the incremental path never engages. **Fix:** run the pickle massage under the doc-build environment's Python (`PYTHONPATH` unset), mirroring how `_build()` runs `make html`, so the pickle is read by the same Sphinx that wrote it. Extracted into `ci/ray_ci/doc/massage_cache.py` (stdlib-only) per review. ### 2. Skip the incremental build for structural PRs (`.readthedocs.yaml`) Incremental Sphinx doesn't delete output for sources removed/renamed in a PR, and the restored cache carries generated stubs — so a structural PR can leave stale pages in the preview. The fail-fast fallback only catches cases that emit a `-W` warning; a clean rename/delete (references updated) is silent. So if `git diff --diff-filter=D` finds any removed/moved source under `doc/source/`, route straight to the clean build (`rtd-fallback`). The proper prune-on-restore fix (so these PRs can *use* the cache) is tracked in **DOC-1314**. ## Related issues Related to **[DOC-1047](https://anyscale1.atlassian.net/browse/DOC-1047)** (epic [DOC-1046](https://anyscale1.atlassian.net/browse/DOC-1046)); unblocks the incremental RtD builds added in #64277. Follow-up: **[DOC-1314](https://anyscale1.atlassian.net/browse/DOC-1314)**. ## Additional information - `ci/ray_ci/doc:test_build_cache` passes (3/3); `test_massage_cache` exercises the real subprocess massage. - The cache-upload path runs postmerge + master only, so change #1 is fully verifiable only after merge — expected: the next postmerge produces a Sphinx-8.2.3 cache that RtD then accepts. - `.readthedocs.yaml` structural-detection uses `if ! git diff --quiet --no-renames --diff-filter=D … 2>/dev/null` — the same shape as the existing `post_checkout` step. An earlier `| grep` + `can't` version was silently dropped by RTD's job-script preprocessor (the build step logged `exit-code: None` and never ran), so the script now uses only constructs already proven in `post_checkout`, with no in-script apostrophes or pipes. Validated via YAML parse + `bash -n`. - This bundles a `.readthedocs.yaml` (consumer) change with the `ci/` (producer) fix at the author's request; happy to split if a reviewer prefers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Ronny Roland <[email protected]> Signed-off-by: Ronny <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: elliot-barn <[email protected]>
rueian
pushed a commit
that referenced
this pull request
Jul 15, 2026
…nd (#64759) ## Why are these changes needed? After #63657 merged, the C++ ThreadSanitizer (TSAN) build started reporting data races in the embedded RocksDB GCS backend tests: - `//src/ray/gcs/store_client/tests:rocksdb_store_client_test` - `//src/ray/gcs/store_client/tests:rocksdb_concurrency_test` - `//src/ray/gcs/store_client/tests:rocksdb_parity_test` The reported races are **inside RocksDB itself**, e.g.: ``` WARNING: ThreadSanitizer: data race Write of size 2 by thread T180: #1 rocksdb::MemTable::Add(...) // memcpy of key bytes Previous read of size 2 by thread T182: #1 rocksdb::BytewiseComparatorImpl::Compare(...) // memcmp during a Get ``` ### Root cause RocksDB is built as a static library by an **out-of-band CMake action** (`bazel/rocksdb.BUILD` via `rules_foreign_cc`). Bazel's `--copt -fsanitize=thread` and `--per_file_copt` from the `tsan` config only apply to Bazel-compiled `cc_library` targets — they never reach the CMake build. As a result, a TSAN-instrumented GCS test links an **un-instrumented** `librocksdb.a`. TSAN can intercept the plain `memcpy`/`memcmp` on the key/value bytes inside RocksDB's lock-free memtable skiplist, but it **cannot see the acquire/release atomics** RocksDB uses to publish and observe those bytes (that synchronizing code is uninstrumented). Missing those happens-before edges, TSAN reports false races. Concurrent `Put`/`Get` across the store client's I/O offload pool is a fully supported RocksDB operation, so these are false positives, not real races. `report_atomic_races=0` (already set in the `tsan` config) does not suppress them because the racing accesses are byte-wise `memcpy`/`memcmp`, not atomic operations. ### Fix Build RocksDB with its native `WITH_TSAN` CMake option under the `tsan` config. RocksDB's `CMakeLists.txt` handles `WITH_TSAN` by adding `-fsanitize=thread` to its own compile/link flags — the RocksDB-blessed way to run it under TSAN. With RocksDB instrumented, ThreadSanitizer understands its synchronization and the false positives disappear. - `.bazelrc`: `--config=tsan` now sets `--define=ray_rocksdb_tsan=true`. - `bazel/rocksdb.BUILD`: a `config_setting` reads that define and a `cache_entries` `select()` flips `WITH_TSAN=ON` only for TSAN builds. Non-TSAN builds are unaffected: the define is only set by `--config=tsan`, and `WITH_TSAN` stays off in the default `select()` branch. `--config=tsan-clang` inherits the define via `--config=tsan`. ### Verification Reproduced and verified with the same toolchain CI uses (`--config=tsan-clang`, clang 14, libc++). All three previously-failing tests were built under TSAN and run (ASLR disabled via `setarch -R`, `TSAN_OPTIONS=report_atomic_races=0`, matching CI): | RocksDB build (clang-14 TSAN, identical otherwise) | Data races | Result | | --- | --- | --- | | **Without this fix** (uninstrumented `librocksdb.a`) | **10** | **FAILED** (TSAN exits 66) | | **With this fix** (`WITH_TSAN=ON`) | **0** | **PASSED** | The negative-control run (fix disabled via `--define=ray_rocksdb_tsan=false`) reproduces the exact races from the report — `rocksdb::MemTable::Add` (memcpy) racing `rocksdb::BytewiseComparatorImpl::Compare` (memcmp) in the memtable skiplist: ``` SUMMARY: ThreadSanitizer: data race in __interceptor_memcmp #1 rocksdb::(anonymous namespace)::BytewiseComparatorImpl::Compare(...) comparator.cc #1 rocksdb::MemTable::Add(...) ``` With the fix, the same runs are clean: ``` rocksdb_store_client_test : 0 data races, [ PASSED ] 12 tests rocksdb_concurrency_test : 0 data races, [ PASSED ] 4 tests rocksdb_parity_test : 0 data races, [ PASSED ] 2 tests ``` This confirms the fix both eliminates the reported races and that removing it reproduces them — i.e. the instrumentation is the cause of the change. ## Related issue number Follow-up to #63657. ## Checks - [x] I've signed off every commit (by using the -s flag, i.e., `git commit -s`) in this PR. - [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [x] Unit tests - [ ] Release tests - [ ] This PR is not tested :( --------- Signed-off-by: Santosh Jha <[email protected]> Co-authored-by: Copilot <[email protected]>
ShockYoungCHN
pushed a commit
to ShockYoungCHN/ray
that referenced
this pull request
Jul 21, 2026
… heartbeat EventTracker::loop_dispatch_ns() — a dedicated atomic fed ONLY by RecordExecution (on-loop fn() time), so it excludes client-call round-trips that pollute cum_execution_time via RecordEnd. The driver hbucket line now dumps util (delta/ wall) + busy_ms, and a phase=svc line lists top-8 handlers by exec-time this window (needs RAY_event_stats=1). Measured (real v2 512GB): loop util ~10-20% in map, ~55% in the reduce subscribe wave, ~90% in the delete drain. Top drain CPU: FreeLocalObjects.OnReplyReceived 13.4s (461k replies @29us) > UpdateObjectLocationBatch.HandleRequestImpl 8.2s. => the free wave IS the ray-project#1 loop-CPU load (via reply callbacks), validating batch-FreeLocalObjects (collapses the 461k callbacks). Co-Authored-By: Claude Opus 4.8 <[email protected]>
AarryaSaraf
added a commit
to AarryaSaraf/ray
that referenced
this pull request
Jul 21, 2026
…-stale §5/§6 - §3.5.1 (new): the Linux relapse — windowed-incremental USS rebuilt the import-ramp trap and produced one false 6.8x regression; three implementation hypotheses (per-group call overhead, allocator retention, lazy import) each killed by direct measurement; the metric itself was the cause (baseline subtraction flatters the reader that retains more warm heap). Defines the metric of record: per-task absolute USS over time vs E = 2 x target_max_block_size (Ray's own provisioning assumption, context.py:44), task windows via the FileReader.read hook; incremental metrics, peak bars and summary scalars retired. - §3.1: quote Ray's provisioning arithmetic that defines E. - §5: preamble marking §5.0-5.9 as macOS-era mechanism evidence; sweep-2 panel-1 allocator-release diagnosis corrected (disproven by the Ray-free probe: jemalloc inert, arrow-rs 2.3x less than pyarrow standalone on the same file). - §5.10 (new): Linux findings to date — big-fixture wins reproduce (0.40x budget sweep, 0.26x filter workload, 0.70x one_large_grp), small/many-group parity-to-better triple-confirmed, the 153/22 datapoint classified a metric artifact; whole-file-fragment subtlety for small files; pending full rerun + oom axis. - §6 retitled 'Optimizations and fixes, by phase'; Phase 2 entries: metric retirement (6.5) and the metric-of-record instrumentation (6.6). - §7: ray-project#1/ray-project#4/ray-project#8 refreshed (ray-project#8 allocator levers demoted from fix to knobs; mimalloc segfault warning retained). - §8/§9: task_mem.py, inspect_run.py, micro_alloc_probe.py documented. - §10 verdict rewritten around the new metric. - Also includes the previously uncommitted §7.9 expansion from the prior session (stats capability ladder, bloom filters, clustering inference). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Signed-off-by: Aarrya <[email protected]>
3 tasks done
5 tasks done
daiping8
added a commit
to daiping8/ray
that referenced
this pull request
Sep 20, 2026
… bridge for the Go runtime (ray-project#1) * bazel: add Go toolchain and gazelle repositories Add the bazel declarations needed to build Go code in Ray, additively only: io_bazel_rules_go (with two patches to support Go 1.25), bazel_gazelle, rules_proto, and bazel_features, following the same auto_http_archive pattern as the existing repositories. WORKSPACE registers bazel_features_deps and overrides the Go SDK to 1.25.6 via go_download_sdk declared in the same evaluation block as grpc_extra_deps (within a block the last repository declaration wins; go_register_toolchains cannot be used because it fails when an SDK rule already exists). No existing repository or build rule is modified, and nothing consumes the new repositories yet. Signed-off-by: daiping8 <[email protected]> * core_worker: add C++ CGO bridge for the Go runtime Add src/ray/core_worker/lib/go, a C++ bridge library that exposes the CoreWorker (runtime lifecycle, task submission/execution, object store, GCS access, worker context) to Go through a C ABI for CGO. Includes gtest coverage with team:core owner tags. The bridge is self-contained: no existing build rule or runtime behavior is changed, and nothing depends on it yet. Signed-off-by: daiping8 <[email protected]> * fix(go): address review feedback on the C++ CGO bridge - gcs_client_bridge: stop the io_service and join the IO thread before deleting the client on connection failure (a joinable std::thread destructor would call std::terminate), and capture the client pointer by value in the IO thread lambda - native_object_store: allocate the empty CObjectArray with malloc to match FreeCObjectArray's free(); return CWaitResult by value from CreateCWaitResult so the wrapper is no longer leaked on every Wait - native_task_executor / native_task_submitter: zero-initialize payload arrays (calloc) so the RAII cleanup path never frees uninitialized pointers - cgo_wrapper: parse the owner address protobuf in BuildTaskArgs instead of discarding it, so by-reference arguments carry a resolvable owner; fix the CGO_ARG_GETTER type-check semantics (FUNCTION_ARG_TYPE_VALUE is 0, so truthiness skipped the check for VALUE getters) - gcs_client_*: validate hex ID lengths before FromHex, whose internal RAY_CHECK aborts the process on malformed input - runtime_ops: surface Initialize validation failures as exceptions instead of silently returning success; pass the resolved cluster ID and fetch policy into InitializeCoreWorker so worker registration uses the right cluster identity - object_store_ops: propagate Put failures instead of hiding them; pass a nil outer_object_id through to RegisterOwnershipInfoAndResolveFuture, matching the Java bridge - runtime_stubs: mark the Go callback stubs as weak so real Go CGO exports override them - drop the redundant explicit gtest dep (provided by ray_gtest_main) Signed-off-by: daiping8 <[email protected]> * proto: add GO language enum and GoFunctionDescriptor schema to support the bridge The C++ bridge (src/ray/core_worker/lib/go) compiles against ray::Language::GO and the Go function descriptor fields, so the proto schema changes must land with the bridge rather than with the Go implementation. Also carries the CoreWorker extension points the bridge calls. Signed-off-by: daiping8 <[email protected]> * fix(go): address review feedback on the C++ bridge and Go literals - runtime_ops: AllocateObject passed the metadata buffer as the data slot of the three-argument RayObject constructor (data, metadata, nested_refs), so metadata-only objects swapped their fields; pass a null data buffer and the metadata second - runtime_callbacks: when GoExecuteTask returns null for a task with return slots, the callback returned OK with no return objects, tripping RAY_CHECK(objects_valid) in TaskReceiver and aborting the worker; fill every return slot with a TASK_EXECUTION_EXCEPTION error object (AllocateReturnObject + SealReturnObject) and convey the message via application_error, keeping the CreationTaskError path for failed actor creation - task_executor_ops / native_task_executor: remove the dead ExecuteTask and ExecuteActorTask methods and their CNativeTaskExecutor_Execute exports; the worker execution path is the GoExecuteTask callback in runtime_callbacks.cc, and these submission-based helpers had no callers while suggesting the opposite semantics. CreateErrorObject moves to task_executor_ops.h for reuse by the callback - py: add GO to the custom_types Language literals; custom_types.LANGUAGE is validated at import time against the Language enum generated from the proto this PR extends, so the missing literal failed every Python-side test suite at collection - drop the redundant explicit gtest dep, mark the runtime_stubs weak symbols, and add the missing Doxygen comments Signed-off-by: daiping8 <[email protected]> --------- Signed-off-by: daiping8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.