I have a 1990 manual Honda Civic with ~200k miles. When I'm stopped at a red light, the engine revs up to about 2k-3k rpm and then down to 1k rpm. This cycle repeats about once every two seconds. My foot is off the gas, and it happens regardless of whether the clutch is in and I'm in gear or the clutch is out and I'm in neutral. It doesn't happen consistently; sometimes it behaves normally. So far, it hasn't caused any problems, it's just annoying. What could be causing this problem?
There is an air leak into the intake manifold. What happens is that air mass increases so the PCM responds by added fuel to match, thus increasing rpm. Next the idle rpm limit is reached so the PCM cuts off fuel to lower the rpm.
The fix requires that the air leak is found and repaired. Common causes are leaks through the PCV valve or idle air control valve. Other leaks are possible. Test by blocking off possible leaks until the idle returns to normal.