Ошибка с python3 в secure режиме

Обсуждение вопросов, связанных с системой проведения турниров ejudge.
Post Reply
shuhrat
Posts: 33
Joined: 07 February 2013, 22:50

Ошибка с python3 в secure режиме

Post by shuhrat » 25 September 2017, 22:50

Здравствуйте!

Вот такая ошибка при отправке решения в secure режиме для python3. Python 2 работает нормально

Code: Select all

Fatal Python error: getrandom() failed
При комплировании кода напрямую на сервере все работает корректно(python file.py).

cher
Posts: 1153
Joined: 13 March 2004, 17:00
Contact:

Re: Ошибка с python3 в secure режиме

Post by cher » 28 September 2017, 15:41

В патчах к ядрам 4.7 и 4.9 эта ошибка исправлена. Нужно обновить ядро, например, до 4.9.51

shuhrat
Posts: 33
Joined: 07 February 2013, 22:50

Re: Ошибка с python3 в secure режиме

Post by shuhrat » 05 October 2017, 09:38

Обновил ядро до 4.9.51. Все равно таже ошибка ML.

Code: Select all

Fatal Python error: getrandom() failed

cher
Posts: 1153
Joined: 13 March 2004, 17:00
Contact:

Re: Ошибка с python3 в secure режиме

Post by cher » 05 October 2017, 16:01

Ошибка ML? Что это значит?
python3 должен работать (и работает).

shuhrat
Posts: 33
Joined: 07 February 2013, 22:50

Re: Ошибка с python3 в secure режиме

Post by shuhrat » 05 October 2017, 22:07

cher wrote:Ошибка ML? Что это значит?
python3 должен работать (и работает).
Memory Limit exceeded вердикт на каждом тесте. Хотя программа простенькая.

cher
Posts: 1153
Joined: 13 March 2004, 17:00
Contact:

Re: Ошибка с python3 в secure режиме

Post by cher » 19 October 2017, 07:50

Может memory limit неадекватный?

на московской командной олимпиаде школьников по программированию никаких проблем с питоном не было

kroda
Posts: 11
Joined: 05 October 2016, 23:35

Re: Ошибка с python3 в secure режиме

Post by kroda » 28 February 2018, 19:38

Та же ошибка -- Fatal Python error: getrandom() failed на Python3 в безопасном режиме. Есть 2 ejudge: один с ядром - 4.9.83 и второй с 4.9.75. При отключении безопасного режима все работает. Не подскажете, в чем может быть ошибка?

kroda
Posts: 11
Joined: 05 October 2016, 23:35

Re: Ошибка с python3 в secure режиме

Post by kroda » 20 March 2018, 16:11

Ошибка Fatal Python error: getrandom() failed все еще остается. Есть ли какие-то варианты решения проблемы?

cher
Posts: 1153
Joined: 13 March 2004, 17:00
Contact:

Re: Ошибка с python3 в secure режиме

Post by cher » 20 March 2018, 20:00

Пришлите, пожалуйста, программу на питоне, для которой такое происходит.

kroda
Posts: 11
Joined: 05 October 2016, 23:35

Re: Ошибка с python3 в secure режиме

Post by kroda » 20 March 2018, 21:25

Да, в общем-то на любой, если включен флаг Run programs securely.
Сейчас я посылаю в первую задачу первого контеста код:
a = int(input())
b = int(input())
print(a + b)
На python3. Без флага все тестируется.

cher
Posts: 1153
Joined: 13 March 2004, 17:00
Contact:

Re: Ошибка с python3 в secure режиме

Post by cher » 21 March 2018, 21:56

Попробуйте выполнить следующие команды:

Code: Select all

cd ejudge/contest-1/problems/A/all_solutions
strace -f ejudge-execute --secure-exec /usr/bin/python3 ./a_python3.py < ../tests/001.dat
Какой будет вывод?

kroda
Posts: 11
Joined: 05 October 2016, 23:35

Re: Ошибка с python3 в secure режиме

Post by kroda » 21 March 2018, 23:26

Code: Select all

