Hello, Sergey Bugaev, le mer. 26 avril 2023 20:33:20 +0300, a ecrit: > ../kern/ipc_tt.c:395: retrieve_task_self_fast: Assertion > `task->itk_self != IP_NULL' failed.panic ../kern/debug.c:103: > Debugger: Debugger invoked, but there isn't one! > > This is after typing 'quit' in bc, which calls exit () -- I had to fix > up _hurd_exit () in glibc a little to not crash if we don't have > _hurd_ports. From single-stepping, it seems task_terminate () works, > as in it tears down and deallocates the kernel task_t, but then the > syscall (which task_terminate is) just returns back to userspace to > the now-nonexistent task, and it keeps running. It then calls another > syscall and that one breaks with the assertion above. > > You should be able to reproduce this without glibc by just calling > task_terminate (mach_task_self ()).
I don't see any issue on 32bit gnumach: $ ./test Killed Perhaps with is only with 64bit gnumach, with the AST questions, I see notably thread_terminate that in the thread==cur_thread case, AST_TERMINATE is used. Samuel