Skip to content

[CI] linux://python/ray/tests:test_advanced_9 is failing/flaky on master. #34342

Activity

  1. added
    core
    flaky-tracker
    on Apr 12, 2023
  2. self-assigned this
    on Apr 12, 2023
  3. linked a pull request that will close this issue[Core] Deflake test_advanced_9 #34410on Apr 14, 2023
  4. added
    P0
    on Apr 19, 2023
  5. cadedaniel commented on Apr 19, 2023

    @cadedaniel
    MemberAuthor

    I think we'll need to rewrite the test. There's an invariant in gcs num_fds that has changed.

  6. rickyyx commented on Apr 21, 2023

    @rickyyx
    Member

    @cadedaniel Should I take over or assign this to someone else?

  7. cadedaniel commented on Apr 21, 2023

    @cadedaniel
    MemberAuthor

    You can take it over or I can take as P1 this sprint

  8. rickyyx commented on Apr 21, 2023

    @rickyyx
    Member

    So with manual bisecting (running the test on different ray commits), I think this is the PR: 0ae95fb

    cc @cadedaniel

    I will look into how to fix it later - but you if you have any ideas in mind alread, feel free to comment.

  9. rickyyx commented on Apr 21, 2023

    @rickyyx
    Member

    Here is my test script (basically copied from test_advanced_9.py::test_gcs_connection_no_leak)

    import ray
    import sys
    
    
    ray.init()
    
    gcs_server_pid = ray.worker.global_worker.node.all_processes["gcs_server"][
        0
    ].process.pid
    print("==========COMMIT==========")
    print(ray.__commit__)
    print("==========================")
    expected_commit = sys.argv[1]
    if ray.__commit__ != expected_commit:
        print("FAILED: Expected commit: ", expected_commit)
        exit(2)
    
    
    def get_gcs_num_of_connections():
        import psutil
    
        p = psutil.Process(gcs_server_pid)
        print(">>", p.num_fds())
        print(">>(con)", len(p.connections()))
        return p.num_fds()
    
    
    fds_without_workers = get_gcs_num_of_connections()
    print("fds_without_workers: ", fds_without_workers)
    
    
    @ray.remote
    class A:
        def ready(self):
            print("HELLO")
            return "WORLD"
    
    
    num_of_actors = 10
    actors = [A.remote() for _ in range(num_of_actors)]
    print(ray.get([t.ready.remote() for t in actors]))
    
    # Kill the actors
    del actors
    
    import gc
    
    gc.collect()
    
    for _ in range(5):
        num_fds_after_workers_die = get_gcs_num_of_connections()
        if num_fds_after_workers_die > fds_without_workers:
            import time
    
            time.sleep(2)
        else:
            exit(0)
    
    print(
        "FAILED: num_fds_after_workers_die: ",
        num_fds_after_workers_die,
        "- fds_without_workers: ",
        fds_without_workers,
    )
    
    exit(1)

    Run it with python <script> after pip install -U

    This is what I had with running commits before and after this one (success requires 10 passes)

    un 1 for commit 76946cfad7d7e92a0efe7efb6ef5ba4d73945fea failed with exit code 1
    Commit 76946cfad7d7e92a0efe7efb6ef5ba4d73945fea failed
    Run 1 for commit 10861d9f2ef19e845186b8925053a11c6812a161 failed with exit code 1
    Commit 10861d9f2ef19e845186b8925053a11c6812a161 failed
    Run 1 for commit bd525f3ba30492d0fa55ffa002bcc188818debc5 failed with exit code 1
    Commit bd525f3ba30492d0fa55ffa002bcc188818debc5 failed
    Run 1 for commit 1b5b2f8c61bbc1e5c82bde4457986ee7c709fbd4 failed with exit code 1
    Commit 1b5b2f8c61bbc1e5c82bde4457986ee7c709fbd4 failed
    Run 1 for commit bfa0f5ae4166327a82e24704ac35e4b64f84bf2c failed with exit code 1
    Commit bfa0f5ae4166327a82e24704ac35e4b64f84bf2c failed
    Run 1 for commit 82434e20372e6fc80c452a6b502174959fa61984 failed with exit code 1
    Commit 82434e20372e6fc80c452a6b502174959fa61984 failed
    Run 1 for commit 0d13fb1ac69ba589e752d16dea7aafe6c781edd1 failed with exit code 1
    Commit 0d13fb1ac69ba589e752d16dea7aafe6c781edd1 failed
    Run 1 for commit 0ae95fb34450bedf7d096acd2e4ab52982967686 failed with exit code 1
    Commit 0ae95fb34450bedf7d096acd2e4ab52982967686 failed
    Commit 45d5f6544c85ad046c05d6cfbddfdf5fed1ba465 succeeded
    Commit 6c5dc5c216f20e5d1f4a6e5631c29aad2e1ecfca succeeded
    Commit a1a6902010dae553001da5d083907806fac74052 succeeded
    Commit 2dabebb48c76c5e7a8bfa0faa4c5b0398f449bb0 succeeded
    
    
  10. rkooo567 commented on Apr 24, 2023

    @rkooo567
    Contributor

    @iycheng will do the initial investigation

  11. fishbone commented on Apr 27, 2023

    @fishbone
    Contributor

    #34635 this two should be related. Track the progress on the other ticket

  12. linked a pull request that will close this issueDeflakey test advanced 9 #34883on Apr 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0coreflaky-tracker

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions