handle setopts error gracefully
merge bug25929 into stable
merge stable into default