-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
collector's dump doesn't work with ARCH=um kernel #47
Comments
On Tue, 2013-06-04 at 08:36 -0700, Markus Stenberg wrote:
open that to avoid needing to move files around on the file-system etc.
could try something yet more evil if that fails; we could try reading
to (potentially) search any sort of address that the OS might use for
[email protected] <><, Pseudo Engineer, itinerant idiot |
My preferred choice would be just to provide some way to send signal to collector to dump state (+ possibly exit) - that way, no need for IPC, and handles the general case 'well enough'. E.g. give dump location on command line when starting collector, then kill - collector => dump occurs (+- exit happens). |
Urgh, this eats html-ish less and greater characters, or at least doesn't show them in editor. At any rate, my point was to use kill -SOME_SIGNAL collector to cause the dump (+ possibly exit) to happen. |
On Tue, 2013-06-04 at 10:20 -0700, Markus Stenberg wrote:
(IIRC) significantly different from the rest of the system's view of
right ? ;-)
[email protected] <><, Pseudo Engineer, itinerant idiot |
Ah, true, I don't use initrd so didn't think of that. As collector is parent of the real init, the real init will have pivoted to non-initrd root at some point leaving collector stranded in initrd case. So I guess POSIX or System V shared memory (shm_open / shmget) would be probably the most portable way to handle it. Hmm. Starts to sound painful.. |
Using ptrace is also problematic with grsec kernel, as well as container setups. shm_open does not likely work because it connects shared memory using files in /dev/shm/. shmget might work as it's implemented on linux kernel level. How about using UNIX sockets with abstract names? Those are not connected to file systems, and should be pretty universal. Or binding TCP/IP loopback address? Though, this would need to monitor IP-addresses and bind after loopback IP is configured. |
For some reason, UML kernel images are MMU-enabled, but never have stack entry in /proc//maps. Therefore, the collector's --dump fails at them as they fail to find [stack].
Any chance of adding some other way of dumping state? At a guess, just shared memory, mmap, or something would work with less of a hard dependency on /proc + luck in stuff not breaking.. ;)
(find_chunks in dump.c fails if [stack] occurs on 1kb block's border too, so not very fond of it.)
The text was updated successfully, but these errors were encountered: