C++ API: running example and cluster_mode_test segfaults on Mac OS

A user asked:
We working on a project where we’re trying to see if the C++ Experimental API version of Ray can be extended to work with secure enclaves (e.g. Intel SGX). We ran into a problem where when trying to run the instructions here in the C++ tab: What is Ray? — Ray v2.0.0.dev0 ; looks like the code segfaults on line 67 in example.cc (ray/example.cc at master · ray-project/ray · GitHub):

int task_result1 = *(Ray::Get(task_obj));

Looks like the immediately previous line is failing somehow:
auto task_obj = Ray::Task(Return1).Remote(); Both my friend and I ran the code on separate machines and saw the same issue occur. We were wondering if this is a known issue, and whether there were any fixes available. If you (or anyone else) can help provide some insight, that would be very appreciated.

1 Like

Answer:
You need to install ray at first: pip install -e python --verbose at first.

And if the first test is failed, the ray processes are still alive, the test code use the same port(6379) of redis, so you’d better run ‘ray stop’ to make sure no remain ray processes before testing.

Is the environment linux or mac? I think it supports Linux now, does not support mac yet.

1 Like