Signal 25 with c# question

Signal 25 with c# question

por Mark Stern -
Número de respuestas: 4

I am trying to create a C# question using dot net (my code is in Python).

When I run (from a Python subprocess):

dotnet new console

I get signal 25. As far as I can tell, that is SIGXFSZ

I presume I need to increase the file size allowed, but I cannot see any settings in CodeRunner for this.

The command works (as a shell command) on the JOBE server.

How do I fix this?

Thanks,

Mark Stern

En respuesta a Mark Stern

Re: Signal 25 with c# question

por Richard Lobb -
Jobe server parameters are documented here. The one you probably want is disklimit - the maximum file size in MB. Default 20.You can set this value in the Advanced Customisation > Sandbox > Parameters field as, e.g., {disklimit: 100}.

Caveats
  1. I haven't often used this parameter so am not totally confident that it works as expected.
  2. Jobe uses an old version of the domjudge runguard.c package which limits resource usage, including filesize, using setrlimit. If the limits are exceeded you normally get a custom Jobe error message. I've never seen SIGXFSZ, but from what I'm seeing on the web, this should only occur if the executable code is linked with unix95.o. I'm not sure how compatible runguard is with unix95.o.
En respuesta a Richard Lobb

Re: Signal 25 with c# question

por Mark Stern -
That did not help. The files it is creating do not seem that big anyway. So I tried uploading them (as a tar file) and untarring them in the code. That worked. However, when I build the project using dotnet, I am back to signal 25.
En respuesta a Mark Stern

Re: Signal 25 with c# question

por Richard Lobb -
I assume you've tried with a stupidly large version of disklimit, like 2000?

Have you also set the memlimit to 0, since the default value is almost certain to fail if you're running dotnet with python? That disables the memory limit altogether which might not be a good idea in a production server but is best for testing. Also try increasing numprocs with the sandbox parameter setting, e.g. {"disklimit": 2000,"numprocs":1000} [I see I missed the quotes in the command earlier - hopefully you fixed that error?]
En respuesta a Richard Lobb

Re: Signal 25 with c# question

por Mark Stern -
OK, I tried all that, but I am still getting signal 25.

I found
https://coderunner.org.nz/mod/forum/discuss.php?d=323

It seems that others have tried to do this, and failed. For now, I think the only solution is to use Mono.
Mono is not a good solution, because it is no longer being maintained (as far as I can tell) and is already
6 versions of C# behind. However, until somebody fixes CodeRunner to work with dotnet, it is probably
the best I can do.