Skip to content

Threading compiler errors #9520

@mehrdadn

Description

@mehrdadn

What is the problem?

ray/rpc/worker/core_worker_client.h:332:19: error: 'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'std::mutex'
      send_queue_ GUARDED_BY(mutex_);
ray/rpc/worker/core_worker_client.h:335:32: error: 'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'std::mutex'
  int64_t rpc_bytes_in_flight_ GUARDED_BY(mutex_) = 0;
ray/rpc/worker/core_worker_client.h:338:32: error: 'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'std::mutex'
  int64_t max_finished_seq_no_ GUARDED_BY(mutex_) = -1;
ray/rpc/worker/core_worker_client.h:262:7: error: reading variable 'send_queue_' requires holding mutex 'mutex_'
      send_queue_.push_back(std::make_pair(std::move(request), callback));
ray/rpc/worker/core_worker_client.h:299:24: error: reading variable 'max_finished_seq_no_' requires holding mutex 'mutex_'
          if (seq_no > max_finished_seq_no_) {
ray/rpc/worker/core_worker_client.h:300:13: error: writing variable 'max_finished_seq_no_' requires holding mutex 'mutex_' exclusively
            max_finished_seq_no_ = seq_no;
ray/rpc/worker/core_worker_client.h:302:11: error: writing variable 'rpc_bytes_in_flight_' requires holding mutex 'mutex_' exclusively
          rpc_bytes_in_flight_ -= task_size;
ray/rpc/worker/core_worker_client.h:303:21: error: reading variable 'rpc_bytes_in_flight_' requires holding mutex 'mutex_'
          RAY_CHECK(rpc_bytes_in_flight_ >= 0);
ray/rpc/worker/core_worker_client.h:284:13: error: reading variable 'send_queue_' requires holding mutex 'mutex_'
    while (!send_queue_.empty() && rpc_bytes_in_flight_ < kMaxBytesInFlight) {
ray/rpc/worker/core_worker_client.h:284:36: error: reading variable 'rpc_bytes_in_flight_' requires holding mutex 'mutex_'
    while (!send_queue_.empty() && rpc_bytes_in_flight_ < kMaxBytesInFlight) {
ray/rpc/worker/core_worker_client.h:285:30: error: reading variable 'send_queue_' requires holding mutex 'mutex_'
      auto pair = std::move(*send_queue_.begin());
ray/rpc/worker/core_worker_client.h:286:7: error: reading variable 'send_queue_' requires holding mutex 'mutex_'
      send_queue_.pop_front();
ray/rpc/worker/core_worker_client.h:292:43: error: reading variable 'max_finished_seq_no_' requires holding mutex 'mutex_'
      request->set_client_processed_up_to(max_finished_seq_no_);
ray/rpc/worker/core_worker_client.h:293:7: error: writing variable 'rpc_bytes_in_flight_' requires holding mutex 'mutex_' exclusively
      rpc_bytes_in_flight_ += task_size;
ray/rpc/worker/core_worker_client.h:312:10: error: reading variable 'send_queue_' requires holding mutex 'mutex_'
    if (!send_queue_.empty()) {
ray/rpc/worker/core_worker_client.h:313:54: error: reading variable 'send_queue_' requires holding mutex 'mutex_'
      RAY_LOG(DEBUG) << "client send queue size " << send_queue_.size();

Reproduction (REQUIRED)

Uncomment the warning suppression in #9519.

If we cannot run your script, we cannot fix your issue.

  • I have verified my script runs in a clean environment and reproduces the issue.
  • I have verified the issue also occurs with the latest wheels.

Metadata

Metadata

Assignees

Labels

P1Issue that should be fixed within a few weeks

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions