[R] corrupted double-linked list

Duncan Murdoch murdoch.duncan at gmail.com
Thu Jan 29 12:42:42 CET 2015


On 29/01/2015 6:24 AM, Göran Broström wrote:
> Hello,
> 
> A weird thing happened to me while I was playing around in the R console 
> with a data frame ('fert'). The finale was
> 
> -----------------------------------------------------
>  > with(fert[fert$parity == 4, ], table(age, event))
>           event
> age         0   1   2
>    (14,20]   0   0   0
>    (20,25]   6  43  41
>    (25,30]  57 565 513
>    (30,35] 121 719 686
>    (35,40] 165 309 317
>    (40,45] 156  45  29
>    (45,50]  13   0   0
>  > fit1 <- coxph(Surv(exit - enter, event > 0.5) ~ strata(age) + civst + 
> birthdate, data = fert[fert$parity == 0, ])
> *** Error in `/usr/local/lib/R/bin/exec/R': corrupted double-linked 
> list: 0x0000000004f1aa40 ***
> Aborted
> ------------------------------------------------------
> There was no .Rhistory file left (and my memory is too short) so I 
> cannot reproduce it, but what is a "double-linked list"?

That message likely comes from the C runtime library glibc, not directly
from R.  It says that the memory being managed by C has been corrupted,
presumably by an out of bounds write sometime earlier.  (This might
conceivably happen if an object had been cleaned up by the R memory
manager then referred to later, but that usually gives a different error.)

If you can make it reproducible we could track it down, but it's much
harder without that.  You could try running your code under valgrind if
you know how to do that (or want to read the manual and learn).

Duncan Murdoch

> 
> This is on Ubuntu 14.10 with  R  built from source.
> 
>  > sessionInfo()
> R version 3.1.2 Patched (2014-12-08 r67137)
> Platform: x86_64-unknown-linux-gnu (64-bit)
> 
> locale:
>   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>   [3] LC_TIME=sv_SE.UTF-8        LC_COLLATE=en_US.UTF-8
>   [5] LC_MONETARY=sv_SE.UTF-8    LC_MESSAGES=en_US.UTF-8
>   [7] LC_PAPER=sv_SE.UTF-8       LC_NAME=C
>   [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=sv_SE.UTF-8 LC_IDENTIFICATION=C
> 
> attached base packages:
> [1] splines   stats     graphics  grDevices utils     datasets  methods
> [8] base
> 
> other attached packages:
> [1] eha_2.4-2       survival_2.37-7
> 
> loaded via a namespace (and not attached):
> [1] tools_3.1.2
> 
> Göran
> 
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list