At least 30 inmates were killed in a Brazilian prison riot that broke out on Saturday, a person with direct knowledge of the situation said, adding to chaos in a penitentiary system in which about 140 inmates have died in gang warfare since the start of the year.