Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 10 05:10
    gollux commented #119
  • Aug 09 22:39
    wil93 commented #119
  • Aug 09 22:38
    wil93 commented #119
  • Aug 09 17:44
    gollux commented #84
  • Aug 09 17:43
    gollux commented #119
  • Aug 09 17:41
    gollux commented #376
  • Aug 09 17:12
    gollux commented #1005
  • Aug 09 17:12
    gollux commented #1005
  • Aug 09 17:08
    gollux opened #1213
  • Aug 04 22:20
    mirjalali opened #1212
  • Jul 02 15:54
    codecov[bot] commented #1209
  • Jul 02 15:49
    codecov[bot] commented #1209
  • Jul 02 15:49
    SvizelPritula synchronize #1209
  • Jul 01 22:06
    codecov[bot] commented #1211
  • Jul 01 22:02
    codecov[bot] commented #1211
  • Jul 01 21:56
    SvizelPritula opened #1211
  • Jun 30 16:51
    codecov[bot] commented #1210
  • Jun 30 16:44
    SvizelPritula opened #1210
  • Jun 29 21:23
    codecov[bot] commented #1209
  • Jun 29 21:18
    codecov[bot] commented #1209
Marco Romagnoli
@romagnolimarco
Actually the Error Msg was " TypeError: Found incompatible key 'Da decimale a binario.%l' for value <cms.db.submission.File object at 0x7fe69cf57278>; this collection's keying function requires a key of 'Da20decimale20a__20binario.%l' for this value."
As I mentioned I solved importing the Tasks one by one.
Andrey Vihrov
@andreyv
@romagnolimarco Oh, codenames can't contain spaces, and there was a fix for this a while ago in cms-dev/cms@9da2d14. Though you should have gotten a better error message, maybe some fields were missed in the fix. You could work around this by replacing spaces with _ in the relevant fields before export. Anyway, glad to hear that you solved it.
Marco Romagnoli
@romagnolimarco
@andreyv : Thank You, sooo much. I removed the submissions with spaces and run again cmsDumpExporter and cmsDumpImporter, Now I could import all Users, plus previous submissions and Tasks.
Marco Romagnoli
@romagnolimarco
I'd like to propose one little improvement in the documentation regarding the installation af cms 1.4. on page: https://cms.readthedocs.io/en/v1.4/Running%20CMS.html#running-cms-configuring-cms , reading the paragraph : "Configuring the DB" there is a kind of "spaghetti" GOTO in the middle of the explained process with postgress console active: " Then you may need to adjust the CMS configuration to contain the correct database parameters. See Configuring CMS." Actually without explaining how to exit postgres. Doing step by step (spaghetti goto included) exactly as the documentation suggest bring two warnings plus an error when running cmsInitDB: " WARNING [<unknown>] I/O error while opening file /usr/local/etc/cms.conf: [EACCES] Permission denied
  • WARNING [<unknown>] No configuration file found: falling back to default values.
    • CRITICAL [<unknown>] Operational error while talking to the DB. Is the connection string in cms.conf correct?" I suggest to add the detail of how to exit postgress before running the command "cmsInitDB". Than need to underline the necessity of running sudo ./prerequisites.py install after the changhe in cms.conf, before running cmsInitDB. Newbies (like me long ago) can stuck there without idea how to get rid of it and complete the installation in a proper way. Thanks.
Andrey Vihrov
@andreyv

@romagnolimarco Thanks, good suggestion. How does this line look before "Then you may need to adjust…":

After running these commands, return to the initial shell by executing exit or pressing Ctrl+D.

Regarding the second question, there already is a note about prerequisites.py in the end.

