You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! It seems that the cg2 branch does not work on Fedora. I have tried running multiple kernel versions (6.2, 6.5, 6.6) and multiple Fedora versions (38, 39), and they all seem to corrupt the cf_cg_root variable after the clone() syscall. Ubuntu 23.10 does not seem to have that problem.
I tried doing some small printf debugging and it seems that in the proxy process, cf_cg_root points to the same memory, but it's partially overwritten. Of note is that cf_cg_root is correct in the main isolate process until clone, but also getting overwritten with junk after the clone call (the pointer stays the same, so it's not a stack space issue). That means that the heap is somehow corrupted.
I also have a virtual machine running ubuntu 23.10 (kernel 6.5, but also works after using the mainline 6.6.7 kernel) and isolate behaves properly in that environment, so something is probably wrong with shared memory on Fedora.
For what it's worth, I have the isolate-cg-keeper running and /var/run/isolate/cgroup points to the correct directory.
I will update this issue after testing on other distributions, to get the common denominator and hopefully document a fix.
UPDATE: Arch Linux works. Rocky Linux 9 works (though is not a good isolate cg2 host since it uses kernel 5.15).
Steps to reproduce:
Set up any Fedora VM (if using kvm, the downloads page has a qcow2 image for easier install);
checkout to cg2 branch, set it up;
isolate --cg --init;
isolate --cg --run /usr/bin/time (or any program);
You will see in stdout: Cannot write <non-ascii chars>/box-0/cgroup.procs: No such file or directory.
The text was updated successfully, but these errors were encountered:
Hello! It seems that the
cg2
branch does not work on Fedora. I have tried running multiple kernel versions (6.2, 6.5, 6.6) and multiple Fedora versions (38, 39), and they all seem to corrupt thecf_cg_root
variable after theclone()
syscall. Ubuntu 23.10 does not seem to have that problem.I tried doing some small printf debugging and it seems that in the proxy process,
cf_cg_root
points to the same memory, but it's partially overwritten. Of note is thatcf_cg_root
is correct in the main isolate process untilclone
, but also getting overwritten with junk after the clone call (the pointer stays the same, so it's not a stack space issue). That means that the heap is somehow corrupted.I also have a virtual machine running ubuntu 23.10 (kernel 6.5, but also works after using the mainline 6.6.7 kernel) and isolate behaves properly in that environment, so something is probably wrong with shared memory on Fedora.
For what it's worth, I have the
isolate-cg-keeper
running and/var/run/isolate/cgroup
points to the correct directory.I will update this issue after testing on other distributions, to get the common denominator and hopefully document a fix.
UPDATE: Arch Linux works. Rocky Linux 9 works (though is not a good isolate cg2 host since it uses kernel 5.15).
Steps to reproduce:
isolate --cg --init
;isolate --cg --run /usr/bin/time
(or any program);Cannot write <non-ascii chars>/box-0/cgroup.procs: No such file or directory
.The text was updated successfully, but these errors were encountered: