On Thu, May 05, 2011 at 01:54:30PM +0200, Samuel Thibault wrote: > It's the big leak I have on the buildds. 50k ports after like 10h > building stuff.
Assuming this leak only happens when starting a new translator, this implies building stuff starts a lot of them. Identifying which ones may help narrowing the leak origin. Also, does portinfo print lots of receive only (or maybe receive/send-once) rights (I assume the leak leaves no send right in ext2fs) ? > > It seems to be triggered by starting a new translator only. > > So you are actually observing it too? No, but that's what the code seems to do. > the ports array is given to fshelp_start_translator_long, which just > passes it to the file_exec() RPC. AIUI, that won't make a copy inside > ext2fs itself. Check the status and the number of user references of newpi/dirport using mach_port_get_receive_status() and mach_port_get_refs() right before the call to mach_port_deallocate on dirport. The number of urefs should be 1, and status->mps_nsrequest should be true. You should also find how no-sender notifications are received, since that's how such receive rights get deallocated: once the child translator terminates, all its rights on the port are destroyed, which generates a no-sender notification, on which the receive port is destroyed. I hope the child translator doesn't copy this right to other tasks, in which case we would have to track where and how references are passed. -- Richard Braun