Let me put it this way – the day did not go very smoothly at work. Anyways, Steve and I managed to close the day with couple of laughs and I headed back home close to 8:00 PM.

I was determined to make the best of what remained of the evening and thought Kung-fu Panda 2 may be a good way of bringing  closure to the day.

Reached home. Picked up my 8 year old son (R) and drove down to a Redbox kiosk. As we were getting in the car, on an impulse, I talked to him about what happened at work.  This is how our exchange went.

Me: ”R, I need to discuss a work problem. Do you think you can give me some advice ?”

R:“Sure !!!”

Me: ” Today we had a release”

R: “You mean an early release? like when my school closes early sometimes?”

Me: “Not really. We were releasing a new version of our software.”

Continue reading »

 

One of the most interesting problems I worked on was a deadlock between the JVM and the Database.

This blog post is a case-study of some sorts.
I will talk about the symptoms we saw, how we analysed the problem, and the solution.

Technologies involved
A J2EE web application running on Tomcat
Oracle Database

Remind me one more time – what is a deadlock ?
Deadlock happens when two (or more ) processes have acquired  a lock and are now waiting for the other process to release its lock first- before it can proceed further. Since each process would wait for the other process to complete first- it becomes a deadlock- i.e there is no way out unless someone intervenes.Oracle will immediately detect and  break the deadlock by killing one of the process, and I believe JVM also has a similar recovery process.

So what so special about this deadlock ?
When you have a deadlock across the two systems i.e one lock exists in the JVM and another lock in Oracle, it is impossible for either system to detect it- because they simply do not know about the existence of the other lock . Each system considers it as a uni-directional lock. Uni-directional locks aren’t a problem(generally). Deadlocks are . In our case, the lock in the JVM was by the usage of a synchronized block and the lock in Oracle was because of update on one table and a pending commit.  Both these locks would exist for ever. Why? Read on…
Continue reading »

Protected: Westford Expressions :Table topics for Nov 9th

 Misc.  Enter your password to view comments.
Nov 042009
 

This post is password protected. To view it please enter your password below:


© 2011 Technology Cafe Suffusion theme by Sayontan Sinha