This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Description
Describe the bug
After starting supervisor process and worker process locally, when executing pymars codes in python console or a single python script, pymars cannot exit normally. Instead I have to use ctrl+c to exit the command line.
While pymars can exit normally in IPython.
To Reproduce
To help us reproducing this bug, please provide information below:
- Your Python version: 3.9.12
- The version of Mars you use: 0.9.0, the latest version of pymars, using pip install.
- Versions of crucial packages, such as numpy, scipy and pandas: follow pymars.
- Full stack of the error: No logs in supervisor and worker process. And no information in console when press Ctrl+C.
- The situation: See the screenshots:
- Run in the python console:

- Run in a script:

- Minimized code to reproduce the error.
- Firstly, start supervisor process and worker process locally.
mars-supervisor -H 0.0.0.0 -p 9002 -w 9001
mars-worker -H 0.0.0.0 -p 9003 -s 127.0.0.1:9002
- Secondly, run the following codes in python console.
import mars
import mars.tensor as mt
s = mars.new_session('http://127.0.0.1:9001')
a = mt.random.rand(4, 4, chunk_size=2)
b = mt.inner(a, a)
b.execute() # submit tensor to cluster
- Last, execute
exit() try to exit the python console.