Coder Social home page Coder Social logo

Comments (17)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
except CentOS, other OS is 32bit.

Original comment by method4libe on 4 Apr 2010 at 7:12

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
1.The Judger seems working with SunJDK only, you might need to check the 
default JVM
installed by the distribution.
   java -version

2.need more info on it ...

Original comment by [email protected] on 4 Apr 2010 at 12:46

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
about 2

i've check the judge_client 

when INPUT FILE is bigger than 32M or illegal syscalls happened 

Judger may tell RE in general

try using debug mode judged by load with:

   $sudo judged debug

rejudge the solution see if there is log print out on console like :

 [ERROR] A Not allowed system call: runid:%s callid:%d

with callid and ncalls.h to check the illegal calls for further debug.

Original comment by [email protected] on 4 Apr 2010 at 2:17

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
Here is the output for version in CentOS 5:
libe@lavida:/home/libe$ [2] javac -version
javac 1.6.0_14
libe@lavida:/home/libe$ java -version
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode)

and it's a message for a java solutino
[root@lavida judge_client]# ./judge_client 22933 0 0 // last zero is for debug 
mode
Error occurred during initialization of VM
Cannot create VM thread. Out of system resources.
Segmentation Fault

Original comment by method4libe on 4 Apr 2010 at 2:31

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
For question 2, I'll check the size of input.

I have a another question, in the judge system, accessing "/dev/urandom" 
consider as 
invalid system call?

Original comment by method4libe on 4 Apr 2010 at 2:39

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
judger is using a chroot env 
so linux file system should not be used for programing
you can use stdlib.h and other c99 or ansi lib/headers

Original comment by [email protected] on 4 Apr 2010 at 3:32

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
is it possible that your memory limitation is too small that not enough to 
start a 
jvm ?

Original comment by [email protected] on 4 Apr 2010 at 3:36

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
I don't think so ram size of that machine is 512MB. 
without judger, javac works well.

I wonder 64bit operating system isn't suitable to the judge system.

Original comment by method4libe on 4 Apr 2010 at 4:48

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
i mean the "problem"'s limit in database 
   select memory_limit from problem where problem_id=YOUR_PID

Original comment by [email protected] on 5 Apr 2010 at 12:47

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
I changed memory_limit to 16M, 128M and 512M, but results are same - Out of 
system 
resources. Also I erase line 430 to 450 in judge_client.cc (for resource 
limitation), 
CE doesn't occurs, but RTE with sig=9 occurs.

Original comment by method4libe on 5 Apr 2010 at 5:28

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
i just remember this, you would like to check:

grep 1536 /etc/passwd

should print:

judge:x:1536:1536::/home/judge:/bin/sh

or you've not create the account for judge to run solution with 

check judge_client search setuid(1536);

Original comment by [email protected] on 5 Apr 2010 at 7:36

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
I check it.
[root@lavida libe]# grep 1536 /etc/passwd
judge:x:1536:1536::/home/judge:/bin/bash

Original comment by method4libe on 5 Apr 2010 at 10:37

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
C++ solution doesn't no problem but Java solution doesn't works well.

Original comment by method4libe on 5 Apr 2010 at 10:37

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
assume your Java programe is Main.java and compiled as Main.class

use strace –c to trace the syscalls used by jvm:

     strace –c java -cp . Main

check the last column of the output, compare it to ncalls.h and okcalls.h

make sure all it's syscalls is enabled in okcalls.h as a array vector

if this works ,we can add a new file named as okcalls64.h

Original comment by [email protected] on 5 Apr 2010 at 11:43

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
I'll do that soon, but before doing that task, I think I have to fix the error 
during 
compilation phase. 

I code following code:
int main() {
    struct rlimit LIM;
    LIM.rlim_max=5;
    LIM.rlim_cur=5;
    setrlimit(RLIMIT_CPU,&LIM);

    LIM.rlim_max=32*STD_MB;
    LIM.rlim_cur=32*STD_MB;
    setrlimit(RLIMIT_FSIZE,&LIM);

    LIM.rlim_max=256*STD_MB;
    LIM.rlim_cur=256*STD_MB;
    setrlimit(RLIMIT_AS,&LIM);

    char *argv[] = { "javac", "Main.java", NULL };
    execvp( "javac", argv );
}

during execution javac doesn't work(Out of system resources).

I tried to erase statements for RLIMIT_FSIZE and RLIMIT_AS, javac works. Does 
removing those statement in judge_client.cc is safe for OS?

Original comment by method4libe on 5 Apr 2010 at 2:42

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024
javac is only compiler not JVM, so i think you can safely remove that 
limitation to
javac, but not for java.

or you can enlarge the multi-number until it doesn't report error.

Original comment by [email protected] on 6 Apr 2010 at 12:45

from hustoj.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 5, 2024

Original comment by [email protected] on 5 Jun 2010 at 4:58

  • Changed state: Duplicate

from hustoj.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.