Dave W. Smith This could all be a lot simpler.

Still Alive

Hi. I’m still here. Been busy.

The short version: I took a new job, then we moved.

The slightly longer version: I joined Google. After working in narrow, sometimes obscure industries, or on things I couldn’t talk about, the chance to work on products that touch millions of people was compelling. Building things at Google scale is a bit beyond anything I’d taking on previously. That meant a lot of new stuff to learn, and a few things to unlearn. Discretionary time took a serious hit; many evenings have been given over to study. Then, partly because we missed living in Mountain View, and partly to get our daughter in to a well-rounded High School, we bought neat little house in Mountain View that needed some work, and camped out in it for several months while our furniture stayed in San Jose to help sell the old house. Now we’re looking ahead at doing some remodeling. Eeek. And, just as things were finally settling down, I signed on as a mentor for my daughter’s High School robotics team. The competition season starts in 10 days. Eeek. There goes the next few months. (Months? Maybe longer. We’ll see.)

Life has been… disrupted. Mostly in a good way. I don’t know that that means for this blog. We’ll see. I’ve learning a few things along the way. Time permitting, I’ll write about them.

Onward!


USB ehci_hcd woes

Posting to help the next person who runs into this problem and Googles for help.

I noticed that several log files in /var/log/ on my T400 running Ubuntu 10.04 were filling up with stuff like

... kernel: ... usb 2-4: new high speed USB device using ehci_hcd and address 17
... kernel: ... usb 2-4: device descriptor read/all, error -71
... kernel: ... hub 2-0:1.0: unable to enumerate USB device on port 4
... kernel: ... usb 2-4: new high speed USB device using ehci_hcd and address 19
... kernel: ... usb 2-4: device not accepting address 19, error -71
... kernel: ... hub 2-0:1.0: unable to enumerate USB device on port 4
... kernel: ... usb 2-4: new high speed USB device using ehci_hcd and address 21
... kernel: ... usb 2-4: device descriptor read/all, error -71
... kernel: ... hub 2-0:1.0: unable to enumerate USB device on port 4
... kernel: ... usb 2-4: new high speed USB device using ehci_hcd and address 23

And by ‘filling up’, I meant 10s of megabytes each, across several log files. And there wasn’t a USB device plugged in. (There’d been a thumb drive plugged in briefly before noticing the problem, but the log spewage continued after a cold restart.)

When I went digging for info, it sounded like this might be a problem with some USB device/chipset combinations. In my case, it’s probably a flakey USB chip.

To stop the spew, I added the following to /etc/rc.local

cd /sys/bus/pci/drivers/ehci_hcd
echo -n "0000:00:1d.7" > unbind
cd /sys/bus/pci/drivers/uhci_hcd
echo -n "0000:00:1d.1" > unbind

I unbound ehci_hcd and uhci_hcd because both were showing up in my logs. You might only need one. If you only need to unbind ehci_hcd, you’ll be downgrading the speed of that USB port, which may just be what you need to do to make things work. You’ll also need to adjust those numbers to correspond to how your drivers are numbered, which will be evident when you look at the files in /sys/bus/pci/drivers/*. Since unbind doesn’t survive a reboot, it’s a simple matter of

sudo tail -f /var/log/syslog

in one window while you try an echo in another to verify that the log spewage stops.

Good luck. There’s the chance that this is an entirely wrong thing to do, so caveat emptor.

Edited to add that’s a bug filed against this that makes for interesting reading.


WordPress Futzing Redux

I start 2011 as I started 2010: Screwing around with blogging software and themes. The goal is to get an updated theme in place over the next two weeks so that I can ignore it for a few years. If you spot anything broken, please send along a note.


For 2011

Start less. Finish more.


Google App Engine SDK on Ubuntu 10.04

Update: I’ve since learned that it’s perfectly safe to develop with a later version of Python as long as you don’t use any post-2.5 language features or libraries. I’m now using 2.6.5 on Ubuntu, and things are working just fine. So what follows may be interesting, but it isn’t necessary.

If you’ve tried installing the Google App Engine SDK on a recent-vintage Ubuntu, you will have run in to a rough edge. The current GAE (1.4) requires Python 2.5, but Ubuntu 10.04 ships with Python 2.6 and doesn’t seem to know about earlier versions. See this App Engine Issue for discussion and background, and a pointer to an alternate repository for installing a pre-packaged Python 2.5.

I opted instead to build Python 2.5 from source. It wasn’t rocket surgery, but it wasn’t simple. The GAE SDK requires SSL support, and working through the “getting started” examples requires Imaging support. Here’s a simplified walk through of what I did, culled from shell history.
[Read more →]


Brooks on “Plan to Throw One Away”

In an excellent short interview by Kevin Kelly, Fred Brooks, author of The Mythical Man-Month, has this to say when asked how his thinking has changed:

“When I first wrote The Mythical Man-Month in 1975, I counseled programmers to “throw the first version away,” then build a second one. By the 20th-anniversary edition, I realized that constant incremental iteration is a far sounder approach. You build a quick prototype and get it in front of users to see what they do with it. You will always be surprised.”

The 20th-anniversary edition was 15 years ago, yet I still hear “plan to throw one away” quoted and attributed to Brooks. True, but way out of date.


← Before