We shouldn't be keeping a tsk field in stap_uprobe_spec or stap_utrace_probe, because each of those may get many tasks associated with them. The XXX comments added in commit a9b59347 show the places where this is happening. Instead, we should be poking the semaphores when we are detaching from each task at the end of the script. I think task finder may need to be expanded to give the right callbacks here. Task death is also a consideration, though it won't matter whether the semaphore is adjusted in that case. We just need to make sure we don't try to adjust the semaphore *after* death, when the memory doesn't exist anymore.
This is critical, since the current code includes statements that modify const static data (struct stap_uprobe_specs[]; the new ->tgt field). This is successfully blocked on some machines (my 4cpu kvm VM on a xeon5150 pair being one of them), resulting in panic's. So it has to be fixed. There may be other such bugs that for some reason are only caught on a peculiar simulator environment. Others should check whether they have NX-capable hardware and kvm, as that seems to be a factor.
http://lwn.net/Articles/338015/
coommit 8faa1fc fixes the uprobes variant; tapset-utrace.cxx needs similar treatment (though is not as critical since it's not causing kernel crashes).
SDT on utrace has been removed (commit bbafcb1e), but now we have the same problem with SDT semaphores on kprobes (commit b642c901).
The kprobe side was removed a while ago, in commit 08b5a50cd667. We should be fine with the remaining uprobes implementation, per comment #3. Closing!