This is not a bug. It prevents a building from wasting materials by manufacturing more than it can store. The excess is then lost.
When the process has no room to store the output, it runs again without consuming more materials. Eventually there is room to store the output.
When the process has no room to store the output, it runs again without consuming more materials. Eventually there is room to store the output.