inside the heated bore of the rifle expanding gas set off a domino effect that ultimately drove the bolt carrier back , ejected the spent round , and chambered a new one from the magazine , all in a matter of milliseconds .