Sun Microsystems, one of the government's top technology vendors, canceled its contract with the General Services Administration after months of questions from investigators and lawmakers over allegations it had overcharged taxpayers in recent years.