ptrace / task_for_pid / pid_suspend
ptrace / task_for_pid / pid_suspend
- Subject: ptrace / task_for_pid / pid_suspend
- From: Antoine Missout <email@hidden>
- Date: Wed, 30 Jun 2010 10:59:35 -0400
Hi,
We have a kernel driver + user-space daemon for a new product. Once loaded & running, the daemon becomes crucial to the proper running of the kernel: more exactly, the daemon can be running or not, but must not freeze as the kernel will deadlock while waiting for an answer.
The setup is now very stable, the only issue we've run lately was with Instruments, using Time Profile for all process: this would result in an immediate lockup of the machine.
Reading a bit of documentation about this probing, it seems Instruments suspends all process to take statistics.
Now to avoid this problem, we've taken step to disable ptrace(PT_DENY_ATTACH), task_for_pid for our daemon, and while we're at it, also pid_suspend introduced in 10.6.4.
This now allows for Instruments to Time Profile the whole machine without lockup the machine. We would prefer to take less drastic steps to avoid this deadlock, but without knowing what exactly is Instruments doing using our task port, this is difficult. It still seems to gather stats for the daemon, but the addresses look like garbage.
So the questions are:
- what is Instruments (or DTTSecD ?) doing exactly ?
- is there a better way to make sure the daemon is never suspended in any way ? (or know it in advance ?)
Thanks,
Antoine
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden