This was my second death to a mechanic I either didn't understand or was bugged. My oxygen production was right next to my generator. When night fell, it stopped producing. The generator still had fuel and other things were running, but oxygen was kaput. So I just waited to die. If there was a reason for this, the game went to pains to keep it from me. Not recommended.