I built a ring oscillator out of discrete logic gates as in the following schematic:
It consists of 6 inverters/NOT gate (SN74LVC1G04@U12-17) and one NAND gate (SN74LVC1G00@U11) so the circuit can be reset.
In addition to that, I added a Schmitt-trigger (SN74LVC1G17@U19) to clean the output and a button to reset the circuit.
At first glance, the circuit seems to work. Here is the output of CHAIN1 (yellow) and CHAIN1_OUT (blue, output of Schmitt-trigger) on my oscilloscope:
However, this circuit sometimes glitches as captured below:
These glitches appear at irregular interval (~every 30-100 cycles). Where do these glitches come from and how can these be fixed?