Problem loading contest page, cms 1.4rc1

32 views
Skip to first unread message

Madhavan Mukund

unread,
Feb 25, 2019, 10:40:00 PM2/25/19
to contestm...@googlegroups.com
Now I've got CMS 1.4rc1 running with Python 3.6 and I still have the
same problem when trying to load the Contest Webpage. This time, the
admin page, at least, has sensible information about services.
Screenshoot at this link:

https://www.dropbox.com/s/4575mhe1o82tdu8/cms-contest-admin-python36.png?dl=0

cmsLogService reports the following error.

2019-02-26 09:06:46,710 - ERROR [Contest,0] Uncaught exception (ValueError("Invalid cookie 'NPTEL DAA Jan-Apr 2019_login': ''",)) while processing a request: Traceback (most recent call last):
File "/home/madhavan/cms_venv36/lib/python3.6/site-packages/tornado/web.py", line 1489, in _execute
result = self.prepare()
File "/home/madhavan/cms_venv36/lib/python3.6/site-packages/cms-1.4rc1-py3.6.egg/cms/server/contest/handlers/contest.py", line 97, in prepare
self.r_params = self.render_params()
File "/home/madhavan/cms_venv36/lib/python3.6/site-packages/cms-1.4rc1-py3.6.egg/cms/server/contest/handlers/contest.py", line 187, in render_params
if self.current_user is not None:
File "/home/madhavan/cms_venv36/lib/python3.6/site-packages/tornado/web.py", line 1158, in current_user
self._current_user = self.get_current_user()
File "/home/madhavan/cms_venv36/lib/python3.6/site-packages/cms-1.4rc1-py3.6.egg/cms/server/contest/handlers/contest.py", line 167, in get_current_user
self.clear_cookie(cookie_name)
File "/home/madhavan/cms_venv36/lib/python3.6/site-packages/tornado/web.py", line 580, in clear_cookie
domain=domain)
File "/home/madhavan/cms_venv36/lib/python3.6/site-packages/tornado/web.py", line 543, in set_cookie
raise ValueError("Invalid cookie %r: %r" % (name, value))
ValueError: Invalid cookie 'NPTEL DAA Jan-Apr 2019_login': ''

--Madhavan

signature.asc

Luca Wehrstedt

unread,
Feb 26, 2019, 5:14:45 PM2/26/19
to Madhavan Mukund, contestm...@googlegroups.com
Uhm, according to the Tornado source code that raises that exception, we're not allowed to put spaces in cookie names or values. The issue, in turn, is due to the fact that you have spaces in your contest name. That used to be forbidden but unfortunately we introduced a bug that disabled the check. See https://github.com/cms-dev/cms/pull/1073. We fixed the bug in the master branch but didn't backport the fix to the v1.4 version. The solution, for your problem, is just to change the contest name so it doesn't contain spaces (we suggest just letters, digits, dashes and underscores). Hope this helps!

--
You received this message because you are subscribed to the Google Groups "Contest Management System (support)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to contestms-supp...@googlegroups.com.
To post to this group, send email to contestm...@googlegroups.com.
Visit this group at https://groups.google.com/group/contestms-support.
To view this discussion on the web visit https://groups.google.com/d/msgid/contestms-support/20190226033955.pqtumtktnefvrtom%40cmi.ac.in.
For more options, visit https://groups.google.com/d/optout.

Madhavan Mukund

unread,
Feb 26, 2019, 8:02:54 PM2/26/19
to Luca Wehrstedt, contestm...@googlegroups.com
Thanks, this works. I'm still having issues updating a 1.3.2 dump to
1.4rc1. It may be a related issue --- my contests in the 1.3.2 dump
have spaces in their names, which used to be allowed, apparently.
I'll try some experiments and get back to you.

--Madhavan
signature.asc

Madhavan Mukund

unread,
Feb 27, 2019, 3:11:02 AM2/27/19
to Luca Wehrstedt, contestm...@googlegroups.com
Sorry, my setup is still not working properly. I get the contest page
up but when I submit code to evaluate, it throws an error related to
"isolate". The log entries that I see are enclosed. Any idea what
could be going wrong?

--Madhavan
cms-isolote-log.txt
signature.asc

Stefano Maggiolo

unread,
Feb 27, 2019, 3:52:42 AM2/27/19
to Madhavan Mukund, Luca Wehrstedt, contestm...@googlegroups.com
Sadly when that happens we don't have good logs to identify the issue. You should make sure isolate is installed and with the correct permissions (executable by your user, owned by root and with suid bit set). The prerequisite step should take care of that.

Also just try running that isolate command in the logs outside of cms and see if it works or it prints any error.

Madhavan Mukund

unread,
Feb 27, 2019, 3:57:37 AM2/27/19
to Stefano Maggiolo, Luca Wehrstedt, contestm...@googlegroups.com
I did follow the usual setup instructions. Here are the permissions.

(cms_venv3) madhavan@iarcs-google:~/cms-1.4rc1/cms$ ls -al isolate/isolate
-rwsr-xr-x 1 root cmsuser 60352 Feb 27 12:19 isolate/isolate

Here is what the corresponding command returns from the command line.

(cms_venv3) madhavan@iarcs-google:~/cms-1.4rc1/cms$ ./isolate/isolate --cg --box-id=20 --init
Error in config file, line 1: Line not terminated or too long

--Madhavan
signature.asc

Stefano Maggiolo

unread,
Feb 27, 2019, 3:59:09 AM2/27/19
to Madhavan Mukund, Luca Wehrstedt, contestm...@googlegroups.com
isolate has a config file (I believe it's called isolate.cf, not sure where in your system is). See if there's any obvious problem with that. Here's a sample: https://github.com/ioi/isolate/blob/master/default.cf

Madhavan Mukund

unread,
Feb 27, 2019, 4:23:55 AM2/27/19
to Stefano Maggiolo, Luca Wehrstedt, contestm...@googlegroups.com
I do have the identical config file.

I thought it might have to do with the value of box_root. The default
value in the config file is

box_root = /var/local/lib/isolate

This directory did not exist, but creating it did not help. Nor did
resetting box_root to another location (the value of "temp_dir" in
cms.conf) and recompiling. I would find a new empty sandbox directory
under box_root for each attempt, but nothing more, and the same error
message kept reappearing.

Finally, I decided to replace the v1.4rc1 isolate with the one from
v1.3.2 (which works on my system) and now things seem to be moving!

--Madhavan
signature.asc

Stefano Maggiolo

unread,
Feb 27, 2019, 4:30:22 AM2/27/19
to Madhavan Mukund, Luca Wehrstedt, contestm...@googlegroups.com
Uhm, at a first glance I don't see any particularly relevant commit in isolate between the two versions... I think the issue you had was caused by isolate looking at a different config file then the one you thought it was looking at. I'll send a patch to isolate to print the location of the config file at least in case of errors.
Reply all
Reply to author
Forward
0 new messages