When using ptrace to get the registers of another process, is it possible that the stop point is in kernel space (doing system call or something like in sleep()), that the RIP is in kernel code segment and RSP is the kernel stack pointer?
is it possible ... that the RIP is in kernel code segment and RSP is the kernel stack pointer?
No, at least not on Linux.