ptrace(): p_xthread could be NULL for P_STOPPED_TRACE
(cherry picked from commit b63281884e0e1530de999723532f2d536cb32477)