Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libuv dependency on CoreFoundation #22

Closed
jeroen opened this issue Nov 5, 2013 · 2 comments
Closed

libuv dependency on CoreFoundation #22

jeroen opened this issue Nov 5, 2013 · 2 comments

Comments

@jeroen
Copy link
Contributor

jeroen commented Nov 5, 2013

This issue is closely related to #6 but slightly different in the fact that it also appears if outside of R.app.

Edit: a video that shows what happens on Mavericks: http://youtu.be/ZUfudbP1quA

Since the upgrade to Mavericks, the dependency of libuv on CF has gotten more problematic for me, because libcurl is now using CF as well. This puts a lot of restrictions on the ability to fork and do parallel processing. See also this thread.

I'm obviously not an expert on libuv or CF, but judging from some recent commits and announcements 1, 2, 3 it looks like in the latest release of libuv, The ApplicationServices, CoreFoundation and CoreServices frameworks are no longer required dependencies on OS X. Would that solve anything?

Here is a small example that works fine on linux, but if you run it on osx, it will crash child process, and the parent is having issues as well after the incident (it looks like it can no longer call fork or exec):

library(parallel)
library(httpuv)

runServer("0.0.0.0", 12345, list(call=function(req){
  myfork <- mcparallel({
    library(RCurl);
    getURL("https://api.github.com")
  })

  out <- mccollect(myfork)[[1]];

  list(
    status = 200,
    headers = list("Content-Type"="text/plain"),
    body = out
  );

}));
@jcheng5
Copy link
Member

jcheng5 commented Nov 9, 2013

Sorry, not ignoring you on purpose, I was heads down this week helping JJ with the RStudio Mavericks rewrite. I'm way behind you on this, my Mavericks machine isn't even building Rcpp successfully yet.

That being said, the announcements you linked to don't decrease the dependency on these frameworks, it just means they're loaded dynamically. So I wouldn't get your hopes too high, unfortunately.

@jeroen
Copy link
Contributor Author

jeroen commented Nov 10, 2013

No worries, first things first. I've released an update for opencpu that disables forking on osx and instead uses psock nodes for parallel requests (windows style!). It's a bit of a performance killer, but hopefully temporary. Maybe once things have calmed down a bit, we can talk with @s-u to see if there is a proper solution to use httpuv with mcparallel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants