The most common reason would be the ignition coil is bad. The worst reason would be a broke rod, but you should be able to a rattle inside the engine where the broken part is knocking!
A Briggs and Stratton L head twin engine wills pit gas out of the carburetor and flood out when starting if the diaphragm has been damaged. This will cause excessive fuel to enter the carburetor.
Most common cause of surging is a dirty/clogged air filter.
The most common cause of engine surging (rev up and down) is a dirty air filter.
The most comon cause of an engine that keeps revving up and down (aka surging) is a dirty air filter.
If the engine is four-cycle, the valve seals may be worn, causing a small amount of oil to seep into the piston cylinder or combustion chamber. If it is two-cycle, the oil/fuel mix may have a little too much oil.
Maybe no juice in the battery.
One of the cylinders is probably not firing. Try pulling a each plug wire alternately while the engine is running. One of them probably won't make any difference and the other will probably kill the engine. The one that does not make any difference is the one that is causing the trouble. You will have to find out why it is not firing. What is happening is the cylinder that is not firing is letting the gas flow through the cylinder and into the exhaust where it is igniting in the muffler.
loose line,[sucking air] hole in primer button, no gas,
Anything that could cause a cylinder misfire can cause the check engine light to flash. A restricted fuel filter is one.Anything that could cause a cylinder misfire can cause the check engine light to flash. A restricted fuel filter is one.
Engine missfire. Cylinder #4
The movement of the piston from BDC to TDC.
Try cleaning or replacing the air cleaner. A clogged air clearner will make the engine run rich (like having the choke on). The rich mixture will cause the blackish smoke. The fileter may not even look very dirty, but the element can still be plugged and cause a problem similar to what you describe.