Re: pthread_create: Resource temporarily unavailable
Hello,
The other day, I investigated a bit why when often get
pthread_create: Resource temporarily unavailable
when unmounting a filesystem. This message is produced by libpthread
because it didn't manage to allocate a stack. It indeed gets a
EKERN_INVALID_ARGUMENT to its vm_allocate calls. This is due to the
mach_task_self() port being invalid. This is due to the process actually
getting terminated: gnumach's task_terminate() indeed disables the task
port before terminating threads. I tried to put ipc_task_disable()
after task_hold() and task_dowait(), like is done in xnu, but I'm still
getting the issue. I haven't investigated further for now, I just
wanted to share my findings so far.
Samuel
Reply to: