Re: [dev-servo] Multiprocess safety

2015-06-19 Thread Patrick Walton
I think I'm convinced it's worthwhile to try harder at getting cross-process channels-over-channels working. It would result in a lot less churn, for sure. The fact that they have to be transmitted out of band is an interesting serialization challenge, but it shouldn't be insurmountable. I think t

Re: [dev-servo] Multiprocess safety

2015-06-19 Thread Andrew McCreight
On Fri, Jun 19, 2015 at 3:21 AM, Robert O'Callahan wrote: > On Fri, Jun 19, 2015 at 7:10 PM, Patrick Walton > wrote: > > > In theory you can use cmsg on POSIX systems to send channels over > > channels, by treating channels as file descriptors. I tried this first, > and > > I believe it actually

Re: [dev-servo] Multiprocess safety

2015-06-19 Thread Robert O'Callahan
On Fri, Jun 19, 2015 at 7:10 PM, Patrick Walton wrote: > In theory you can use cmsg on POSIX systems to send channels over > channels, by treating channels as file descriptors. I tried this first, and > I believe it actually worked well on Linux. But on Mac I ran into all sorts > of (as far as I

Re: [dev-servo] Multiprocess safety

2015-06-19 Thread James Graham
On 19/06/15 00:40, Patrick Walton wrote: In an effort to keep this sort of thing from happening again, I'd like to suggest that all new code that spawns threads and passes channels or boxed objects over channels not be allowed to pass review until audited for multiprocess safety up until the mul

Re: [dev-servo] Multiprocess safety

2015-06-19 Thread Patrick Walton
In theory you can use cmsg on POSIX systems to send channels over channels, by treating channels as file descriptors. I tried this first, and I believe it actually worked well on Linux. But on Mac I ran into all sorts of (as far as I can tell) kernel bugs, including kernel panics and data loss. It

Re: [dev-servo] Multiprocess safety

2015-06-18 Thread Robert O'Callahan
On Fri, Jun 19, 2015 at 12:45 PM, Patrick Walton wrote: > It's fine to pass channels over channels as long as those channels don't > cross process boundaries. > Out of interest, why can't you pass channels over channels across a process boundary? Rob -- oIo otoeololo oyooouo otohoaoto oaonoyoo

Re: [dev-servo] Multiprocess safety

2015-06-18 Thread Jack Moffitt
For the memory profiler, it seems like some socket abstraction would work fine. The master process can just listen on a IPC socket and the messages can get broadcast to it. jack. On Thu, Jun 18, 2015 at 6:50 PM, Nicholas Nethercote wrote: > On Thu, Jun 18, 2015 at 5:45 PM, Patrick Walton wrote:

Re: [dev-servo] Multiprocess safety

2015-06-18 Thread Nicholas Nethercote
On Thu, Jun 18, 2015 at 5:45 PM, Patrick Walton wrote: > It's fine to pass channels over channels as long as those channels don't > cross process boundaries. In that case, the paint task lives in the chrome > process (since it has access to the GPU), so you're fine. The problematic > cases are ess

Re: [dev-servo] Multiprocess safety

2015-06-18 Thread Patrick Walton
It's fine to pass channels over channels as long as those channels don't cross process boundaries. In that case, the paint task lives in the chrome process (since it has access to the GPU), so you're fine. The problematic cases are essentially {script,layout} <-> (anything else). Patrick _

Re: [dev-servo] Multiprocess safety

2015-06-18 Thread Nicholas Nethercote
The memory profiler relies heavily on passing channels over channels. The memory profiler makes measurement requests of threads and passes them a channel through which they can return the measurements. One example from paint_task.rs: impl Reporter for PaintChan { // Just injects an appropriat

[dev-servo] Multiprocess safety

2015-06-18 Thread Patrick Walton
Hi everyone, I'm rebasing my multiprocess patch and found that many of the new features that have landed were implemented in a way that was incompatible with multiprocess Servo. In particular: * WebDriver passes channels over channels between script and the chrome process. * Canvas relies on pas