Marco Romagnoli
@romagnolimarco
Yes, it looks O.K. to me.
1 reply
Marco Romagnoli
@romagnolimarco
The Note about prerequisites.py to re-run is there, But the sentence " or you could simply edit the previously installed configuration files (which are usually found in /usr/local/etc/ or /etc/), if you do not plan on running that command ever again." is misleading, in the sense that is indeed Necessary to Re-Run the script, if You followed the tutorial step by step and modified the files cms.conf ... than You have to do it. So my suggestion is to write a more clear sentence and give more evidence to it: Underlining, using bold font etc.. Thanks.
Marco Romagnoli
@romagnolimarco
I'd like to be more clear, but it will take a lot of lines of text to explain me (I beg Your Pardon, sorry). Long ago when I tired for the first time to install CMS, I went under a lot of Database Errors, and I was indeed following the cms.readthedocs.io. Then after some painfull "try and try again" I finally find "my" solution, it is written in the txt file that come with the Video Tutorial on how to install CMS (version 1.3) . You can find the link here: http://cms-dev.github.io/related.html (Tutorial
A video tutorial on how to install and run CMS, by Marco Romagnoli.) So I could finally run the cms, FIRST modifing ( changing the connection string given in database; changing username, password and database name) , saving cms.conf and cms.ranking.conf and running : sudo ./prerequisites.py install. Only Then I entered Postgres and create the user and the database. So Inverting the steps compared to the Docs it works, without errors. That is.
Marco Romagnoli
@romagnolimarco
Of course the process can be done in many different way, but following carefully ReadtheDocs should bring Newbies to Success not leaving them helpless in the middle of night . A good Sleep is better :-) .
Marco Romagnoli
@romagnolimarco
From my side, to contribute to the cause, my umble contribution can be, to update the Video Tutorial with the v1.4.rc1 Version (or maybe with the new 1.5) , when I'll find the time. Thanks for taking your time to read all this stuff.
Majid Garoosi
@MaGaroo
Hi! Anyone aware of how we can decrease randomness in workers' evaluation process?
I've already reduced the number of workers per machine to 1 and run isolate-check-environment script. Is there antoher option?
Andrey Vihrov
@andreyv
@Grackins Which language do you use for submissions? How much volatility do you observe? Is the machine a VM or a physical machine?
Java, for example, requires additional tuning, and even then is not completely deterministic. If the machines are virtual, then it is important to pin machine CPUs instead of sharing them with other VMs.
mihaitutu
@mihaitutu

Hello! My name is Mihai Tuțu and I am a teacher at a private school back in Romania. Because CMS is highly popular in the competitions my students go to, I want to implement it for practice contests. I have read much of the documentation and this communication channel, but still I have some questions.

For a contest of 3 hours with 40 participants, with solutions in C / C++, is one computer with CMS installed enough? What physical resources should this computer have?

Thanks!

4 replies
Vu Truong Giang
@goldenskygiang
Hi. I am interested in adding Logisim support to CMS, as my school has lab practices where students need to build digital circuits in Logisim and test them using text input files similar to programming problems. I think it will be similar to creating custom language and task type in CMS. However, I see that the CMS documentation does not cover in details about how programming task evaluation is handled and there is little information on implementing custom support. Could anyone here elaborate more on that?
Andrey Vihrov
@andreyv

@goldenskygiang To create a custom language, you need to add a language plugin, which will return compilation and evaluation commands for the language. See https://github.com/cms-dev/cms/blob/master/cms/grading/language.py#L29 for the interface and https://github.com/cms-dev/cms/tree/master/cms/grading/languages for examples.

About task types, you can see https://cms.readthedocs.io/en/latest/Task%20types.html to get a general understanding and then look at https://github.com/cms-dev/cms/tree/master/cms/grading/tasktypes for implementation examples.

If your tasks will have text inputs and text outputs, then likely you don't need a new task type, Batch should do fine.

5 replies
Jossemar Cordero
@jossemarGT

Hi CMS Community. I have been using CMS to bootstrap another idea. At the moment, I stumbled with the challenge of integrating other applications alongside all the CMS core ones. So I wanted to ask, how much complex do you think would be migrating CMS into gRPC? and could you give me some pointers where I should look at?

