ray-project / ray

Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
34.26k stars 5.81k forks source link

Task is returning value but not executing preceding statements #10282

Open jatinthotaka opened 4 years ago

jatinthotaka commented 4 years ago

What is the problem?

Please refer to the file ray3.py in https://github.com/jatinthotaka/Ray I'm calling two actors, producer and writer. Producer actor is appending a list and writer actor is accessing the list. In the caller method of the writer class, the program skips the print statement for the list variable and yet returns the expected values. The program also raises the following error.

Aborted at 1598250227 (unix time) try "date -d @1598250227" if you are using GNU date PC: @ 0x0 (unknown) SIGSEGV (@0x0) received by PID 5080 (TID 0x7fdf88ff9700) from PID 0; stack trace:

I am unable to understand why I cannot access the values of a variable in the shared memory but it is getting returned.

Ray version and other system information (Python version, TensorFlow version, OS): OS version == Ubuntu 20.04 LTS numpy==1.19.1 ray==0.8.7 pandas==1.1.0 psutil==5.7.2 bcolz==1.2.1 matplotlib==3.3.1 pyarrow==1.0.1 seaborn==0.10.1

Reproduction (REQUIRED)

Please provide a script that can be run to reproduce the issue. The script should have no external library dependencies (i.e., use fake or mock data / environments):

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

simon-mo commented 4 years ago

Can you try this on latest wheels? I'm getting the following output without segfault:

➜  /tmp python repro.py
2020-08-24 11:37:49,752 INFO resource_spec.py:250 -- Starting Ray with 19.04 GiB memory available for workers and up to 9.55 GiB for objects. You can adjust these settings with ray.init(memory=<bytes>, object_store_memory=<bytes>).
2020-08-24 11:37:50,328 INFO services.py:1209 -- View the Ray dashboard at localhost:8266
(pid=57123) Producer initiated
(pid=57123) Producer called
(pid=57123) producer [0]
(pid=57123) producer [0, 1]
(pid=57127) Writer initiated
(pid=57127) Writer called
[True, [0, 1]]
(pid=57127) List value [0, 1]