Thanks to visit codestin.com
Credit goes to github.com

Skip to content

python run error of ptrace #16

@GZSCloud

Description

@GZSCloud

Hello, this is not a issue, just a error in ptrace.

run script:
./runprog --add-readable "" --add-readable-raw "" --add-writable "" --add-writable-raw "" --allow-proc=true
--err "" --in "" --memfd=false --ml 10000 --ol 10 --sl 1024 --out "" --runner "ptrace"
--show-trace-details=true --tl 100 --rtl 200 --type "python3" --unsafe=false /usr/bin/python3 server_nochain.py --ip 10.10.22.7 --world_size 3 --round 6

The server_nochain.py is a distrbuted training python program writed with pytorch, the prototcol is Gloo. usr/bin/python3 server_nochain.py --ip 10.10.22.7 --world_size 3 --round 6 running ok.

There is a error in ptrace:
sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue, aa, unlink_now)
PermissionError: [Errno 13] Permission denied

Semaphore lock involves shm, sem and /dev/shm/ directory Read/Write, the Allows of the config.go is:
// default write permission files
defaultWritableFiles = []string{
"/dev/null", "/tmp/", "/var/tmp/", "/dev/shm/", "/home/k8s01/fedlab/",
"/usr/lib/python3.10/multiprocessing/", "/home/k8s01/.local/lib/",
"/proc/self/"}

defaultSyscallAllows = []string{
// new for sem_open
	"shmget", "shmat", "shmctl", "shmdt",
	"semget", "semop", "semctl", "semtimedop", "epoll_create1", "poll", "sched_setaffinity", "mbind", "prctl", "io_cancel",

"python3": {
	Syscall: SyscallConfig{
	ExtraAllow: []string{
    	    "futex", "getdents", "getdents64", "prlimit64", "getpid", "sysinfo", "getrandom", "uname", "clone3",
	    "set_tid_address", "set_robust_list", "getuid", "gettid", "geteuid", "getegid", "getgid",
	    "socket", "bind", "listen", "accept", "connect", "sendto", "recvfrom", "shutdown", "pipe", "pipe2",
	     "clock_nanosleep", "wait4", "rseq",
	},

would you please give me some advices, Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions