ljudge icon indicating copy to clipboard operation
ljudge copied to clipboard

How to determine fopen-filter parameters

Open reAsOn2010 opened this issue 3 years ago • 0 comments

Hi, Quark.

we(PTA) are trying to run ljudge on new kernel (5.4+, for preparing upgrade OS to ubuntu 20.04), and the fopen-filter is broken when running c# program.

{
  "compilation": {
    "log": "",
    "success": true
  },
  "testcases": [
    {
      "error": "lrun exited with non-zero (14)",
      "result": "INTERNAL_ERROR",
      "stderr": "ERROR: cannot mark path (Invalid argument)\n",
      "stdout": ""
    },
    {
      "error": "lrun exited with non-zero (14)",
      "result": "INTERNAL_ERROR",
      "stderr": "ERROR: cannot mark path (Invalid argument)\n",
      "stdout": ""
    }
  ]
}

the c# lrun args:

--syscalls
!execve,flock,ptrace,sync,fdatasync,fsync,msync,sync_file_range,syncfs,unshare,setns,clone[a&268435456==268435456],query_module,syslog,sysfs
--fopen-filter
m:/proc:.*/(maps|comm)$
a
--fopen-filter
m:/proc:
d
--hostname
ljudge

if I remove all "--fopen-filter" parameters, it will work.

--syscalls
!execve,flock,ptrace,sync,fdatasync,fsync,msync,sync_file_range,syncfs,unshare,setns,clone[a&268435456==268435456],query_module,syslog,sysfs
--hostname
ljudge

All other languages run well on kernel 5.4 +, except C# and VB. They are all compiled by mono and run as *.exe. The compiler installation Dockerfile is here:

ARG BASE_IMAGE

# install language specified thing
FROM ${BASE_IMAGE}

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
    apt-get install -y tzdata mono-mcs mono-vbnc && \
    apt-get clean && \
    apt-get autoremove -y && \
    rm -rf /var/lib/apt/lists/

I'd like to know how to determine "--fopen-filter" parameters, and why currently only java and mono having these params. And if I really remove these params for C#, is it safe?

reAsOn2010 avatar Sep 14 '21 07:09 reAsOn2010