Closed Bug 1306663 Opened 8 years ago Closed 7 years ago

Investigate Preventing OS X CFMessagePort/CFPasteboardSetup Error Messages

Categories

(Core :: Security: Process Sandboxing, defect)

51 Branch
Unspecified
macOS
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 1384336

People

(Reporter: haik, Unassigned, NeedInfo)

References

Details

(Whiteboard: sb+)

Since the integration of bug 1299329 ​in Nightly, these error messages are printed to the terminal and system.log so you'll see them when running Firefox from the command line on Mac. The messages are/were triggered by the removal of the mach-register permission "(allow mach-register)" from the content process sandbox. See comments on 1299329 for more context. It would be great if we could prevent these from printing to the terminal. plugin-container[96229:2989903] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x4b2f, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. plugin-container[96229:2989903] void __CFPasteboardSetup() : Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions
Whiteboard: sb? → sb+
I am having a similar issue (same?) when trying to use Firefox 52 with geckodriver 0.15.0. The log file generated is: 1490614623424 geckodriver INFO Listening on 127.0.0.1:56052 1490614624499 mozprofile::profile INFO Using profile path /var/folders/3_/y9hb3h2s29sf54_4hbzvw67rdbs61c/T/rust_mozprofile.mZFRIfD5jB1Y 1490614624500 geckodriver::marionette INFO Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin with args [] 1490614624504 geckodriver::marionette INFO Connecting to Marionette on localhost:56058 1490614625130 Marionette INFO Listening on port 56058 1490614625430 Marionette WARN TLS certificate errors will be ignored for this session 2017-03-27 14:37:06.495 plugin-container[54602:1380558] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x963f, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-03-27 14:37:06.495 plugin-container[54602:1380558] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x9913, name = 'com.apple.CFPasteboardClient' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-03-27 14:37:06.495 plugin-container[54602:1380558] void __CFPasteboardSetup() : Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions 1490615110222 geckodriver INFO Listening on 127.0.0.1:56189 1490615111271 mozprofile::profile INFO Using profile path /var/folders/3_/y9hb3h2s29sf54_4hbzvw67rdbs61c/T/rust_mozprofile.1pcassoz1ItN 1490615111273 geckodriver::marionette INFO Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin with args [] 1490615111275 geckodriver::marionette INFO Connecting to Marionette on localhost:56195 1490615112002 Marionette INFO Listening on port 56195 1490615112343 Marionette WARN TLS certificate errors will be ignored for this session 2017-03-27 14:45:13.475 plugin-container[56445:1390461] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x963f, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-03-27 14:45:13.475 plugin-container[56445:1390461] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x980f, name = 'com.apple.CFPasteboardClient' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-03-27 14:45:13.475 plugin-container[56445:1390461] void __CFPasteboardSetup() : Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions Any idea of an workaround/possible fix? It's blocking our automation tests. Thanks, Ramona
Hi Ramona, Are you seeing a specific problem or failure, or is it just the error messages causing test issues? We don't have a workaround at the moment, other than to disable the content sandbox, but that has security implications.
Flags: needinfo?(rsuciu)
Hello, I am seeing this error message come up when starting the Geckodriver. There are multiple threads that describe this issue: - https://github.com/mozilla/geckodriver/issues/548 - https://github.com/mozilla/geckodriver/issues/706 - https://github.com/mozilla/geckodriver/issues/526 I'd like to make a safe assumption that those issues are all connected. But I am just a lowly API user :p. Here is a script that I am using to produce this bug: https://gist.github.com/dok/6f8dbac175947284c975dc71114ad9e8 And here is the log messaging: 10:52:15.367 INFO - Selenium build info: version: '3.4.0', revision: 'unknown' 10:52:15.368 INFO - Launching a standalone Selenium Server 2017-06-30 10:52:15.400:INFO::main: Logging initialized @453ms to org.seleniumhq.jetty9.util.log.StdErrLog 10:52:15.475 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}] does not match the current platform MAC 10:52:15.476 INFO - Driver provider org.openqa.selenium.edge.EdgeDriver registration is skipped: registration capabilities Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}] does not match the current platform MAC 10:52:15.476 INFO - Driver class not found: com.opera.core.systems.OperaDriver 10:52:15.476 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped: Unable to create new instances on this machine. 10:52:15.476 INFO - Driver class not found: com.opera.core.systems.OperaDriver 10:52:15.476 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered 2017-06-30 10:52:15.561:INFO:osjs.Server:main: jetty-9.4.3.v20170317 2017-06-30 10:52:15.626:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@26653222{/,null,AVAILABLE} 2017-06-30 10:52:15.674:INFO:osjs.AbstractConnector:main: Started ServerConnector@598067a5{HTTP/1.1,[http/1.1]}{0.0.0.0:4444} 2017-06-30 10:52:15.675:INFO:osjs.Server:main: Started @728ms 10:52:15.675 INFO - Selenium Server is up and running 10:52:15.964 INFO - SessionCleaner initialized with insideBrowserTimeout 0 and clientGoneTimeout 1800000 polling every 180000 ChildProcess { domain: null, _events: {}, _eventsCount: 0, _maxListeners: undefined, _closesNeeded: 1, _closesGot: 0, connected: false, signalCode: null, exitCode: null, killed: false, spawnfile: '/usr/bin/java', _handle: Process { owner: [Circular], onexit: [Function], pid: 57471 }, spawnargs: [ '/usr/bin/java', '-Dwebdriver.chrome.driver=/Users/sean/workspace/playground/node_modules/selenium-standalone/.selenium/chromedriver/2.30-x64-chromedriver', '-Dwebdriver.gecko.driver=/Users/sean/workspace/playground/node_modules/selenium-standalone/.selenium/geckodriver/0.16.1-x64-geckodriver', '-jar', '/Users/sean/workspace/playground/node_modules/selenium-standalone/.selenium/selenium-server/3.4.0-server.jar' ], pid: 57471, stdin: null, stdout: null, stderr: null, stdio: [ null, null, null ] } info SUCCESSFULLY STARTED SELENIUM-STANDALONE [object Object] 10:52:16.062 INFO - Executing: [new session: Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@3296430, browserName=firefox, javascriptEnabled=true, handlesAlerts=true, requestOrigins={name=webdriverio, version=4.6.2, url=http://webdriver.io}}]]) 10:52:16.096 INFO - Creating a new session for Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@3296430, browserName=firefox, javascriptEnabled=true, handlesAlerts=true, requestOrigins={name=webdriverio, version=4.6.2, url=http://webdriver.io}}] 1498845136469 geckodriver INFO Listening on 127.0.0.1:27152 1498845136789 geckodriver::marionette INFO Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin with args ["-marionette"] 1498845139722 Marionette INFO Listening on port 63316 2017-06-30 10:52:20.083 plugin-container[57489:3870572] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8e3f, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-06-30 10:52:20.085 plugin-container[57489:3870572] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x500b, name = 'com.apple.CFPasteboardClient' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-06-30 10:52:20.085 plugin-container[57489:3870572] void __CFPasteboardSetup() : Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions I'd like to help as much as possible to solve this issue. I believe it's a fairly common issue that people are facing, as they make the change to geckodriver.
With the fix for bug 1384336, these failure messages are no longer generated. See bug 1384336 comment 20 for more explanation. Closing as a dupe of bug 1384336.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
This is still pretty noisy, I see these error messages several times during startup (probably once per process): 2018-03-28 13:14:18.007 plugin-container[69707:5811750] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8b3f, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. 2018-03-28 13:14:18.164 plugin-container[69707:5811750] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8bbb, name = 'com.apple.coredrag' See /usr/include/servers/bootstrap_defs.h for the error codes. It seems that bug 1384336 indeed fixed it, but this code was pref'ed off in bug 1397956 and hasn't been reenabled since that. Markus, do you know what we could do to silence this console noise? (Which becomes even more visible now that the other big source of noise - bug 1335191, thanks for fixing it! - is gone)
Flags: needinfo?(mstange)
Not sure. Fixing bug 1384336 again would be the right fix.
Flags: needinfo?(mstange)
You need to log in before you can comment on or make changes to this bug.