2

I am running analysis in parallel in R. The analysis itself runs without issue. I recently added an argument to determine whether, in each node, the code produces graphs at the end of each iteration of analysis. This has introduced a new error:

Error in unserialize(socklist[[n]]) : error reading from connection

The per-node log files indicate this error occurs during plotting. I have tried slight modifications of the code, but as I work more errors have appeared.

*** Error in `/usr/lib/R/bin/exec/R': free(): invalid pointer: 0x0000000000a9eaa8 ***
*** Error in `/usr/lib/R/bin/exec/R': corrupted double-linked list: 0x00007f5c3338f5e0 ***
*** Error in `/usr/lib/R/bin/exec/R': free(): invalid pointer: 0x000000000070daa8 ***
*** Error in `/usr/lib/R/bin/exec/R': double free or corruption (!prev): 0x00007f365231d220 ***    

Googling suggests these errors are related to the C++ code underlying ggplot2's functions, but I am not sure how to begin debugging compiled C++ code referenced by R.

Currently, I have not been able to replicate the errors using a minimal example. This gist provides an idea of what I am doing / plotting: https://gist.github.com/ElizabethAB/9dfc377eb7b2773c3d6e

Please see below my session information.

> sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.2 LTS

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

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

other attached packages:
 [1] GGally_0.5.0        ggmap_2.4           boot_1.3-15         snow_0.3-13         MASS_7.3-40         caret_6.0-47       
 [7] ggplot2_1.0.1       lattice_0.20-31     rgdal_0.9-3         sp_1.1-0            reshape2_1.4.1.9000 dplyr_0.4.1.9000   
[13] plyr_1.8.2.9000     stringr_1.0.0.9000 

loaded via a namespace (and not attached):
 [1] Rcpp_0.11.6         nloptr_1.0.4        iterators_1.0.7     tools_3.2.0         digest_0.6.8        lme4_1.1-7         
 [7] nlme_3.1-120        gtable_0.1.2        mgcv_1.8-6          png_0.1-7           Matrix_1.2-0        foreach_1.4.2      
[13] DBI_0.3.1           mapproj_1.2-2       brglm_0.5-9         SparseM_1.6         proto_0.3-10        BradleyTerry2_1.0-6
[19] maps_2.3-9          RgoogleMaps_1.2.0.7 gtools_3.5.0        grid_3.2.0          nnet_7.3-9          reshape_0.8.5      
[25] R6_2.0.1            jpeg_0.1-8          RJSONIO_1.3-0       minqa_1.2.4         car_2.0-25          magrittr_1.5       
[31] scales_0.2.4        codetools_0.2-11    splines_3.2.0       assertthat_0.1      pbkrtest_0.4-2      geosphere_1.3-13   
[37] colorspace_1.2-6    labeling_0.3        quantreg_5.11       stringi_0.4-1       lazyeval_0.1.10     munsell_0.4.2      
[43] rjson_0.2.15       

My Solution

I uninstalled ggplot2 and reinstalled from source. This cleared up the issue.

ebyerly
  • 662
  • 5
  • 14
  • Please include all the relevant data and code in your question. – Roman Luštrik Jun 03 '15 at 06:27
  • @RomanLuštrik - unfortunately, I cannot, as the project is for work. – ebyerly Jun 03 '15 at 13:17
  • 1
    In that case, feel free to use publicly (widely) available datasets or simulated data to convey the problem. You can find plenty of examples in this [most popular post for R tag on stackoverflow](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – Roman Luštrik Jun 03 '15 at 13:25
  • Why are you loading both parallel and snow? Mixing them together might cause problems unless you're careful. – Steve Weston Jun 04 '15 at 13:14

0 Answers0