The book “Operating System Principles” by Silberschatz, Galvin and Gagne says that in most Operating Systems, the method of handling deadlocks is to ignore deadlocks altogether and pretend that they never occur in the system. Further, it says that both Windows and UNIX use this solution. I researched a bit on the Internet and found that indeed it was a bug in the latest Ubuntu 2.6.27-* Kernels and the Ubuntu community was working on it to make sure the newer kernels don't fall prey to this problem.
I had learnt to live with the shortcoming until today when luckily I found a workaround for the problem. It turns out that switching off the "Assistive Technologies” does the trick.
Go to System > Preferences > Assistive Technologies
uncheck the "Enable Assistive Technologies" options.