ejudge@olimpsrv:~/ejudge/contest-1/problems/A/all_solutions$ strace -f /home/ejudge/ejudge/ejudge-execute --secure-exec /usr/bin/python3 ./a_python3.py < ../tests/001.dat
execve("/home/ejudge/ejudge/ejudge-execute", ["/home/ejudge/ejudge/ejudge-execu"..., "--secure-exec", "/usr/bin/python3", "./a_python3.py"], [/* 24 vars */]) = 0
brk(NULL)                               = 0x22b2000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=105089, ...}) = 0
mmap(NULL, 105089, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f34d73d6000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\35\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=104864, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34d73d5000
mmap(NULL, 2199848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f34d6fb1000
mprotect(0x7f34d6fca000, 2093056, PROT_NONE) = 0
mmap(0x7f34d71c9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f34d71c9000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f34d6be7000
mprotect(0x7f34d6da7000, 2097152, PROT_NONE) = 0
mmap(0x7f34d6fa7000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7f34d6fa7000
mmap(0x7f34d6fad000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f34d6fad000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34d73d4000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34d73d3000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f34d73d2000
arch_prctl(ARCH_SET_FS, 0x7f34d73d3700) = 0
mprotect(0x7f34d6fa7000, 16384, PROT_READ) = 0
mprotect(0x7f34d71c9000, 4096, PROT_READ) = 0
mprotect(0x61e000, 4096, PROT_READ)     = 0
mprotect(0x7f34d73f0000, 4096, PROT_READ) = 0
munmap(0x7f34d73d6000, 105089)          = 0
getcwd("/home/ejudge/ejudge/contest-1/problems/A/all_solutions", 2048) = 55
brk(NULL)                               = 0x22b2000
brk(0x22d3000)                          = 0x22d3000
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x40e8b0, [CHLD], SA_RESTORER|SA_RESTART, 0x7f34d6c1c4b0}, {SIG_DFL, [], 0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
wait4(-1, 0x7ffc245a20b4, WNOHANG, 0x7ffc245a20c0) = -1 ECHILD (No child processes)
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
wait4(-1, 0x7ffc245a20a4, WNOHANG, 0x7ffc245a20b0) = -1 ECHILD (No child processes)
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
wait4(-1, 0x7ffc245a20a4, WNOHANG, 0x7ffc245a20b0) = -1 ECHILD (No child processes)
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
wait4(-1, 0x7ffc245a20b4, WNOHANG, 0x7ffc245a20c0) = -1 ECHILD (No child processes)
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
clone(strace: Process 23523 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f34d73d39d0) = 23523
[pid 23522] wait4(23523,  <unfinished ...>
[pid 23523] ptrace(0x4281 /* PTRACE_??? */, 0, NULL, NULL) = 0
[pid 23523] exit_group(0)               = ?
[pid 23523] +++ exited with 0 +++
<... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 23523
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=23523, si_uid=1001, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn({mask=[]})                 = 0
wait4(-1, 0x7ffc245a2094, WNOHANG, 0x7ffc245a20a0) = -1 ECHILD (No child processes)
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
write(2, "task_Start: execv(2):", 21task_Start: execv(2):)   = 21
write(2, " /usr/bin/python3", 17 /usr/bin/python3)       = 17
write(2, " ./a_python3.py", 15 ./a_python3.py)         = 15
write(2, "\n", 1
)                       = 1
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
wait4(-1, 0x7ffc245a1be4, WNOHANG, 0x7ffc245a1bf0) = -1 ECHILD (No child processes)
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x40e8b0, [CHLD], SA_RESTORER|SA_RESTART, 0x7f34d6c1c4b0}, {0x40e8b0, [CHLD], SA_RESTORER|SA_RESTART, 0x7f34d6c1c4b0}, 8) = 0
getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024*1024}) = 0
pipe([3, 4])                            = 0
dup2(3, 1021)                           = 1021
dup2(4, 1022)                           = 1022
close(3)                                = 0
close(4)                                = 0
fcntl(1022, F_SETFD, FD_CLOEXEC)        = 0
clone(strace: Process 23524 attached
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f34d73d39d0) = 23524
[pid 23522] close(1022)                 = 0
[pid 23524] close(1021)                 = 0
[pid 23522] read(1021,  <unfinished ...>
[pid 23524] ptrace(0x4281 /* PTRACE_??? */, 0, NULL, NULL) = 0
[pid 23524] execve("/usr/bin/python3", ["/usr/bin/python3", "./a_python3.py"], [/* 24 vars */] <unfinished ...>
[pid 23522] <... read resumed> "", 4)   = 0
[pid 23524] <... execve resumed> )      = 0
[pid 23524] brk(NULL <unfinished ...>
[pid 23522] close(1021)                 = 0
[pid 23524] <... brk resumed> )         = 0xd3d000
[pid 23522] rt_sigprocmask(SIG_UNBLOCK, [CHLD],  <unfinished ...>
[pid 23524] access("/etc/ld.so.nohwcap", F_OK <unfinished ...>
[pid 23522] <... rt_sigprocmask resumed> [CHLD], 8) = 0
[pid 23524] <... access resumed> )      = -1 EPERM (Operation not permitted)
[pid 23522] wait4(-1,  <unfinished ...>
[pid 23524] access("/etc/ld.so.preload", R_OK <unfinished ...>
[pid 23522] <... wait4 resumed> 0x7ffc245a1e34, WNOHANG, 0x7ffc245a1e40) = 0
[pid 23524] <... access resumed> )      = -1 EPERM (Operation not permitted)
[pid 23522] rt_sigprocmask(SIG_BLOCK, [CHLD],  <unfinished ...>
[pid 23524] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 23522] <... rt_sigprocmask resumed> NULL, 8) = 0
[pid 23524] <... open resumed> )        = -1 EPERM (Operation not permitted)
[pid 23522] wait4(23524,  <unfinished ...>
[pid 23524] open("/lib/x86_64-linux-gnu/tls/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 23522] <... wait4 resumed> 0x7ffc245a2000, WNOHANG, 0x7ffc245a2050) = 0
[pid 23524] <... open resumed> )        = -1 ENOENT (No such file or directory)
[pid 23522] open("/proc/23524/stat", O_RDONLY <unfinished ...>
[pid 23524] stat("/lib/x86_64-linux-gnu/tls/x86_64",  <unfinished ...>
[pid 23522] <... open resumed> )        = 3
[pid 23524] <... stat resumed> 0x7fff4e53e130) = -1 ENOENT (No such file or directory)
[pid 23522] fstat(3,  <unfinished ...>
[pid 23524] open("/lib/x86_64-linux-gnu/tls/libpthread.so.0", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 23522] <... fstat resumed> {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
[pid 23524] <... open resumed> )        = -1 ENOENT (No such file or directory)
[pid 23522] read(3,  <unfinished ...>
[pid 23524] stat("/lib/x86_64-linux-gnu/tls",  <unfinished ...>
[pid 23522] <... read resumed> "23524 (python3) t 23522 23520 21"..., 1024) = 286
[pid 23524] <... stat resumed> 0x7fff4e53e130) = -1 ENOENT (No such file or directory)
[pid 23522] close(3 <unfinished ...>
[pid 23524] open("/lib/x86_64-linux-gnu/x86_64/libpthread.so.0", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 23522] <... close resumed> )       = 0
[pid 23524] <... open resumed> )        = -1 ENOENT (No such file or directory)
[pid 23522] rt_sigtimedwait([CHLD], NULL, {0, 100000000}, 8 <unfinished ...>
[pid 23524] stat("/lib/x86_64-linux-gnu/x86_64", 0x7fff4e53e130) = -1 ENOENT (No such file or directory)
[pid 23524] open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
[pid 23524] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260`\0\0\0\0\0\0"..., 832) = 832
[pid 23524] fstat(3, {st_mode=S_IFREG|0755, st_size=138696, ...}) = 0
[pid 23524] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4b439e3000
[pid 23524] mmap(NULL, 2212904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4b435a2000
[pid 23524] mprotect(0x7f4b435ba000, 2093056, PROT_NONE) = 0
[pid 23524] mmap(0x7f4b437b9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f4b437b9000
[pid 23524] mmap(0x7f4b437bb000, 13352, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4b437bb000
[pid 23524] close(3)                    = 0
[pid 23524] open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 23524] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
[pid 23524] fstat(3, {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
[pid 23524] mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4b431d8000
[pid 23524] mprotect(0x7f4b43398000, 2097152, PROT_NONE) = 0
[pid 23524] mmap(0x7f4b43598000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7f4b43598000
[pid 23524] mmap(0x7f4b4359e000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4b4359e000
[pid 23524] close(3)                    = 0
[pid 23524] open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
[pid 23524] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\r\0\0\0\0\0\0"..., 832) = 832
[pid 23524] fstat(3, {st_mode=S_IFREG|0644, st_size=14608, ...}) = 0
[pid 23524] mmap(NULL, 2109680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4b42fd4000
[pid 23524] mprotect(0x7f4b42fd7000, 2093056, PROT_NONE) = 0
[pid 23524] mmap(0x7f4b431d6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7f4b431d6000
[pid 23524] close(3)                    = 0
[pid 23524] open("/lib/x86_64-linux-gnu/libutil.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid 23524] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\16\0\0\0\0\0\0"..., 832) = 832
[pid 23524] fstat(3, {st_mode=S_IFREG|0644, st_size=10656, ...}) = 0
[pid 23524] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4b439e2000
[pid 23524] mmap(NULL, 2105608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4b42dd1000
[pid 23524] mprotect(0x7f4b42dd3000, 2093056, PROT_NONE) = 0
[pid 23524] mmap(0x7f4b42fd2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f4b42fd2000
[pid 23524] close(3)                    = 0
[pid 23524] open("/lib/x86_64-linux-gnu/libexpat.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid 23524] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0;\0\0\0\0\0\0"..., 832) = 832
[pid 23524] fstat(3, {st_mode=S_IFREG|0644, st_size=166032, ...}) = 0
[pid 23524] mmap(NULL, 2261096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4b42ba8000
[pid 23524] mprotect(0x7f4b42bce000, 2097152, PROT_NONE) = 0
[pid 23524] mmap(0x7f4b42dce000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x26000) = 0x7f4b42dce000
[pid 23524] close(3)                    = 0
[pid 23524] open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid 23524] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\35\0\0\0\0\0\0"..., 832) = 832
[pid 23524] fstat(3, {st_mode=S_IFREG|0644, st_size=104864, ...}) = 0
[pid 23524] mmap(NULL, 2199848, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4b4298e000
[pid 23524] mprotect(0x7f4b429a7000, 2093056, PROT_NONE) = 0
[pid 23524] mmap(0x7f4b42ba6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f4b42ba6000
[pid 23524] close(3)                    = 0
[pid 23524] open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 23524] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0V\0\0\0\0\0\0"..., 832) = 832
[pid 23524] fstat(3, {st_mode=S_IFREG|0644, st_size=1088952, ...}) = 0
[pid 23524] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4b439e1000
[pid 23524] mmap(NULL, 3178744, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4b42685000
[pid 23524] mprotect(0x7f4b4278d000, 2093056, PROT_NONE) = 0
[pid 23524] mmap(0x7f4b4298c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x107000) = 0x7f4b4298c000
[pid 23524] close(3)                    = 0
[pid 23524] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4b439e0000
[pid 23524] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4b439df000
[pid 23524] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4b439de000
[pid 23524] arch_prctl(ARCH_SET_FS, 0x7f4b439df700) = 0
[pid 23524] mprotect(0x7f4b43598000, 16384, PROT_READ) = 0
[pid 23524] mprotect(0x7f4b4298c000, 4096, PROT_READ) = 0
[pid 23524] mprotect(0x7f4b42ba6000, 4096, PROT_READ) = 0
[pid 23524] mprotect(0x7f4b42dce000, 8192, PROT_READ) = 0
[pid 23524] mprotect(0x7f4b42fd2000, 4096, PROT_READ) = 0
[pid 23524] mprotect(0x7f4b431d6000, 4096, PROT_READ) = 0
[pid 23524] mprotect(0x7f4b437b9000, 4096, PROT_READ) = 0
[pid 23524] mprotect(0x9a9000, 8192, PROT_READ) = 0
[pid 23524] mprotect(0x7f4b439e4000, 4096, PROT_READ) = 0
[pid 23524] set_tid_address(0x7f4b439df9d0) = 23524
[pid 23524] set_robust_list(0x7f4b439df9e0, 24) = 0
[pid 23524] rt_sigaction(SIGRTMIN, {0x7f4b435a7b50, [], SA_RESTORER|SA_SIGINFO, 0x7f4b435b3390}, NULL, 8) = 0
[pid 23524] rt_sigaction(SIGRT_1, {0x7f4b435a7be0, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f4b435b3390}, NULL, 8) = 0
[pid 23524] rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
[pid 23524] getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
[pid 23524] brk(NULL)                   = 0xd3d000
[pid 23524] brk(0xd5e000)               = 0xd5e000
[pid 23524] open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
[pid 23524] fstat(3, {st_mode=S_IFREG|0644, st_size=4234816, ...}) = 0
[pid 23524] mmap(NULL, 4234816, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4b4227b000
[pid 23524] close(3)                    = 0
[pid 23524] open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
[pid 23524] fstat(3, {st_mode=S_IFREG|0644, st_size=26258, ...}) = 0
[pid 23524] mmap(NULL, 26258, PROT_READ, MAP_SHARED, 3, 0) = 0x7f4b439d7000
[pid 23524] close(3)                    = 0
[pid 23524] futex(0x7f4b4359d8c8, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 23524] getrandom(0xa720b0, 24, GRND_NONBLOCK) = -1 EPERM (Operation not permitted)
[pid 23524] write(2, "Fatal Python error: getrandom() "..., 39Fatal Python error: getrandom() failed
) = 39
[pid 23524] rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
[pid 23524] tgkill(23524, 23524, SIGABRT) = 0
[pid 23524] --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=23524, si_uid=1001} ---
[pid 23522] <... rt_sigtimedwait resumed> ) = -1 EAGAIN (Resource temporarily unavailable)
[pid 23522] wait4(23524, 0x7ffc245a2000, WNOHANG, 0x7ffc245a2050) = 0
[pid 23522] open("/proc/23524/stat", O_RDONLY) = 3
[pid 23522] fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
[pid 23522] read(3, "23524 (python3) S 23522 23520 21"..., 1024) = 315
[pid 23522] close(3)                    = 0
[pid 23522] rt_sigtimedwait([CHLD], NULL, {0, 100000000}, 8) = -1 EAGAIN (Resource temporarily unavailable)
[pid 23522] wait4(23524, 0x7ffc245a2000, WNOHANG, 0x7ffc245a2050) = 0
[pid 23522] open("/proc/23524/stat", O_RDONLY) = 3
[pid 23522] fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
[pid 23522] read(3, "23524 (python3) S 23522 23520 21"..., 1024) = 315
[pid 23522] close(3)                    = 0
[pid 23522] rt_sigtimedwait([CHLD], NULL, {0, 100000000}, 8 <unfinished ...>
[pid 23524] +++ killed by SIGABRT (core dumped) +++
<... rt_sigtimedwait resumed> )         = 17
wait4(23524, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGABRT && WCOREDUMP(s)}], WNOHANG, {ru_utime={0, 0}, ru_stime={0, 4000}, ...}) = 23524
write(2, "Status: RT\n", 11Status: RT
)            = 11
write(2, "Signal: 6\n", 10Signal: 6
)             = 10
write(2, "Description: run-time error\n", 28Description: run-time error
) = 28
write(2, "CPUTime: 4\n", 11CPUTime: 4
)            = 11
write(2, "RealTime: 223\n", 14RealTime: 223
)         = 14
write(2, "VMSize: 27471872\n", 17VMSize: 27471872
)      = 17
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
wait4(-1, 0x7ffc245a20a4, WNOHANG, 0x7ffc245a20b0) = -1 ECHILD (No child processes)
rt_sigprocmask(SIG_BLOCK, [CHLD], NULL, 8) = 0
exit_group(2)                           = ?
+++ exited with 2 +++

cher
Posts: 1153
Joined: 13 March 2004, 17:00
Contact:

Re: Ошибка с python3 в secure режиме

Post by cher » 22 March 2018, 09:37

Попробуйте эту версию: https://ejudge.ru/download/linux-4.9.88 ... cher1.diff

kroda
Posts: 11
Joined: 05 October 2016, 23:35

Re: Ошибка с python3 в secure режиме

Post by kroda » 22 March 2018, 17:05

Да, все заработало! Спасибо!

Post Reply