trouble uploading on ubuntu 12.04

I have no idea how many times I've removed that lock, but at least 50 times.

The lock comes up every time I try to upload to my arduino. The lock is not there before I click "upload", but once I click upload I get the error about how the Arduino IDE can't open the serial port and the lock appears.

Clearly the Arduino IDE or one of its libraries is locking the serial port and preventing the IDE from talking to the device. It sure sounds like a bug in the IDE, an incompatibility between the IDE and a library on my system, or a driver issue. Any thoughts on how to debug?