4 ms·
This is an approach I use for reproducing issues on userspace applications as well. I happen to maintain a fairly large Windows-based application at my workpla
by heywire 12y ago
This is an approach I use for reproducing issues on userspace applications as well. I happen to maintain a fairly large Windows-based application at my workplace, and sometimes the steps to reproduce an issue could take minutes to hours just to get you to the point of being able to try and replicate the issue. I personally use VMware Workstation at work, and since I'm on a quick SSD, taking and reverting multiple snapshots has little performance cost.
- byuu 12y agoI've always thought it would be nice if the kernel exposed this ability to regular userland applications. On Unix systems, Ctrl+Z of a terminal application will suspend it, but not across reboots. Core files are very close, yet typically they are only produced in response to a crash, and aren't really meant for resuming a process. Obviously there's lots of limitations (eg shared memory could cause issues, hardware states could change), but for a lot of cases it would probably work pretty well. Not only is it great for triggering crashes, but if you then broke out into a debugger, you could toy with toggling register and memory contents and then single-step through the instructions to see what happens. It's really substantially easier to debug software under emulation because of features like these.
- sweettea 12y agoYou might enjoy rr, 'record-replay', which works kind of like gdb (and I believe is based on it) after you record a program execution --- you can then use gdb multiple times on the stream of execution. rr-project.org.
- amaranth 12y agoSounds like you're looking for the checkpoint/restore functionality that has been in the works for a few years now. Check out http://en.wikipedia.org/wiki/CRIU http://en.wikipedia.org/wiki/CRIU for more details, seems they have things mostly working now.
- ams6110 12y agoDragonFly BSD does this. They call it process checkpointing. Processes under DragonFly may be "checkpointed" or suspended to disk at any time. They may later be resumed on the originating system, or another system by "thawing" them. http://www.dragonflybsd.org/features/#index8h2 http://www.dragonflybsd.org/features/#index8h2
- hiphopyo 12y agoOpenBSD and FreeBSD call it suspend/resume I think: http://openbsd.org/papers/zzz.pdf http://openbsd.org/papers/zzz.pdf http://wiki.freebsd.org/SuspendResume http://wiki.freebsd.org/SuspendResume
- kasabali 12y agoThose links are talking about suspend/resume of the computer, which is a totally different thing.