Right now the thing that isn’t working properly is the oxygen sensor, so the engine struggles to rev past 3000rpm. I don’t worry much about the potential danger that puts others in.
Air mass sensor failure can often be determined by unplugging the thing completely, O2 sensor failure could be the cause of your problem but if it only starts to fail at very high revs I'd check the fuel system first to make sure that there is enough flow.
Those can get clogged up pretty badly, especially in vehicles that have been standing for a while with ethanol based fuel in them, it takes forever before that gunk clears out without some work, if at all.
If it really is the O2 sensor (of which you usually have two) then I'd suspect the pre-cat one first, it runs in a much hotter environment and is more critical to the engine working properly.
Another option is the crank sensor, they may not give enough signal at a high number of revs so you start to miss if enough pulses fail (one or two in an otherwise consistent signal isn't going to cause the PLL to lose lock but if it is more erratic then it will and then revs would drop back to a regime where the sensor is still working reliably).
Air mass sensor failure can often be determined by unplugging the thing completely, O2 sensor failure could be the cause of your problem but if it only starts to fail at very high revs I'd check the fuel system first to make sure that there is enough flow.
Those can get clogged up pretty badly, especially in vehicles that have been standing for a while with ethanol based fuel in them, it takes forever before that gunk clears out without some work, if at all.
If it really is the O2 sensor (of which you usually have two) then I'd suspect the pre-cat one first, it runs in a much hotter environment and is more critical to the engine working properly.
Another option is the crank sensor, they may not give enough signal at a high number of revs so you start to miss if enough pulses fail (one or two in an otherwise consistent signal isn't going to cause the PLL to lose lock but if it is more erratic then it will and then revs would drop back to a regime where the sensor is still working reliably).
Good luck fixing that.