[R] XML segfault on some architectures

Janet Young jayoung at fhcrc.org
Tue Jun 7 23:49:14 CEST 2011


Hi,

I found an architecture-specific segfault problem with the XML package. I originally found the problem using the parseKGML2Graph function in the Bioconductor KEGGgraph package, but as far as I can tell the underlying issue seems to be with the xmlTreeParse which is called by parseKGML2Graph.

I'm trying this piece of code, from the xmlTreeParse help page:

library(XML)
fileName <- system.file("exampleData", "test.xml", package="XML")
x <- xmlTreeParse(fileName)

On my Mac and on nodes of one of the linux clusters I have access to, this works fine. But on another of the linux clusters I use, I get a segfault every time, on both 32-bit and 64-bit nodes of the cluster.  The unames for those nodes are here:

Linux kong053 2.6.18-194.17.1.el5xen #1 SMP Wed Sep 29 13:30:21 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Linux king049 2.6.18-194.26.1.el5xen #1 SMP Tue Nov 9 14:13:46 EST 2010 i686 i686 i386 GNU/Linux

I think I've included all the relevant info below, but please let me know if there's anything else you'd like to see.

thanks,

Janet

------------------------------------------------------------------- 

Dr. Janet Young 

Fred Hutchinson Cancer Research Center
1100 Fairview Avenue N., C3-168, 
P.O. Box 19024, Seattle, WA 98109-1024, USA.

tel: (206) 667 1471 fax: (206) 667 6524
email: jayoung  ...at...  fhcrc.org


------------------------------------------------------------------- 






######## on 64-bit node

> library(XML)

> fileName <- system.file("exampleData", "test.xml", package="XML")

> fileName
[1] "/home/btrask/traskdata/lib_linux_64/R/library/XML/exampleData/test.xml"

> sessionInfo()
R version 2.13.0 (2011-04-13)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] XML_3.4-0


> system("uname -a")
Linux kong053 2.6.18-194.17.1.el5xen #1 SMP Wed Sep 29 13:30:21 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

> x <- xmlTreeParse(fileName)

 *** caught segfault ***
address 0x500001c4f, cause 'memory not mapped'

Traceback:
 1: .Call("RS_XML_ParseTree", as.character(file), handlers, as.logical(ignoreBlanks),     as.logical(replaceEntities), as.logical(asText), as.logical(trim),     as.logical(validate), as.logical(getDTD), as.logical(isURL),     as.logical(addAttributeNamespaces), as.logical(useInternalNodes),     FALSE, as.logical(isSchema), as.logical(fullNamespaceInfo),     as.character(encoding), as.logical(useDotNames), xinclude,     error, addFinalizer, PACKAGE = "XML")
 2: xmlTreeParse(fileName)

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



More information about the R-help mailing list