9 ms·
Thoughts on Microsoft's Time-Travel Debugger
- jtl999 9y agoVery cool. I seem to recall geohot doing similar to TTD in the past?
- rjeli 9y agohttps://youtu.be/eGl6kpSajag https://youtu.be/eGl6kpSajag
- Cyph0n 9y agoDamn, is he actually that humble or is it just a persona? Skip to around 4:15 for the actual content.
- kayoone 9y agoHe's a smart kid and obviously likes himself to a degree that gets a bit annoying but his achievements are quite something. I still find the presentation style pretty entertaining.
- eropple 9y agoThat's actually him. The stories of his shitty behavior when he was in college and Didn't Have To Do The Work Because Don't You Know Who I Am (which didn't work out so well) still circulate in my friend groups.
- jaybosamiya 9y agoYep, http://qira.me/ http://qira.me/
- roca 9y agoqira is cool but it doesn't scale. It singlesteps the program, recording the effects of each instruction in a fairly naive way. gdb's built-in reverse execution is similar. It's roughly a factor of 1000x slowdown and requires massive storage. Getting the overhead down to < 2x (for rr) or 10x (for TTD), with reasonable trace sizes, requires much higher tech ... and is absolutely necessary for most users.
- partycoder 9y agoWhat I personally do not enjoy as a developer about MS products is that eventually they hit end of life and you are left hanging. With open source stuff, if the project is used enough there will always be some maintainer.
- tluyben2 9y agoa) not true for reasons already given here b) they are(have) open sourcing a lot of developer stuff; I didn't check but would not surprise me if this ends up on github too if it didn't already with a good OSS license
- legulere 9y agoIt seems to me like it’s the other way around. Microsoft keeps comparability forever, which also has tons of negative consequences. With Linux it seems almost like you have to recompile everything anew for each system and each updates, where tiny differences in distributions can break things.
- partycoder 9y agoDepends on your choice of distribution. Some distribution will distribute compiled binaries for each architecture. And there are flatpaks that are distribution agnostic. For your own applications you will most likely use a container anyways and that gives you fairly reproducible builds.
- gcvbvghb 9y agoJust... go away. Thanks.
- partycoder 9y agoBackwards compatibility across releases of the same product, sure. But some products hit their end of life and that's it. If a product is deprecated, it may not receive security updates or fixes and such. As a user that puts you in a tough situation. Unfortunately as a user there's not a lot you can do to influence the governance of those products or try to do something to keep them around. If the vendor decides to sunset a product that's it. That's all I am trying to say.
- maxpert 9y agoAs the article talk mentions it as well; I wonder how good it scales for long running binaries and how well it integrates with stuff like .net native. I mean doing artificial demos on a dll is cool, but how well will it scale for say tracing bug in say a key-value store than runs for days and then crashes.
- ComputerGuru 9y agoAs far as I know, .NET Native isn't really something you're supposed to be running for development; just a target you compile to for maximum performance that should produce identical results (think of it as an uber-release mode).
- pjmlp 9y agoMicrosoft advises to regularly test .NET Native builds, to ensure UWP apps work properly when compiled at the store level.
- ComputerGuru 9y agoThat’s correct. I just imagine the kind of cases that would need a time travelling debugger _and_ only occur with .NET Native are not too many.
- Const-me 9y agoI’ve found and reported multiple critical bugs in .NET Native compiler. http://stackoverflow.com/q/34187890/126995 http://stackoverflow.com/q/34187890/126995 https://github.com/Const-me/EsentSerialize/commit/ea2cc7be58cdea02cf43d6e344317bbcd1643552 https://github.com/Const-me/EsentSerialize/commit/ea2cc7be58... The third one (only reported via e-mail), .NET Native fails to marshal custom COM interfaces implemented in C# classes to C++ libraries, at least on ARM for Win10 IoT. Maybe .NET Native should produce identical results, but in practice it doesn’t always do that.
- maxdo 9y agoRedux also has sort of time traveling :)
- 201709User 9y agoReplaying a chain of well-defined events. How impressive.
- sctb 9y agoSince it seems as though you won't post civilly and substantively, we've banned this account. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- mdriley 9y agoFor more on the x86 emulation and tracing tech that powers this, see: "Framework for Instruction-level Tracing and Analysis of Program Executions" (2006) https://www.usenix.org/legacy/events/vee06/full_papers/p154-bhansali.pdf https://www.usenix.org/legacy/events/vee06/full_papers/p154-...
- versteegen 9y agoAwesome, I hadn't heard of TTD. It's great to see reverse-debugging get serious attention rr sounds fantastic... unfortunately, I can't use it because AMD CPUs aren't supported (they simply don't have adequate performance counters; it's not rr's fault). With the exception of Ryzen, but even there, the performance counters apparently aren't entirely reliable (meaning sometimes the debugger will go haywire)
- timmisiak 9y agoFYI, Microsoft TTD is supported on AMD CPUs.
- testfailure 9y agonot sure if undodb supports these... they do x86 and arm though so maybe?
- themenace 9y agoThis has parallels with the secret groundbreaking military technology that "60 Minutes"[1] was talking about in 2008. When you have unlimited capacity to store data and the processing power to tag objects (or people!) in real-time when you play it back, all kinds of new possibilities arise for software or surveillance (good and evil). My assumption is that the revolutionary advance was military aerial camera systems (such as Angel Fire) that continuously record movement over an entire city in high resolution. When something happens, you can play it backwards to see who drove or walked where, who met whom, find all the connections between people, and trace events to the beginning. [1] http://www.cbsnews.com/stories/2008/09/04/60minutes/main4415771.shtml http://www.cbsnews.com/stories/2008/09/04/60minutes/main4415...
- euroclydon 9y agoThanks for sharing that. Interesting what constitutes a military breakthrough these days. A real nation-state with a military-industrial complex would just shoot that thing down.
- icegreentea2 9y agoBreakthroughs are situational. Many first tier militaries spend time thinking about urban pacification. Within those contexts, it really is a breakthrough. Just like how stealth aircraft were a breakthrough, and also totally useless in this situation.
- euroclydon 9y agoAgree, but comparing it to the tank, in WW1 or WW2, where industrialized nations were fighting each other directly is flawed.
- QAPereo 9y agoRemember Churchill? https://www.awesomestories.com/asset/view/Turing-s-Letter-to-Churchill-Produces-Action-This-Day- https://www.awesomestories.com/asset/view/Turing-s-Letter-to...
- j_s 9y agoTools like this have always been how Microsoft segments the highest-price "Ultimate" version of Visual Studio (or whatever MS marketing has renamed things this month). As best I can tell there is no mention in this article of how this feature will be priced, which winds up limiting how often it will be useful simply because of availability. Let me know when this shows up in the free SKUs ("Express") or perhaps even the drug-pusher-like "Community" (first hit is free, unless/until you're making money) edition. It is perfectly reasonable on their part as a company selling dev tools to do this; I just feel like I'm window-shopping, unable to actually afford the really cool bits. In my dreams I am way off base and this functionality is freely available for all now - I kind of have the feeling something similar been around for a while in the Ultimate SKU. (Also, let me know if this ever comes to managed code.)
- winterweaver 9y agoTTD is a feature of WinDbg (free), not VS.
- hexadecimated 9y agoIt's freely available in the Windows 10 store as "WinDbg Preview". I recall reading somewhere that they will be rolling it into the Windows SDK once the preview is complete. WinDbg can work with managed code through extensions, see https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugging-managed-code https://docs.microsoft.com/en-us/windows-hardware/drivers/de....
- jasode 9y ago>Also, let me know if this ever comes to managed code. For managed code, VS2010 (Ultimate) introduced Intellitrace for C# .NET code. It let you step "backwards" which is a form of "time travel". Since 2010, people have wondered if Microsoft was going to introduce a similar debugging capability for C++. It looks like they did -- but instead of reusing the previous "Intellitrace" brand and calling it "Intellitrace for C++", they've labeled it "Time Travel Debugging".
- j_s 9y ago
- todd8 9y agoThe idea of traveling forward and back in time in a debugger has been around for a long time, even before the era of modern programming the idea was explored and implemented. I recall conversations with people working on this in the 1970's, but I never saw one working in action. I've never had much use for debuggers. Of course I've had bugs that could have been found faster with debuggers, but I usually find myself using logs of the information I want to be quicker to work with. Of course this depends upon the program and the environment one is debugging in. I'd rather reason about the program statically than try to follow it dynamically in a debugger. On the other hand, one of the best kernel programmers I ever worked with carried his own debugger around and would implement it in a new kernel he was working on just so he could have it at hand. (That's you Dammon if you're out there!) [1969] Rand's Extendable Debugging and Monitoring System, https://www.rand.org/content/dam/rand/pubs/research_memoranda/2009/RM5772.pdf https://www.rand.org/content/dam/rand/pubs/research_memorand... [1988] Feldman, S.I. and Brown, C.B. (1988). Igor: A system for program debugging via reversible execution. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.85 http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.85. 2238&rep=rep1&type=pdf
- roca 9y agoThe idea has been around a long time. Making it practical has been a much more recent development. Ideas are cheap. If you're using logs, you're using a debugger, just a very limited one. Reasoning about a program statically is great, but once it gets above a certain size you can't keep it all in your head and you must collect data to narrow down the problem. That's where a debugger comes in. Then there are the cases where you're debugging someone else's code and you don't have it in your head in the first place.
- roca 9y agoOh yeah, and then there are the times when you reason about the program in your head and your reasoning is wrong. That happens a lot. Sometimes it's because of false but reasonable assumptions like "the compiler compiled my code correctly" or "the CPU executed my program correctly".
- dominotw 9y agoI could never get elm's time travelling debugger to work in practice. seemed to make sense due to concept of time in FRP https://www.youtube.com/watch?v=vS3yzUo7l8Y https://www.youtube.com/watch?v=vS3yzUo7l8Y hn discussion: https://news.ycombinator.com/item?id=7593032 https://news.ycombinator.com/item?id=7593032
- mandliya 9y agoAs a sql server dev at microsoft, this has been lifeline for debugging customer issues pretty quickly. It is slow without indexing, however once it is indexed, it works really well.
- bcherny 9y agoCould someone help explain how this is different from a regular debugger that lets you step back in the call stack? Does Chrome dev tools debugger (that lets you step back in the call stack, even for asynchronous calls) come close to TTD?
- natoliniak 9y agowhen you hit a break point in Chrome, you are suspending a live thread with current memory and stack state. This tool is more like a profiler, that instead of studying a current snapshot of the state, it will show you how the state changed over time. (also, this is for native apps)
- bcherny 9y agoI see. So for example, with a regular debugger you can see what the value of a function's argument was at a point in the current call stack; with TTD you can see what that argument was in previous call stacks too, and jump to those other call stacks?
- SteveJS 9y agoTDD allows you to recreate a full memory snapshot at an arbitrary point during the recorded execution. A regular debugger cannot tell you what was in a register or memory location previous to what is currently there now. TTD does allow that.
- bcherny 9y agoSo: - Without TTD, I can inspect values in the call stack where I set a breakpoint - With TTD, I can inspect values in my whole program, and can jump back/forward in time to see how those values changed Is that right?
- timmisiak 9y agoYup, you got it. Not just jumping back and forward, but seeking to points in time when memory changed. For instance... have some memory that got corrupted? With normal debugging you're probably out of luck unless you get some hints as to where it got corrupted. With TTD, you just set a memory access breakpoint and "run in reverse" until the memory is modified. It pinpoints the exact point in time where the memory got corrupted.
- pgh 9y agoFor Java there’s the Omniscient debugger ... http://omniscientdebugger.github.io/ http://omniscientdebugger.github.io/