[Rd] segmentation fault

2007-04-07 Thread Simon de Bernard
Dear list,

I am having a segfault while working with large lists in R 2.4.1  
patched (64-bit compilation) on an apple xserve xeon with 16GB RAM (I  
don't know if this is reproducible on other configs since this is the  
only computer with enough memory I have access to...)

You will find below a simple somewhat reproducible (usually it  
crashes around 5.5GB of vsize, sometimes it gets into an infinite  
loop) exemple and the relevant sessionInfo.

Is this a "normal" limitation of R, a problem with my config or a  
*cough* bug ?

best regards,

Simon.

 > l<-list(1)
 > while(1) { print(object.size(l)/1024/1024); l<-c(l,l,l) }
[1] 9.155273e-05
[1] 0.0002059937
[1] 0.0005722046
[1] 0.001480103
[1] 0.004364014
[1] 0.01301575
[1] 0.03897095
[1] 0.1168365
[1] 0.3504333
[1] 1.051224
[1] 3.153595
[1] 9.460709
[1] 28.38205
[1] 85.14607
[1] 255.4381
[1] 766.3143
[1] 2298.943

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

 > sessionInfo()
R version 2.4.1 Patched (2007-03-31 r41078)
x86_64-apple-darwin8.9.1

locale:
C

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

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] segmentation fault

2007-04-07 Thread Simon de Bernard
Hi Luke,

thanks for your answer.

> I can't reproduce the crash on a 16Gb x86_64 linux machine. It gets
> over 16G of use and so into paging and seems to be making slow
> progress but I killed it at that point to avoid hogging the machine.

well  if it's platform/compiler specific, I guess I'll see if I can  
get some help from Simon Urbanek and his mac know-how...

> This example will allocate large generic vectors and then allocate
> lots of copies of 1 to fill it in. Can you reproduce the problem with
> something of coarser granularity, e.g. pasting together vectors of
> 100 doubles?

with vectors, I hit the vector length limit before getting into any  
trouble.

>   Otherwise, maybe info from running under gdb might help.

here is a backtrace:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x2111
0x0001004d9a28 in RunGenCollect (size_needed=1) at ../../../../R. 
2.4/src/main/memory.c:1313
1313PROCESS_NODES();
(gdb) bt
#0  0x0001004d9a28 in RunGenCollect (size_needed=1)  
at ../../../../R.2.4/src/main/memory.c:1313
#1  0x0001004de764 in R_gc_internal (size_needed=1)  
at ../../../../R.2.4/src/main/memory.c:2142
#2  0x0001004ddf56 in Rf_allocVector (type=14, length=1)  
at ../../../../R.2.4/src/main/memory.c:1943
#3  0x000100489c83 in duplicate1 (s=0x125aaec88) at ../../../../R. 
2.4/src/main/duplicate.c:214
#4  0x000100489181 in Rf_duplicate (s=0x125aaec88) at ../../../../ 
R.2.4/src/main/duplicate.c:111
#5  0x0001004241d9 in ListAnswer (x=0x182008000, recurse=0,  
data=0x7fff5fbfe010) at ../../../../R.2.4/src/main/bind.c:187
#6  0x00010042600b in do_c_dflt (call=0x103a47c08,  
op=0x10300ec68, args=0x103dbf980, env=0x10302e3f8) at ../../../../R. 
2.4/src/main/bind.c:752
#7  0x000100425df9 in do_c (call=0x103a47c08, op=0x10300ec68,  
args=0x103a47d90, env=0x10302e3f8) at ../../../../R.2.4/src/main/ 
bind.c:688
#8  0x0001004a2952 in Rf_eval (e=0x103a47c08, rho=0x10302e3f8)  
at ../../../../R.2.4/src/main/eval.c:431
#9  0x0001004a560c in do_set (call=0x103a42308, op=0x10300bb18,  
args=0x103a42340, rho=0x10302e3f8) at ../../../../R.2.4/src/main/ 
eval.c:1357
#10 0x0001004a2952 in Rf_eval (e=0x103a42308, rho=0x10302e3f8)  
at ../../../../R.2.4/src/main/eval.c:431
#11 0x0001004a4aa2 in do_begin (call=0x103a47ea8, op=0x10300b920,  
args=0x103a422d0, rho=0x10302e3f8) at ../../../../R.2.4/src/main/ 
eval.c:1107
#12 0x0001004a2952 in Rf_eval (e=0x103a47ea8, rho=0x10302e3f8)  
at ../../../../R.2.4/src/main/eval.c:431
#13 0x0001004a46f8 in do_while (call=0x103a42228, op=0x10300a388,  
args=0x103a42260, rho=0x10302e3f8) at ../../../../R.2.4/src/main/ 
eval.c:1037
#14 0x0001004a2952 in Rf_eval (e=0x103a42228, rho=0x10302e3f8)  
at ../../../../R.2.4/src/main/eval.c:431
#15 0x0001004d00c9 in Rf_ReplIteration (rho=0x10302e3f8,  
savestack=0, browselevel=0, state=0x7fff5fbfe9f0) at ../../../../R. 
2.4/src/main/main.c:256
#16 0x0001004d026c in R_ReplConsole (rho=0x10302e3f8,  
savestack=0, browselevel=0) at ../../../../R.2.4/src/main/main.c:305
#17 0x0001004d162a in run_Rmainloop () at ../../../../R.2.4/src/ 
main/main.c:945
#18 0x0001004d163f in Rf_mainloop () at ../../../../R.2.4/src/ 
main/main.c:952
#19 0x00010ddc in main (ac=1, av=0x7fff5fbfeeb0)  
at ../../../../R.2.4/src/main/Rmain.c:33

best,

Simon.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel