Re:Show HN: Time travel debugger for web development
by bhackett on Wednesday September 15, 2021 @06:24PM
(#28545173)
We definitely need to avoid replaying from the start every time we want to inspect the state at some point. This is kind of an internal detail, but we can avoid having to replay parts of the recording over and over again by using fork() to create new processes at points within the recording.
Ordering constraints between different library functions do crop up from time to time. In cases like this the recorder library uses ordered locks internally (basically emulating the synchronization which the system library has to do) to ensure that the calls execute in the expected order when replaying.
Re:Show HN: Time travel debugger for web development
by glass_of_water on Wednesday September 15, 2021 @06:36PM
(#28545278)
Oh that's cool, using fork() to create checkpoints. Thank you again for taking the time to explain!
For question 3 on the ordering, I was imagining the following kind of scenario: one thread maybe calls a system library function to read a cursor position and another calls a system library function to write a cursor position. So even though they're separate functions, they interact with the same state. Do you require users to manually call to the recorder library to give the recorder runtime extra info in this kind of scenario? Sorry if this is a dumb question, I haven't really done any programming at this level.