190 points · by 0x41534446 · 4y ago · 44 comments
Raw gdb against vmlinux is really doing it hard though. How about crash with pykdump?
On a embedded targets you'd have a JTAG port for full out of band debugging, but that's obviously not an option for your typical desktop scenario.
Another key element that makes this so useful to me is that I work on a macbook (gasp), and hacky stuff I have to do in that context is the first source of blame when e.g. a header gives weird type issues.
Thank you so much for putting this together.
PS: If you're using a case-insensitive APFS, Linux kernel compilation will fail. I'm already aware of that
What is the point, then, of doing all this in docker containers? If you're virtualizing with qemu anyway then why containerize?
I was expecting something like software (non-kvm) emulation in a userspace process in an unprivileged container, or perhaps UML, real brain-in-a-jar stuff.
I don't know how well this deals with caches and so, though.
- Minimal host system requirements as kernel tool chains can be very much a pain to set up correctly. If I want to compile different kernel versions for different architectures this seemed liked a good trade-off. - I wanted to encapsulate every major logic component into a separate instance so working on the individual components does not require building one insanely large image.
Also note this is very much an early prototype and me just experimenting. Nothing is set in stone yet. Things are likely to change along the way.
You're exactly right. Docker does pretty much almost nothing here
For real, dockerizing stuff has become a meme lately
What it (actually) does it simplifying dependencies. But you know, most of the time if you can run docker you can install stuff locally
Docker has a significant performance penalty unless you're running Linux already
Containers solve real problems and are here to stay. Feel free not to use them, but saying they're a meme is just trying to be edgy.
Keep on containerising applications.
Sincerely, a sysadmin that has been fighting conflicting dependency requirements, deprecated packages and major distro upgrades for more than a decade.
What's a meme is creating a container for any minor thing like npm + some js project. Or to run one Go binary.
> a sysadmin
Sure, for the deployment of stuff containers are very good. But you know people were using stuff like chroots before that right?
I don't think I'm deploying this debugging system in a webserver.
Ah yes, the famed Windows/macOS kernel developer... :)
(Not that it's not possible of course, I just found it chuckle-worthy within the context of this article)
My understanding, interruptions is in essence signal processing. hard means hardware chip guartantee the reliablity. soft means signal are just memory address that can be easy wiped out.
For this project, in order to have a kernel to debug, they run a separate kernel inside the qemu virtual machine emulator. qemu is a normal userspace process, and therefore that process can run inside a Docker container. So the kernel being debugged has interrupts, but the "hardware" generating those interrupts (and all the other "hardware," including the CPU itself) is all just software emulating a PC.