I am aware there is a custom RPC server implementation and models somewhere but I cannot spot them.

13 replies
Marco Romagnoli
@romagnolimarco
From https://cms-dev.github.io/related.html my tutorial is linked to my GDrive folder. Users who try to access still need my sharing even if I give to all access with the link. I get this message: " xxx@gmail.com is requesting access to a folder via an old link, which is no longer valid due to a security update. Share the folder with this person directly, or copy and send the new link in sharing settings." Can You please host this content in the web site on github pages? Or any other suggestion/way to make it easy for the users to directly access it? Thank You.
3 replies
RezwanArefin01
@RezwanArefin01

is it already? are you still using cmsmake? @stefano-maggiolo (4 year old message)

Will task-maker be updated anymore? :( Ever since I saw the 'new cmsmake' advertisement, I've been using task-maker. But the current source throws some error that I had to fix myself to install (last year ... now I have to figure out again). It would be so nice if you guys could update the software to use new packages / fix the errors.

could you give us more info on it? is it actively developed? is it stable and used in production? does it aim at fully replacing the old one?

anyway yes, AFAIK the answer to all those question is yes

not actively developed anymore :cry:
does anyone know any alternative to task-maker?
3 replies
Kayacan
@kayacanv
hi is there a quick solution to enable multi-CPU usage of the ContestWebServer. we are hosting a contest for 50 students. workers are in different instances and evaluation works really fast.
Stefano Maggiolo
@stefano-maggiolo
sadly we don't have a great story for parallelism in CMS, but for CWS you can simply launch one instance per CPU
you will need a load balancer in front of the multiple instances, there's a sample configuration for nginx in the repository, and some notes here: https://cms.readthedocs.io/en/v1.4/Running%20CMS.html#recommended-setup
Kayacan
@kayacanv
so I should create different CWSs in the same machine. Thanks. I learned a lot while installing cms for the last 3 days, I will learn nginx now :) can you give an example config for nginx.conf file and cms.conf file. because in samples I saw there is only one CWS
also in the high load cases I saw this log 'Uncaught exception (TimeoutError('QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 60',)) ' , is it make sense to change some configuration
Stefano Maggiolo
@stefano-maggiolo
a sample nginx.conf is linked in the documentation and it's here: https://github.com/cms-dev/cms/blob/v1.4.rc1/config/nginx.conf.sample
for cms.conf, you will need to
  1. list all the CWSs in the services section (essentially, add new pairs with the same IP and different port)
  2. amend "contest_listen_address": [""], "contest_listen_port": [8888], to have lists of the same length of the number of CWSs (first CWS will listen to the first address/port, etc) - note that if you add nginx in front, you can put the listen address to localhost as noted in the comment
  3. increase num_proxies_used by 1 (this is used to let CWS know how many IPs to "unbox" to find the actual request IP, that in some cases it needs to know)
