Well, fortunately for potential nanoroboticists, there's already someone in the business who's had a few billion years of experience, and to make matters better she's an open-source nut.
For somatic nanites, I'd generally advise sugar-run technologies. Honestly, in fact, I see no reason to *not* rely on organic chemistry exclusively, using talored microbes as opposed to little steel beasties. In that case, provide plenty of food and bed rest and a patient could "support" an army of the buggers. We know it'd work since anyone who's ever had a cold has done it. EDIT: Actually you've got a couple ~pounds~ of 'em at work helping you digest at the moment...
As for other environments, ones with high temperatures, extreme radiation, lack of atmosphere or otherwise organic-chemistry-hostile environments, I'd propose a ~collection~ of technologies, from solar for space-born nanites, hydrocarbons for industrial cleanup, and probably direct-beam stimulation for applications where a rampaging gang of out-of-control nanites is likely and potentially dangerous.
The "grey goo" scenario assumes a number of things about your nanites: that they can replicate on any material that has the base *elements* and that they have enough power. Energy will be a big factor in the little buggers' spreading. I tend to consider Greg Bear the best "authority" on theoretical nanotech because he has an
exceedingly level head when it comes to technology, peering ahead and predicting both social boons and banes in endeavors of all kinds.
As to malfunctions, remember that, should you choose to make self-replicating machines, you are in fact going to need ~every~ facet of manufacturing, including quality control.
Note Feynman:
http://www.zyvex.com/nanotech/feynman.html
Nanomachines of course can only work precious few miracles, but some of them could really save our bacon, economically speaking. While of course they can't undo the laws of thermodynamics, they certainly can re-arrange things on scales that would before be too costly for us to reach into. They could take a trash dump and re-organize the molecules into drums of hydrocarbons, ingots of metals, and package away or even neutralize dangerous chemicals. We'll continue to need more energy, but given that energy, a robust nanotechnological society would essentially have access to near-perfect recycling capabilities, as well as manufacturing to make even modern IC fabrication look clumsy.
And IC fabrication is at around 100 nanometer feature sizes already, by the way...