Skip to content

Unexpected source() behavior in R-devel

12 messages · Seth Falcon, Henrik Bengtsson, Sean Davis +1 more

#
Why am I seeing the following in R-devel (sept 2, 2006 build) on opensuse 
10.1?  I'm sure it is something simple I am missing, but I just don't see it 
(output below).  

Thanks,
Sean
[1] "source(\"http://bioconductor.org/getBioC.R\")"       
[2] ""                                                    
[3] "biocLite <- function(pkgs, groupName=\"lite\", ...)" 
[4] "{"                                                   
[5] "    if (missing(pkgs))"                              
[6] "        getBioC(groupName=groupName, ...)"           
[7] "    else"                                            
[8] "        getBioC(pkgs=pkgs, groupName=groupName, ...)"
[9] "}"
Error in file(file, "r", encoding = encoding) : 
	unable to open connection
In addition: Warning message:
cannot open: HTTP status was '404 Not Found'
R version 2.4.0 Under development (unstable) (2006-09-02 r39068) 
x86_64-unknown-linux-gnu 

locale:
LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets" 
[7] "base"
#
Sean Davis <sdavis2 at mail.nih.gov> writes:
Hmm, something is up. I got
Error in file(file, "r", encoding = encoding) :
        unable to open connection
In addition: Warning message:
cannot open: HTTP status was '404 Not Found'
*** caught segfault ***
address 0x21, cause 'memory not mapped'

Traceback:
 1: file(file, "r", encoding = encoding)
 2: source("http://bioconductor.org/getBioC.R")
 3: eval.with.vis(expr, envir, enclos)
 4: eval.with.vis(ei, envir)
 5: source(url("http://www.bioconductor.org/biocLite.R"))

Possible actions:
1: abort (with core dump)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection:


Oops...

The immediate cause would seem to be that
http://bioconductor.org/getBioC.R is non-existent (needs to be
www.bioconductor.org). 

That's a server-side issue, not an R problem, but what was that bit
with the segfault? I can't seem to reproduce it in a fresh session.
#
This has been reported before on r-devel, e.g. May 9, 2006 "[Rd] Seg
fault when installing package from bad repository".

It's happening on Mac OSX when trying to download non-existing
webpages (HTTP status 404). That's all I know (not using OSX myself).

/Henrik
On 03 Sep 2006 23:06:01 +0200, Peter Dalgaard <p.dalgaard at biostat.ku.dk> wrote:
#
"Henrik Bengtsson" <hb at stat.berkeley.edu> writes:
It is not entirely obvious that it is the same problem, but it might be.

This happened to me on Linux (2.3.1 on FC5), but it has only happened
that one time. I don't think I did anything particularly strange
earlier in that session.

Of course, with 20/20 hindsight, I should have taken the core dump
option...

  
    
#
Peter Dalgaard <p.dalgaard at biostat.ku.dk> writes:
I'm pretty sure this is the same issue and one that has been fixed in
R-devel.

    r38716 | ripley | 2006-07-30 00:19:35 -0700 (Sun, 30 Jul 2006) | 1 line
    Changed paths:
       M /trunk/src/modules/internet/internet.c
    
    crash workaround from Seth Falcon


Sean: can you try just download.file with a URL that gives 404?  Are
you running an R version prior to the above commit?


Bw,

+ seth
#
On 9/4/06, Sean Davis <sdavis2 at mail.nih.gov> wrote:
Yes, there's been some problems with the Bioconductor server the last
few days, e.g. http://bioconductor.org/biocLite.R is not working
either.  It was down on Monday night too and then it was not possible
to install any packages from them.  I think they are aware of this
problem, but maybe not that it is down in this very minute.  I've
cross-posted this reply to the bioc-devel to make sure the right
person gets it.

However, a HTTP 404 response should not crash R regardless.  For
instance, the code for install.packages() tries to download
PACKAGES.gz and if missing it tries to download PACKAGES.  All of a
sudden I started to receive reports for OSX users that tried to
install my packages from http://www.braju.com/R/ saying my code core
dumped their R session.  I didn't have PACKAGE.gz and it worked for
everyone but OSX users.  It sounds like they've located and solved
this problem in R-devel by the end of July.

/Henrik
#
Peter Dalgaard wrote:
Thanks, Peter, for pointing out the obvious.  I'll talk to the bioc folks. 

On that other point, I have not gotten any segmentation faults so far.  
If I do, I'll repost.

Sean
#
Seth Falcon wrote:
Seth,

As Peter pointed out, this looks like a simple server-side issue.  Here 
is the sessionInfo() from my original post.  And below is the output of 
two versions of download.file.
R version 2.4.0 Under development (unstable) (2006-09-02 r39068) 

 > download.file('http://bioconductor.org/getBioC.R',destfile='/tmp/junk.R')
trying URL 'http://bioconductor.org/getBioC.R'
Error in download.file("http://bioconductor.org/getBioC.R", destfile = 
"/tmp/junk.R") :
        cannot open URL 'http://bioconductor.org/getBioC.R'
In addition: Warning message:
cannot open: HTTP status was '404 Not Found'
 > 
download.file('http://www.bioconductor.org/getBioC.R',destfile='/tmp/junk.R')
trying URL 'http://www.bioconductor.org/getBioC.R'
Content type 'text/plain; charset=ISO-8859-1' length 1345 bytes
opened URL
==================================================
downloaded 1345 bytes
#
Sean Davis <sdavis2 at mail.nih.gov> writes:
Yes, there is an issue with the BioC website (investigating) and I
didn't mean to imply otherwise.  For now, as you discovered, use
http://www.bioconductor.org (note the 'www').

I only responded here because of the segfault you reported which most
certainly is not a simple server-side issue :-)

Did you see the segfault with a recent R or an older one?  If more
recent, then it might be worth trying to reproduce and tracking down
the bug.
#
Sean Davis <sdavis2 at mail.nih.gov> writes:
It was with 2.3.1, but there have been some indications that it was
likely fixed since, and I couldn't even reproduce it in 2.3.1. So
there might and might not be a bug, but in any case we have no handle
on it...
#
"Henrik Bengtsson" <hb at stat.berkeley.edu> writes:
The website issue should be fixed.  bioconductor.org and
www.bioconductor.org should be serving the same content.  Please let
us know of any difficulties you encounter.

Bw,

+ seth
#
Seth Falcon wrote:
Seth,

Peter was the person who reported the segmentation fault, not I.  I
didn't experience that behavior.  And it sounds like Peter wasn't able
to reproduce it, so I'm not sure there is any bug here to be fixed.

Sean