[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pthread_create: Resource temporarily unavailable
From: |
Samuel Thibault |
Subject: |
Re: pthread_create: Resource temporarily unavailable |
Date: |
Sat, 6 Dec 2014 02:48:31 +0100 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
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
- Re: pthread_create: Resource temporarily unavailable,
Samuel Thibault <=