[Request] Web frontend for drgn
Hello,
Thanks for presenting drgn at kernel-recipes. It's nice to see the debugging is still getting some attention :)
In its current state, drgn is very alike crash (which already has plugins). But as you explained the main interest is it's a library. So, it's an opportunity to have a game-changer interface that would greatly increase debugging speed & ease.
For example, my usual workflow when debugging kernel is:
- get global system information: model, uptime, loadavg, psi, number of process,
- read dmesg logs
- get system opened files, memory usage, slab
- get running/blocked process details: process memory, threads, opened files, timers, ipc...
- check other shared components (rcu, timers, locks, scheduler...)
As we don't know anything at first, I tend to scratch a bit of everything, copying the output in multiple text-files for later. Sometimes I reuse code done for another debugging, or add external module debuginfo. All of these actions would be similar to a JupiterLab, but with dedicated parts, like the list of processes to be accessed easily, or some other global runtime elements (locks, pages, slab...)
There's also many advantages for a web interface when debugging complex issues:
- when wworking with multiple vendors, no need to send them the heavy coredump, sometimes with "confidential" information, so hard to allow to export
- you can work easily with multiple people without the struggle to get the environment working for analysis (eg, debuginfo)
- can see and reuse snippets of code, driver developpers can easily check it
If we can have an interface where all these actions are easy and automated, that would be a game-changer (at least for me :smile: )
Cheers !
If I understand what you're requesting, it sounds really useful. Having process, file, memory, and other information readily parsed and available in a web UI (or some other equally discoverable UI) would be great. It would help understand the context of an issue, discover things you wouldn't have previously seen, etc. I like the idea of being able browse the basics of a core dump without needing to run a command.
That said, I think this is a great opportunity to build something on top of drgn, and not really something which would be suitable to make part of drgn itself. As you said, drgn's main purpose is to be a library giving you all the capabilities of a debugger, so anybody can write this tool based on drgn.
You could start by implementing the code to extract the data you want in drgn, and then have your script generate static HTML pages in a ZIP archive. This would achieve a lot of the goal: you can generate a lightweight web report and send it to people.
I know I'd love to take a look at anything you come up with :smiley: