It looks like that while rebasing/cleaning up the patches before sending them I messed with the precondition checks, and thread->process->be_cpu is accessed before the !thread if verified...
The thread should never be NULL in any case, and gdb frontend does not seem to handle error replies very well, so maybe assert is in order rather than checking and reply with error. Not sure what's preferred here?