judge-server icon indicating copy to clipboard operation
judge-server copied to clipboard

cptbox multiprocess support

Open quantum5 opened this issue 9 years ago • 8 comments

cptbox, after #188, should logically implement multiprocess debugging support. This may one day permit the implementation of a BASH language, if we manage to limit what it can exec.

quantum5 avatar Jul 23 '16 20:07 quantum5

Now, everywhere we use kill, i.e. shocker, protection faults, we have to kill by pgid, which for cptbox-based process trees is -pid of the first child. (Even though monitor does attempt to kill all children that it is aware of, it's still unwise to rely on the fact.)

quantum5 avatar Jul 23 '16 23:07 quantum5

Debian/kFreeBSD jessie does not have PT_FOLLOW_FORK defined. However, passing 23 works.

quantum5 avatar Jul 23 '16 23:07 quantum5

Isn't this complete?

Riolku avatar Sep 07 '21 02:09 Riolku

No, this is not implemented in a safe manner yet, or we'd have shell executors on DMOJ :)

Xyene avatar Sep 07 '21 02:09 Xyene

Will landlock allow this to be cleaned up?

Riolku avatar Sep 07 '21 02:09 Riolku

Yes, that's one of the biggest missing pieces.

Xyene avatar Sep 07 '21 02:09 Xyene

Would we need to only allow bash when paired with landlock? I guess so... is the other option to stop all processes when a file access happens?

Riolku avatar Sep 07 '21 02:09 Riolku

Yes, and ensure that they actually all get stopped, which sounds painful. We'd probably want to have some non-bash-builtins too, but this is super low-priority so hasn't been given much thought.

Xyene avatar Sep 07 '21 03:09 Xyene