CRIU as a debug tool and replacement for google coredumper

I’m currently working on a CRIU images -> core dump conversion for CRIT(CRiu Image Tool) and while looking for some info on manually generating core dump, I’ve found an interesting yet outdated (OMG last changed in 2007!) project called google coredumper that allows generating core dumps whenever you want to, which looks like a cool tool to have for debugging. CRIU is able to dump processes at any point too, but it is also providing a lot more info about the process’ state, because it can literally fully restore it from images, so I thought that coredump users (if there are any left) could use CRIU for their purposes....

April 7, 2015 · 1 min · 181 words · Ruslan Kuprieiev

How to set PID using ns_last_pid

So there is this cool project called CRIU (Checkpoint/Restore In Userspace). And I was wondering how it gets certain PID when restoring a process. I always thought that it is not possible to set PID without some kind of kernel hacking. I did some investigation and here is what I figured out. There is a file /proc/sys/kernel/ns_last_pid, which contains the last PID that was assigned by the kernel. So, when the kernel needs to assign a new one, it looks into ns_last_pid, gets last_pid, and assigns last_pid + 1....

June 14, 2014 · 2 min · 338 words · Ruslan Kuprieiev