The `nb_threads` counter in ntdll is decremented by `abort_thread` but not `exit_thread`, which is used when `NtTerminateThread` is called on the current thread. That results in `nb_threads` being off by one, so neither `abort_thread` nor `exit_thread` will notice when the final thread is killed or call `abort_process`/`exit_process` of its own volition.
In some instances that results in the final thread of a process hanging around and continuing to do work until it's killed by the server's SIGKILL timer. Since most of the process' internal state has been torn down by that point, that usually results in syscall faults or server `write` failures.