Skip to content

submission in "Scoring" status for multiple hours on default queue #1184

Closed

Description

@bethard

I've created a competition at https://www.codabench.org/competitions/1481/ and am trying to test it. However, my submissions either complete within a few minutes (the scoring script takes seconds locally) or sit for multiple hours with the status "Scoring". For example, the submission with ID # 26911 has been in "Scoring" status for more than 2 hours.

Is this a typical amount of time to wait on the default queue, or is something going wrong? If the latter, how can I debug the issue?

Activity

  1. Didayolo commented on Oct 5, 2023

    @Didayolo
    Member

    Hi,

    I think there is something wrong. Sometimes, when the compute worker crashes, the submissions are stuck in "Scoring".

    I'll have a look at the status of the workers.

  2. Didayolo commented on Oct 5, 2023

    @Didayolo
    Member

    It may not be related, but I copy error logs of one of the workers here to keep a trace:

    [2023-10-05 12:15:32,388: INFO/ForkPoolWorker-1] Pull for image: ktgiahieu/codabench-gpu:paper-challenge returned a non-zero exit code! Check if the docker image exists on docker hub.
    [2023-10-05 12:15:32,388: INFO/ForkPoolWorker-1] Updating submission @ https://www.codabench.org/api/submissions/26982/ with data = {'type': 'Docker_Image_Pull_Fail', 'error_message': 'Pull for image: ktgiahieu/codabench-gpu:paper-challenge returned a non-zero exit code! Check if the docker image exists on docker hub.', 'secret': 'f36b5e5e-16ea-480c-8661-4518b35a4ef2'}
    [2023-10-05 12:15:32,707: INFO/ForkPoolWorker-1] Submission updated successfully!
    [2023-10-05 12:15:32,708: INFO/ForkPoolWorker-1] Connecting to wss://www.codabench.org/submission_input/652/26982/f36b5e5e-16ea-480c-8661-4518b35a4ef2/ to send docker image pull error
    [2023-10-05 12:15:32,708: INFO/ForkPoolWorker-1] Destroying submission temp dir: /codabench/tmp79wjrq1g
    [2023-10-05 12:15:32,746: ERROR/ForkPoolWorker-1] Task compute_worker_run[5c63c4b9-67e7-44a5-a15b-848e8e3970d2] raised unexpected: RuntimeError("can't start new thread")
    Traceback (most recent call last):
      File "/compute_worker.py", line 365, in _get_container_image
        container_engine_pull = check_output(cmd)
      File "/usr/local/lib/python3.8/subprocess.py", line 415, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['docker', 'pull', 'ktgiahieu/codabench-gpu:paper-challenge']' returned non-zero exit status 2.
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 385, in trace_task
        R = retval = fun(*args, **kwargs)
      File "/usr/local/lib/python3.8/site-packages/celery/app/trace.py", line 650, in __protected_call__
        return self.run(*args, **kwargs)
      File "/compute_worker.py", line 115, in run_wrapper
        run.prepare()
      File "/compute_worker.py", line 781, in prepare
        self._get_container_image(self.container_image)
      File "/compute_worker.py", line 378, in _get_container_image
        asyncio.run(self._send_data_through_socket(error_message))
      File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
        return loop.run_until_complete(main)
      File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
        return future.result()
      File "/compute_worker.py", line 390, in _send_data_through_socket
        websocket = await websockets.connect(self.websocket_url)
      File "/usr/local/lib/python3.8/site-packages/websockets/client.py", line 535, in __await_impl__
        transport, protocol = await self._create_connection()
      File "/usr/local/lib/python3.8/asyncio/base_events.py", line 986, in create_connection
        infos = await self._ensure_resolved(
      File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1365, in _ensure_resolved
        return await loop.getaddrinfo(host, port, family=family, type=type,
      File "/usr/local/lib/python3.8/asyncio/base_events.py", line 825, in getaddrinfo
        return await self.run_in_executor(
      File "/usr/local/lib/python3.8/asyncio/base_events.py", line 783, in run_in_executor
        executor.submit(func, *args), loop=self)
      File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 188, in submit
        self._adjust_thread_count()
      File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 213, in _adjust_thread_count
        t.start()
      File "/usr/local/lib/python3.8/threading.py", line 852, in start
        _start_new_thread(self._bootstrap, ())
    RuntimeError: can't start new thread
  3. juliojj commented on Oct 11, 2023

    @juliojj

    Hi, I am having the same (or similar) problem in a challenge our group is organizing (https://www.codabench.org/competitions/1287/): submissions getting stuck with "Scoring" status. Sometimes I just need do cancel the submission and resubmit, but it is a bit inconvenient for participants and organizers. One participant reported that the log was saying that the worker was not able to download the docker image used by the challenge ("Pull for image: spcke/upareval:latest returned a non-zero exit code! Check if the docker image exists on docker hub."). The weird is that it works, but sometimes not. It would be great if you could check what is causing the instability. Thanks

  4. Didayolo commented on Oct 12, 2023

    @Didayolo
    Member

    Indeed, I have also observed that the docker pull sometimes fails. We'll investigate it.

  5. juliojj commented on Oct 26, 2023

    @juliojj

    Hi, could you find some time to check what is causing the problem? Our challenge, which is approaching its end, has a limited number of submissions at the final phase (set to 3). The inconvenience (for the participants and organizers) is that as organiser I have to manually remove stuck submissions almost every day (as illustrated by the attached screenshot), so that participants don't loose it. Hope Codabench team can find and solve the problem. I understand it may not be solved for this challenge as we have just a few days left, but would be nice to have this fixed for future challenges.
    Best

    image
  6. Didayolo commented on Oct 26, 2023

    @Didayolo
    Member

    Hi Julio,

    We will investigate the problem. If it is related to the docker pull command, as mentioned earlier, then this problem is fixed in the latest change on compute workers and simply needs to be deployed (we need to update all workers of the default queue manually).

  7. Didayolo commented on Oct 26, 2023

    @Didayolo
    Member

    @juliojj I updated the default queue workers. Please tell me if you face the issue again or not.

  8. juliojj commented on Oct 27, 2023

    @juliojj

    Hi @Didayolo, it seems the problem persists. I was checking one submission that got stuck, and noticed the output file is generated (based on "output from prediction step"), but the submission gets stuck at the scoring step. I am not sure if it is because of the "docker pull" issue or what. I don't have access to "output from scoring step" as the file seems to be corrupted. Is there anything I can do to help solving this issue?

  9. Didayolo commented on Oct 31, 2023

    @Didayolo
    Member

    The ingestion program is not crashing? All logs are normal?

  10. juliojj commented on Oct 31, 2023

    @juliojj

    The point is that the same submission file sometimes works, and sometimes doesn't work. The competition finished a few days ago. So, when I have time, I will try to create a copy of the challenge to reproduce the error, and maybe this way we can find and solve the problem. Thanks

  11. bethard commented on Oct 31, 2023

    @bethard
    Author

    We're still seeing this behavior. In many cases, the "Ingestion stderr" of the "Prediction logs" says:

    Pull for image: codalab/codalab-legacy:py39 returned a non-zero exit code! Check if the docker image exists on docker hub.
    
  12. Didayolo commented on Oct 31, 2023

    @Didayolo
    Member

    @juliojj @bethard

    We found one worker of the default queue that systematically shows this behavior. The other workers seems to be working fine. We just stopped the ill worker so it should work better now.

  13. Didayolo commented on Jan 18, 2024

    @Didayolo
    Member

    I am closing this issue to keep track of it only in #1205.

    We are going to improve the logs so we better understand the underlying problem of the compute worker when the pull fails / when the submission is stuck to "Scoring".

  14. Didayolo commented on Jan 23, 2024

    @Didayolo
    Member

    The problem should be solved one. One compute worker in the queue was ill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions