Closed meithecatte closed 4 years ago
Surprised that the defaults are invalid, I decided to use the oiejq wrapper
It's not that the defaults are invalid, there are quite literally no defaults.
[user@personal-dev oiejq]$ uname -a Linux personal-dev 4.19.80-1.pvops.qubes.x86_64 #1 SMP Sun Oct 20 14:41:34 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Oh wow, a Qubes OS user. (No offence meant, just didn't expect the set intersection of Qubes users and competitive programmers to be non-empty.)
I don't know much about Qubes, but I can imagine that the paravirtualization might be getting in the way. For instance, sio2jail/oiejq doesn't work on most servers from most VPS providers, because the VM you get doesn't have CPU hardware performance counters passthrough from the host CPU. Perhaps Qubes is the same.
[user@personal-dev oiejq]$ sudo sysctl -w kernel.unpriviledged_userns_clone=1 sysctl: cannot stat /proc/sys/kernel/unpriviledged_userns_clone: No such file or directory
I've heard that the userns sysctl is gone in recent kernels, so this makes sense. Maybe the docs need updating — maybe not yet still.
Yeah, it's probably because of virtualization.
Could you try running perf list hw
and seeing if it outputs anything?
If it doesn't, it means the VM doesn't have access to performance counters.
I know on Xen it's possible to enable virtual performance counters (a.k.a. vpmu
), but I don't know how to do it on Qubes, or whether it's available/working on the version of Xen used by Qubes.
I don't know much about Qubes, but I can imagine that the paravirtualization might be getting in the way. For instance, sio2jail/oiejq doesn't work on most servers from most VPS providers, because the VM you get doesn't have CPU hardware performance counters passthrough from the host CPU. Perhaps Qubes is the same.
Thanks for the quick reply! I guess I'll try on some other machine and get back to you.
Oh wow, a Qubes OS user. (No offence meant, just didn't expect the set intersection of Qubes users and competitive programmers to be non-empty.)
Consider the intersection of (a) competitive programmers and cybersecurity enthusiasts, (b) cybersecurity enthusiasts and Qubes OS users.
Consider the intersection of (a) competitive programmers and cybersecurity enthusiasts, (b) cybersecurity enthusiasts and Qubes OS users.
Sorry, when I was in high school a few years ago the intersection of people I knew and (a)-as-defined-by-you was empty, save for one of the guys who later ended up writing sio2jail.
I've heard that the userns sysctl is gone in recent kernels, so this makes sense. Maybe the docs need updating — maybe not yet still.
See #22.
Could you try running
perf list hw
and seeing if it outputs anything?
As predicted,
[user@personal-dev oiejq]$ perf list hw
List of pre-defined events (to be used in -e):
[user@personal-dev oiejq]$
However, the tool seems to work just fine on my non-Qubes system. Sorry for the bother.
I am trying to use sio2jail as a local copy of the OI grading environment. I tried building the tool from source and running without any configuration options, which yielded this error:
Surprised that the defaults are invalid, I decided to use the
oiejq
wrapper, which I downloaded from the OIJ website. When that didn't work, I used thebash -x
option to extract the exact command used. The error in both cases was:Information that I feel might be related:
The failed sysctl might be significant, but as far as I understand, it only applies to the sandboxing features, which are disabled by oiejq.
What should I do to diagnose/fix this issue?