The "perfect machine" would not require maintainence, fuel, or outside control. It would be self sustaining. Not even stars are pefect, nor are they self sustaining forever, even they eventually die. Entropy is the only constant in the universe.
Regards, GF.
That's basically it. Without placing some kind of constraint on the problem, there is no "perfect" solution. Those constraints are what divides the machine from the rest of the universe. An eternal, idealized "perfect" can't exist because at some point something external will come along and screw everything up (to use the technical term).
You can't escape this by saying, "Oh, but my chainsaw will be so perfect it will survive anything you can throw at it," simply because as far as we know, there is no material that can withstand, e.g., the tidal forces near the horizon of a black hole. This isn't something you can work around unless you can change the laws of physics.
So the other alternative is to design your machine so it will avoid such situations. That's clearly silly, because now your chainsaw is also an intergalactic spacecraft.
A useful definition of perfect is a relative one. It depends on what resources you have, and what problem you are solving. If you have $100 and you need to cut down a tree, that $100,000 carbon fiber, diamond-toothed nuclear-powered chainsaw is of no value to you, no matter how technically perfect it may be.
Aha, you say, we're not worrying about things like cost, we're talking abstractly. That doesn't help. Money is simply one way of representating limited resources. Somewhere between accepting that there's a finite quantity of matter in the volume of space that is reachable within a human lifetime (or the lifetime of a civilization, if that civilization is wholly dedicated to building the perfect chainsaw) and accepting that the laws of physics place constraints on efficiencies, precision, etc, you run into something that limits what is possible.
So like I said before, you can muse about "perfection," but it's going to raise paradoxes. For example, try to imagine the perfect machine for breaking perfect machines.