Kayacan
@kayacanv
thank you very much I used nginx worked well.
in the last 4 days, we have hosted 4 contests. (50-60 students). It went very well(We had 60CPUs in cloud so evaluations lasted no more than 6-7 seconds).
Stefano Maggiolo
@stefano-maggiolo
glad to hear!
Alex
@salcodes1
Greetings! For our contest, we're using a CMS configuration hosted in Google Cloud. We have many contests, and it is quite cumbersome to switch the contest web servers to the intended contest, since our VMs start automatically and do not support any launch parameters or input for the CWS service. I have made some changes to the source code in order to make it (hopefully) easier to switch contests. I've introduced an integer priority field for each contest, which will dictate which one gets loaded when no choice is made by the user at the service launch. The field can be easily modified from the details page in the admin panel. The highest priority contest will be made the default contest, instead of it always being the last one in the list. I would appreciate feedback on this feature and whether it can be merged into the main branch. Thank you :)
2 replies
Tautvydas Jasiūnas
@tutis12
Hi, I've set up a communication task, but this keeps happening:
23:35:23 ERROR EvaluationService,0
`evaluate on 221 against dataset 13, testcase 00' failed, see worker logs and (possibly) sandboxes at '/tmp/cms-manager_evaluate-ys5mraug /tmp/cms-user_evaluate-yj_aiwqi'.
23:35:23 WARNING Worker,6
Sandbox /tmp/cms-user_evaluate-yj_aiwqi kept around because job did not succeeded.
3 replies
colll78
@colll78
Is it possible to set up custom execution instructions for cms? Like can we have contest users write one function and when they submit that function is moved into a larger program and the whole program is run?
2 replies
Endum
@Endum
Hi.
I'm trying to setup CMS in a virtual machine of ubuntu server inside virtual box, now if i try to "python3 -m http.server" from server it can be accessed from outside virtualbox (i use a bridge configuration), but if i run cmsAdminWebServer it nothing work from outside virtualbox, anyway in the server i get to receive a response using "wget localhost:8889", may i misconfigured something?
Stefano Maggiolo
@stefano-maggiolo
look at the listening address in the cms.conf file
it might be that you're listening to a too restricted address
6 replies
Endum
@Endum
Another question.
Is it possible to set flags for compiler, like "-Wall -Werror" and son on?
6 replies
Laci Nikhazy
@lacitoo

Hi all, in our system we frequently see the typical SQLAlchemy "TimeoutError: QueuePool limit of size 5 overflow 10 reached, connection timed out, timeout 60" errors, and we wonder what is the root cause and the best fix. It happens at the start of the contest in the ContestWebServer and at the end of the contest in the AdminWebServer.

In the last contest we had 1 CWS and 1 AWS, for 40 contestants and 5 administrators.

What we found about this issue:
https://cms.readthedocs.io/en/v1.4/Troubleshooting.html#servers
cms-dev/cms#1119
cms-dev/cms#969
https://docs.sqlalchemy.org/en/14/core/pooling.html

I think it would help to increase the number of ContestWebServers, in one of the above issues it is written that "Each CWS can have at most 15 simultaneous connections to the database open at any time". So, would it make sense to have like (number_of_contestants / 15) ContestWebServers, or what is the rule of thumb?
But it would not solve the same thing happening at the AWS at the end of the contest (or is it common to have multiple AdminWebServers?)
What about increasing the SQLAlchemy pool size from the default 5 in the create_engine call here: https://github.com/cms-dev/cms/blob/v1.4.rc1/cms/db/__init__.py#L93 ?

I made some observations about the logs for more information, I will put them in replies.

9 replies
Luka Nedimović
@LukaNedimovic

Hello!
I have been trying to setup CMS for quite some time now across 3 different machines and everywhere I got some form of error.
Currently I am trying to set it up on Ubuntu machine and can't use "cmsInitDB" due to the following error: ImportError: No module named coros
If helpful, when I run: pip show gevent, it shows gevent's version is 21.12.0.
I have followed this document: https://docs.google.com/document/d/1lFnUv2rexxKfFkp4RKZLfPMeJ0ZbMd6IUdTlJzkOq7c/edit

How can I possibly resolve this?
Thank you in advance!

10 replies
Luka Nedimović
@LukaNedimovic
I have managed to successfully run CMS, add task and test cases, but when I submit a solution it's always "Compiling". Worker sends following error: https://www.toptal.com/developers/hastebin/enufujecor.sql
24 replies
Nuran
@NuranTBayramov_twitter
hey there! i was wondering if there is a way of getting into the admin panel
1 reply
Vasii Cristian
@informatica-prahova
Why do I receive the message " Execution time out (wall clock limit exceded) " even though the time limit is set to 4 seconds and the task is interrupted after 1-2 seconds? In addition, does checking the test in the test section produce the correct result within the required time limit.
Hyun-seok Jeon
@melongist

Dear All~ :)Does anyone know how to make "Allowed programming language Python 3/PyPy"?
How can I make "Python 3 / PyPy" for contest?

I made with

How can I make "Python 3 / PyPy" for contest evaluation?

Is there any documentation for adding new languages(Python 3 / PyPy)?

Thank you All
Hyun-seok

13 replies
Daniel Agassy
@Daniel-Aga

Hi! I'm trying to create a communication task with a lot of user processes (I tried 70 to begin with).
As I noted in #1207, it doesn't work for tasks with more than 9 user processes due to duplicate box_ids being used in Sandbox.py.
I changed Sandbox.py to allocate 75 box_id's to each worker shard (it does not overflow from 1000 as I'm only using workers 0-3).
Now I can evaluate tasks with up to 29 user processes, but not 30. When the system tries to evaluate a submission with 30 user processes, it keeps going until the wall clock limit, then it is killed.
29 user processes is executed in less than a second, 30 doesn't finish even when the time limit is a few minutes.
I tried to inspect the sandbox logs, it appears that 29 user logs are executed without a problem, one user log gets wall timeout, and the manager gets a segfault.

Do you have any idea what could cause this?
This is the log file of Worker 0: https://www.toptal.com/developers/hastebin/uqevegadod.yaml
Let me know if any other logs would help.

Thanks!

6 replies
SvizelPritula
@SvizelPritula
Hello! I've implemented task level language restrictions as suggested by issue #1155 for a contest I'm planning. I don't know if you're currently taking pull requests, but you can merge it if you want.
Kayacan
@kayacanv
Is there a problem-setter type of user on the admin panel? Who can create and test only their problems but not the other problems?
mihaitutu
@mihaitutu

Hello. I have installed the CMS on Arch last night, in a python environment, just as in the instructions. Everything starts fine, both admin and contest interface on ports 8888 and 8889. But when testing a submission, I get the isolate error. I have read a lot on this problem and I checked the following:

  • isolate is working fine, I can run the command in terminal
  • the path is correct, with the intended permissions (root user and cmsuser group)
  • running the services with a user that is in the cmsuser group

When running the exact instruction of isolate that gives an error, it says I need to cleanup the box-id first, as it is already in use. Upon doing so and retrying to run the instruction, I get the same.

This is the full error:

2022-07-20 14:45:24,725 - ERROR [Worker,6] Worker failed: Failed to initialize sandbox with command: isolate --cg --box-id=70 --init (error 2). Traceback (most recent call last): File "/home/mihai/downloads/cms/lib/python3.6/site-packages/cms-1.4rc1-py3.6.egg/cms/service/Worker.py", line 127, in execute_job_group task_type.execute_job(job, self.file_cacher) File "/home/mihai/downloads/cms/lib/python3.6/site-packages/cms-1.4rc1-py3.6.egg/cms/grading/tasktypes/abc.py", line 235, in execute_job self.compile(job, file_cacher) File "/home/mihai/downloads/cms/lib/python3.6/site-packages/cms-1.4rc1-py3.6.egg/cms/grading/tasktypes/Batch.py", line 231, in compile sandbox = create_sandbox(file_cacher, name="compile") File "/home/mihai/downloads/cms/lib/python3.6/site-packages/cms-1.4rc1-py3.6.egg/cms/grading/tasktypes/util.py", line 71, in create_sandbox sandbox = Sandbox(file_cacher, name=name) File "/home/mihai/downloads/cms/lib/python3.6/site-packages/cms-1.4rc1-py3.6.egg/cms/grading/Sandbox.py", line 944, in __init__ self.initialize_isolate() File "/home/mihai/downloads/cms/lib/python3.6/site-packages/cms-1.4rc1-py3.6.egg/cms/grading/Sandbox.py", line 1420, in initialize_isolate "(error %d)" % (pretty_print_cmdline(init_cmd), ret)) cms.grading.Sandbox.SandboxInterfaceException: Failed to initialize sandbox with command: isolate --cg --box-id=70 --init (error 2)

I am out of ideas... Can you please help me?

3 replies