The following is an actual discussion that I had with a co-worker just yesterday. When I finished, I had a really stupid nerdy grin on my face and thought "man, I love being a Linux software developer".
Copyright 2013, Kevin Farley (a.k.a. sixdrift, a.k.a. neuronstatic)
co-worker: Hey Kevin, the hardware is rebooting before our rollback can complete, any ideas?
me: Let me look... { spend a few minutes scanning code } not sure, let's see what my snapshot log has to say.
{ We spend a few minutes looking at my cryptic snapshot log, cryptic because when doing embedded software on devices you don't have the luxury of huge hard drives. Space is at a premium, so my logs are snapshot in a very compact format. }
me: Ok, I think the watchdog is getting unhappy because no one is petting him. When you are rolling back, it holds my stuff off too long, so it stops petting the watchdog, which gets angry, bites my butt, and then reboots.
co-worker: That makes sense, it seems like watchdog was unhappy and then hiked a leg.
me: So I need to find a way to keep petting watchdog while babysitting your stuff. Just curious, how long could it take?
co-worker: Maybe 10 minutes? No more than 15?
Me: Ok, so here is what I will do, I will summon a ghost of myself to start petting the watchdog when I have to babysit your stuff. I don't want the ghost to remain forever, so I will limit how long he can linger to pet the watchdog.
co-worker: Good, then if it takes too long, your ghost stops, and the watchdog can get unhappy again and reboot to fix things.
Me: Right. But I also need to make sure I tell the reaper about the ghost. Once I fork the ghost, I'll add him to the reaper's soul list. So once the ghost is done and turns into a zombie, the reaper can harvest his soul and dismiss the zombie.
co-worker: What if we complete really early? Are you going to allow the ghost to stick around anyway?
Me: No. I think the ghost will get in the way of my normal petting of the watchdog. I will tell the punisher to add the ghost to the hit list. Then we you are done and I don't have to babysit you, I'll tell the punisher to do a hit on his hitlist. That will make sure to kill the ghost, causing him to become a zombie, so the reaper will come along and harvest his soul.
co-worker: Sounds like a plan.
Me: You know, only in Linux can I say these kinds of things and people not think I am playing some fantasy role-playing game.
:-)
Copyright 2013, Kevin Farley (a.k.a. sixdrift, a.k.a. neuronstatic)
No comments:
Post a Comment