Much of the surplus and new eastern European ammo puts out loads of sparks. I haven't had this happen in any other calibers except Makarov, but it seems pretty common. Usually very dirty powder.
On your failure to fire, you say that the hammer didn't connect? That would be VERY odd on a Makarov. The disconnecter on a Makarov is a solid milled part, and the only ways it would fail to connect would be a worn mainspring (it doubles as disconnecter spring) or SEVERE wear to the disconnecter or hammer. I would doubt that a disconnecter or hammer that worn would EVER connect!
If the trigger bar/disconnecter and hammer are indeed connecting, take a good look at the firing pin and firing pin channel. I did have one that had been dry fired A LOT, and the back end of the firing pin was mushroomed slightly. This made it fail to fire on occasion. A replacement firing pin completely solved the problem. Also be sure that the firing pin channel is clean. It gets surprisingly dirty very quickly. Use a pipe cleaner and some solvent to clean it out.
Of course, it could all be just a bad lot of primers.