A system and method of using friction stir welding and friction stir processing to perform crack repair or preventative maintenance of various materials and structures, wherein the structures include pipeline, ships, and nuclear reactor containment vessels, wherein the friction stir welding and processing can be performed on various materials including metal matrix composites, ferrous alloys, non-ferrous alloys, and superalloys, and wherein the friction stir welding and processing can be performed remotely and in harsh environments such as underwater or in the presence of radiation.