judge0 icon indicating copy to clipboard operation
judge0 copied to clipboard

Error in getting submission details

Open QL-Tanmay-Mazumdar opened this issue 2 years ago • 15 comments

Hey there,

Yesterday, I go through the release notes to setup the docker compose on the ubuntu server. Everything was done as per the step-by-step processes and server was up and running.

But I was facing some issue on the api responses. First I ran create-submission and it works, and when I run get a submission, then it gives this response:

curl --location '/submissions?base64_encoded=true&fields=*' \
--header 'Content-Type: application/json' \
--data '{
    "language_id": 63,
    "source_code": "Y29uc29sZS5sb2coJ2EnKQ==",
    "stdin": "SnVkZ2Uw"
}'
{
    "source_code": "Y29uc29sZS5sb2coJ2EnKQ==\n",
    "language_id": 63,
    "stdin": "SnVkZ2Uw\n",
    "expected_output": null,
    "stdout": null,
    "status_id": 13,
    "created_at": "2024-04-08T11:42:51.856Z",
    "finished_at": "2024-04-08T11:42:52.201Z",
    "time": null,
    "memory": null,
    "stderr": null,
    "token": "5b972768-c861-43e4-af10-48bf36705d14",
    "number_of_runs": 1,
    "cpu_time_limit": "5.0",
    "cpu_extra_time": "1.0",
    "wall_time_limit": "10.0",
    "memory_limit": 128000,
    "stack_limit": 64000,
    "max_processes_and_or_threads": 60,
    "enable_per_process_and_thread_time_limit": false,
    "enable_per_process_and_thread_memory_limit": false,
    "max_file_size": 1024,
    "compile_output": null,
    "exit_code": null,
    "exit_signal": null,
    "message": "Tm8gc3VjaCBmaWxlIG9yIGRpcmVjdG9yeSBAIHJiX3N5c29wZW4gLSAvYm94\nL3NjcmlwdC5qcw==\n",
    "wall_time": null,
    "compiler_options": null,
    "command_line_arguments": null,
    "redirect_stderr_to_stdout": false,
    "callback_url": null,
    "additional_files": null,
    "enable_network": false,
    "status": {
        "id": 13,
        "description": "Internal Error"
    },
    "language": {
        "id": 63,
        "name": "JavaScript (Node.js 12.14.0)"
    }
}

Sometimes it also stuck in In Queue in the status key.

Could you please help us to solve this issue it's urgently important for us to solve this and make it live.

QL-Tanmay-Mazumdar avatar Apr 08 '24 12:04 QL-Tanmay-Mazumdar

I can help you. I was also facing the same issue. I assume you are using judge0 in docker. If this is correct can you tell me which operating system are you using?

raviprakash007 avatar Apr 19 '24 03:04 raviprakash007

@raviprakash007 We were using judge0 in docker on ubuntu server.

QL-Tanmay-Mazumdar avatar Apr 19 '24 04:04 QL-Tanmay-Mazumdar

Ubuntu Which version?. The underlying mechanism that judge0 uses has been changed and it now it requires systemd. Please start ubuntu with systemd. or use Centos 9

raviprakash007 avatar Apr 19 '24 04:04 raviprakash007

@raviprakash007 We are using Ubuntu Server 22.04 LTS and would like to continue with that only. So, can you help us to deploy it with docker. Also we are using version 3 for docker compose too.

QL-Tanmay-Mazumdar avatar Apr 22 '24 05:04 QL-Tanmay-Mazumdar

You operating system must support CG version 2 for running Judge0. The reason is that, Judge0 uses isolate and isolate has been updated to CGroup Version 2.

raviprakash007 avatar Apr 22 '24 05:04 raviprakash007

Can you share the steps of how we can setup this up with docker on ubuntu server, or is there are documentation for the same?

QL-Tanmay-Mazumdar avatar Apr 22 '24 07:04 QL-Tanmay-Mazumdar

There is no documentation. But I have done it.

raviprakash007 avatar Apr 29 '24 04:04 raviprakash007

If you could share the steps to set this up that would be helpful.

QL-Tanmay-Mazumdar avatar Apr 29 '24 04:04 QL-Tanmay-Mazumdar

Can u update GRUB of your Ubuntu system like below:-

  1. Use sudo to open file /etc/default/grub
  2. Add systemd.unified_cgroup_hierarchy=0 in the value of GRUB_CMDLINE_LINUX variable.
  3. Apply the changes: sudo update-grub
  4. Restart your server: sudo reboot

Then check the judge0 in docker.

raviprakash007 avatar Apr 30 '24 04:04 raviprakash007

Add systemd.unified_cgroup_hierarchy=0 in the value of GRUB_CMDLINE_LINUX variable. doesn't works for me, any solution ?

HansLanda14ib avatar Apr 30 '24 11:04 HansLanda14ib

Can u update GRUB of your Ubuntu system like below:-

  1. Use sudo to open file /etc/default/grub
  2. Add systemd.unified_cgroup_hierarchy=0 in the value of GRUB_CMDLINE_LINUX variable.
  3. Apply the changes: sudo update-grub
  4. Restart your server: sudo reboot

Then check the judge0 in docker.

Every submission always returns an Internal Error. But when I do this, seem everything is OK

leho-dev avatar May 13 '24 04:05 leho-dev