views:

188

answers:

1

Hi Everyone,

I've been trying to get RApache set up properly on my Macbook Pro running OS X 10.5.8. After installing RApache successfully (I think), I added the following to the httpd.conf file as suggested in the manual.

LoadModule R_module /apache/module/path/mod_R.so 
ROutputErrors
<Location /RApacheInfo> 
    SetHandler r-info 
</Location> 

With these additions, I was then able to successfully go to http://localhost/RApacheInfo and see the status information. If I add the following additional line, REvalOnStartup "library(brew)" I can no longer load the RApacheInfo page successfully.

I don't know what the issue is here. Without the REvalOnStartup call, I'm seeing the following in the Apache error log.

[Fri Feb 26 11:36:36 2010] [notice] Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.7l DAV/2 mod_R/1.1.8 R/2.10.1 configured -- resuming normal operations
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.

Not a good sign. Any thoughts on what might be going on? Or things to check?

Chris

A: 

Hi Chris,

I'm not sure why you're getting this error on just loading a library, but we've seen this issue on Leopard due to Apple's freetype/fontconfig/cairo libraries calling CoreFoundation calls:

http://finzi.psych.upenn.edu/R/Rhelp02/archive/118681.html

How did you install R?

I tried reproducing your issue on Snow Leopard with stock apache2, binary R 2.10.1 from CRAN, Xcode 3.2.1, and rapche 1.1.8 but no luck. My setup worked like a champ.

I don't have access to Leopard anymore, so my best suggestion is to use gdb to break on that really long system call. You will want to remove the REvalonStartup directive and replace it with a handler call which does the same, configure apache to spawn only one child process (hence the whole fork thing) and connect gdb to it. Then point your web browser to your handler url and see if gdb breaks on the function and then look at the stack trace.... Pretty lame I know, but that's all I got for now.

Jeff
Hi Jeff, I downloaded a precompiled version of R 2.10.1 from r-project.org. Since it was a 32-bit version, I had to tell Apache to run in 32-bit mode to get as far as I did. Realize I did not mention that before, in case that might be relevant. Sounds like upgrading to Snow Leopard might make my life easier... ;-)Appreciate your response... Chris
Chris