Skip to content

[core] Remove gcs addr updater in core worker. - #24747

Merged
fishbone merged 29 commits into
ray-project:masterfrom
fishbone:remove-gcs-addr-updator
May 27, 2022
Merged

fishbone merged 29 commits into
ray-project:masterfrom
fishbone:remove-gcs-addr-updator

Conversation

@fishbone

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Since we are using domain name resolution to get the new address of GCS, gcs addr updator is not necessary any more. This PR removed that.

Related issue number

Checks

@rkooo567 rkooo567 self-assigned this May 16, 2022
@fishbone fishbone changed the title [wip][core] Remove gcs addr updator in core worker. [core] Remove gcs addr updator in core worker. May 19, 2022
@fishbone
fishbone marked this pull request as ready for review May 19, 2022 22:25
@rkooo567

Copy link
Copy Markdown
Contributor

Btw cc @WangTaoTheTonic for the visibility

@fishbone

Copy link
Copy Markdown
Contributor Author

Interesting..., it seems there is another bug depending on this CHECK failure to crash worker.

@fishbone

fishbone commented May 20, 2022 •

Copy link
Copy Markdown
Contributor Author

@rkooo567 @mwtian could you take another look. The issue here is that after removing this, worker won't fail due to fail to get gcs address. Raylet sometimes is a zombie and we need to check that as well. (4fb9827)

@rkooo567

Copy link
Copy Markdown
Contributor

Do you happen to know why the raylet is zomebie in this case?

@fishbone

Copy link
Copy Markdown
Contributor Author

Do you happen to know why the raylet is zomebie in this case?

The reason is because the process which starts it doesn't claim for the result. It should be the pytest. Another way might be just to fix this test. How do you think about that?

@rkooo567

rkooo567 commented May 20, 2022 •

Copy link
Copy Markdown
Contributor

I see. So to make sure I fully understood;

Before:
Pytest starts a raylet -> GCS crashed -> Raylet crashed -> worker was originally killed by gcs address updater.

Now:
Since there's no GCS address updater, we should rely on raylet being killed (the worker should kill itself). However, raylet is a zombie process.

Is this correct? In this case, including zombie process checking to the raylet seems to be a more robust solution. Since zombie basically means the process is dead IIUC. I think running ray with pytest is also pretty a common use case!

Comment thread src/ray/util/process.cc
}
return true;
#else
if (kill(pid, 0) == -1 && errno == ESRCH) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have cpp unit test? I guess it should be pretty easy to verify it if it works on both Mac & Linux correctly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, only for Linux here. Mac doesn't have proc and Mac test not fail as well.

Comment thread src/ray/util/process.cc Outdated
int rpid = 0;
char rcmd[32];
char rstatc = 0;
RAY_CHECK(fscanf(fpstat, "%d %30s %c", &rpid, rcmd, &rstatc) == 3);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we tolerate the read failure case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is something defined in linux kernel: https://linux.die.net/man/5/proc which is very stable.

In this case, I think if we fail, we should fail early.

@mwtian mwtian changed the title [core] Remove gcs addr updator in core worker. [core] Remove gcs addr updater in core worker. May 20, 2022
@fishbone

Copy link
Copy Markdown
Contributor Author

Mac has the same issue. But I don't know how to detect that in mac.

@rkooo567

Copy link
Copy Markdown
Contributor

@iycheng hmm should we just send a RPC instead of checking process alive?

@rkooo567

Copy link
Copy Markdown
Contributor

but I am okay with just fixing tests + adding zombie process detecting logic to this PR (with an open issue)

@fishbone

Copy link
Copy Markdown
Contributor Author

@rkooo567 My concern is that rpc seems more complicated.
But anyway we have worker talking with local rayelt, maybe it's ok to add it there.

@fishbone

Copy link
Copy Markdown
Contributor Author

mac started to fail now. let me find another way to fix this. 😅

@fishbone

Copy link
Copy Markdown
Contributor Author

I just notice test_reconnection & test_scheduling_2 also failed on linux due to timeout. Maybe they are because of the same reason here.

@fishbone

Copy link
Copy Markdown
Contributor Author

Pretty bad... more tests failed. Investigating.

@rkooo567

Copy link
Copy Markdown
Contributor

Lmk if you'd like to do pair debugging or sth!

@fishbone

fishbone commented May 27, 2022 •

Copy link
Copy Markdown
Contributor Author

@rkooo567 Thanks for the offer. But it's already fixed (wait if we remove node in cluster utils). I'm just waiting for the tests.

@fishbone
fishbone merged commit 0bc04f2 into ray-project:master May 27, 2022
rkooo567 added a commit to rkooo567/ray that referenced this pull request Jun 1, 2022
fishbone pushed a commit that referenced this pull request Jun 1, 2022
)

Turns out #25342 wasn't the root cause of the ray shutdown flakiness. I realized there's another PR that could affect this test suite. Let's try reverting it and see if things get better.
fishbone added a commit that referenced this pull request Jun 2, 2022
fishbone added a commit that referenced this pull request Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants