New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 590979 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

[mojo-edk] Sync broker is incompatible with OSX.

Project Member Reported by amistry@chromium.org, Mar 1 2016

Issue description

On OSX, ChannelPosix has control messages to track the transfer of fds due to a bug where OSX forgets about fds in transit.

The sync broker uses Channel (and hence ChannelPosix) on the host side, but does its own IO on the client side because it needs to be blocking and ChannelPosix needs an IO loop. That custom IO code doesn't handle the control messages.

So the bug is twofild:
1. Do we need the sync broker to create shared memory on OSX?
2. If so, how can the client broker code be harmonized with ChannelPosix?
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b2d1c9f119d12e861e202f39353cc5fb33f982a

commit 1b2d1c9f119d12e861e202f39353cc5fb33f982a
Author: amistry <amistry@chromium.org>
Date: Tue Mar 01 07:14:59 2016

[mojo-edk] Disable sync broker shared memory creation on Mac.

Mac-specific changes to ChannelPosix that track fds in transit, due to an
OSX bug, conflict with the sync broker's message expectations. The best
thing for now is to disable the sync broker usage on OSX.

BUG= 590979 

Review URL: https://codereview.chromium.org/1749043002

Cr-Commit-Position: refs/heads/master@{#378410}

[modify] https://crrev.com/1b2d1c9f119d12e861e202f39353cc5fb33f982a/mojo/edk/system/node_controller.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 2 2016

Labels: Merge-Merged-master1
The following revision refers to this bug:
  https://chrome-internal.googlesource.com/bling/chromium.git/+/1b2d1c9f119d12e861e202f39353cc5fb33f982a

commit 1b2d1c9f119d12e861e202f39353cc5fb33f982a
Author: amistry <amistry@chromium.org>
Date: Tue Mar 01 07:14:59 2016

I've written a test and can finally answer #1. No, we don't need the broker to create shared memory in Mojo... as long as we use mach shared memory. You can't create posix shared memory inside the sandbox. So, as long as we can use mach shared memory on OSX, we don't need the sync broker at all. Once I've switched shm to mach on osx, I can close this as WontFix.
Project Member

Comment 4 by bugdroid1@chromium.org, Mar 18 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/018a4e46c477ada7307ed5c7dad7eb58b7da75b5

commit 018a4e46c477ada7307ed5c7dad7eb58b7da75b5
Author: rockot <rockot@chromium.org>
Date: Fri Mar 18 07:34:30 2016

[mojo-edk] Stop using the sync broker on OS X

The sync broker is only needed for sandboxed shared
buffer allocation on POSIX, but it's not needed for
Mach shared buffers.

This stops using the broker on OS X.

BUG= 591742 , 590979 

Review URL: https://codereview.chromium.org/1809363002

Cr-Commit-Position: refs/heads/master@{#381908}

[modify] https://crrev.com/018a4e46c477ada7307ed5c7dad7eb58b7da75b5/mojo/edk/system/node_controller.cc
[modify] https://crrev.com/018a4e46c477ada7307ed5c7dad7eb58b7da75b5/mojo/edk/system/node_controller.h

Status: Fixed (was: Assigned)

Sign in to add a comment