This is probably due to a leak. Mongod runs out of memory and get kicked out from the OS. Memory (as reported by top(1)) looks growing linearly with time.
It takes about 2 hours in my machine to reproduce.
You'll need the mongo C driver and libbsd (the code relies on arc4random()).