Packages arduino and arduino-core were not installed. I was running from a directory created from a downloaded tarball.
I reinstalled the openjava packages, no notable effect.
I installed real Java, jre 7.0.15. I'm still seeing the same behavior. I turned on Java verbose logging, and went back to basics, loading the Blink example and running the arduino shell script as root.
I noticed there seems to be angst over /dev/ttyACM0. Once I saw this log:
RXTX fhs_lock() Error: creating lock file: /var/lock/LCK..ttyACM0: File exists
However, I can't reproduce that event now. I noticed a few times the /dev/ttyACM0 choice disappeared from the IDE Tools-Serial Port menu.
I can live with the menu slowness, but the unresponsiveness and unpredictability of uploads is driving me nuts. I disable Automatic Software Reset on all my Arduinos and use the reset button when doing uploads. I used to be able to just hit the reset button as soon as I saw "Uploading...". Now avrdude may load up immediately or up to 30 seconds later, which screws up the timing and makes the upload fail.
Here are verbose Java logs (omitting the logs during compilation):
Binary sketch size: 7,614 bytes (of a 32,256 byte maximum)
/home/joe/Documents/arduino-1.0.3/hardware/tools/avrdude -C/home/joe/Documents/arduino-1.0.3/hardware/tools/avrdude.conf -v -v -v -v -patmega328p -carduino -P/dev/ttyACM0 -b115200 -D -Uflash:w:/tmp/build450924210641535177.tmp/rig_library_test.cpp.hex:i
avrdude: Version 5.11, compiled on Sep 7 2011 at 19:34:16
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/home/joe/Documents/arduino-1.0.3/hardware/tools/avrdude.conf"
User configuration file is "/home/joe/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Send: 0 [30] [20]
avrdude: Recv: R [52]
avrdude: stk500_getsync(): not in sync: resp=0x52
avrdude done. Thank you.
I noticed one time when playing with the Blink sketch that if I hit Upload again and again, avrdude started getting more responsive and after about the eighth time it loaded up immediately and I was able to do a successful upload with my normal hit-the-reset-button timing.
None of this would appear to be memory or CPU related. This is on a two proc box with a system load normally in the .1 area, never going above 1.5, and lots of idle time. There is 4GB of memory, used is around 2.4 GB at the moment. There is nothing notable in /var/log/syslog, like the USB device going into the weeds.
I suppose I could enable ASR again on my boards and live with the delay with avrdude, though I hate to admit defeat :-). Maybe I could write a wrapper around avrdude to see when it's actually getting called, though not sure if that would be of any help.