atexit uses PEP 3121 module initialization, and by this scheme each subinterpreter gets a separate module state. However, atexit's m_free doesn't actually decref the callbacks: it only frees the callbacks array, thinking the callbacks were already decref'ed when run. This is ok at main interpreter shutdown, but not at subinterpreter shutdown (see issue 18618).