[R-SIG-Mac] *** caught bus error *** address 0x114382544, cause 'non-existent physical address'

Simon Urbanek simon.urbanek at r-project.org
Wed Nov 18 21:07:56 CET 2009


Richard,

in order to track this down, please start R64, type

Sys.getpid()

and note down the number. Then in a separate window open Terminal and  
type

gdb

Then on the gdb console (it will just say "(gdb)") type

attach n

where n is the number from above. It will do something for a while and  
when it comes back in the console, type

c

Then do your work in R until you get a crash. Once you do, you will  
see something happening in the gdb console. Then type

bt

and copy/paste everything that gdb printed since you typed "c" and  
send it to me.

Thanks,
Simon

-----

Practical example -- in R:

 > Sys.getpid()
[1] 19381

in Terminal:

ginaz:~$ gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40  
UTC 2008)
[...]
This GDB was configured as "i386-apple-darwin".
(gdb) attach 19381
Attaching to process 19381.
Reading symbols for shared libraries . done
[...]
0x9428a6fa in select$DARWIN_EXTSN ()
(gdb) c
Continuing.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000003
0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../R-2.10- 
branch/src/main/memory.c:2809
2809	void (SET_SYMVALUE)(SEXP x, SEXP v) { CHECK_OLD_TO_NEW(x, v);  
SYMVALUE(x) = v; }
(gdb) bt
#0  0x00412d09 in SET_SYMVALUE (x=0x1007110, v=0x0) at ../../../../ 
R-2.10-branch/src/main/memory.c:2809
#1  0x0041068e in Rf_ReplIteration (rho=0x1023c38, savestack=0,  
browselevel=0, state=0xbfffe53c) at ../../../../R-2.10-branch/src/main/ 
main.c:263
#2  0x00410a40 in R_ReplConsole (rho=0x1023c38, savestack=0,  
browselevel=0) at ../../../../R-2.10-branch/src/main/main.c:311
#3  0x0041129b in run_Rmainloop () at ../../../../R-2.10-branch/src/ 
main/main.c:964
#4  0x00001ff0 in main (ac=1, av=0xbffff5c8) at ../../../../R-2.10- 
branch/src/main/Rmain.c:33
(gdb) q
The program is running.  Quit anyway (and detach it)? (y or n) y
Detaching from process 19381 thread 0x613.


On Nov 18, 2009, at 14:39 , Richard R. Liu wrote:

> I am experiencing a curious error running R64 (2009-11-18 r50482) on  
> a MacBook Pro 17" Unibody early 2009 with 8GB RAM.  In the console  
> excerpt below sentences.1000.clustered is a dataframe consisting of  
> two vectors, sent and cluster.  sent is a vector of 1000 sentences  
> chosen at random from over 3 million, and cluster is a vector of  
> integers denoting to which of 5 clusters the sentence belongs.  For  
> each cluster I want to display the sentences that belong to it as  
> follows:
>
>
> R version 2.10.0 Patched (2009-11-18 r50482)
> Copyright (C) 2009 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
>  Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
> [R.app GUI 1.30 (5521) x86_64-apple-darwin9.8.0]
>
> [Workspace restored from /Users/richard/.RData]
>
> > library(filehash)
> filehash: Simple key-value database (2.0-1 2008-12-19)
> > db <- dbInit("/Volumes/Work on RDR Test Documents/R Databases/ 
> DB_TXT", type = "RDS")
> > dbLoad(db)
> >
> > sent.clust <- sentences.1000.clustered
> > i.clust.2 <- which(sent.clust$cluster == 2)
> > attributes(sent.clust)
> $names
> [1] "sent"    "cluster"
>
> $row.names
>   [1]    1    2    3    4    5    6    7    8    9   10   11   12    
> 13   14   15   16   17   18   19   20   21   22   23   24   25    
> 26   27   28   29
> ...
> [987]  987  988  989  990  991  992  993  994  995  996  997  998   
> 999 1000
>
> $class
> [1] "data.frame"
>
> > i.clust.2 <- which(sent.clust$cluster == 2)
> > nchar(sent.clust$sent[i.clust.2])
>  [1]   232   419   787  1010  1926   357  2865   657   560   213   
> 2175  2363  1300   359   331   965   581   732   398   245  1650  
> 25893  1289   510
> [25]  1714   524   747  2378   465   651  2253   215   460   253   
> 2475   554  1130   529   261  1413   418  2168  1569  1538   301   
> 2506  1163  3036
> [49]  1445   199  1231   370  1307   371   379   232  1297   500    
> 409   481  2187   314   730  1634   971   860   362   506  1606    
> 394   145   480
> [73]  1582  1471  1269   308  1113   444   990   298  1644   445    
> 357  1204   322   638  2182   805  1545   368  1461  1347   649    
> 399  1094  1624
> [97] 14605  1637   269   503   502  2145  1398   481   122  2248
> > sent.clust$sent[i.clust.2]
>  [1] "(patient continuing ...)  
> ______________________________________________________________________________________________________________________________________ 
>  Investigator text for Adverse Events encoded using MedDRA version  
> 11.0. "
>  [2]
> *** caught bus error ***
> address 0x114382544, cause 'non-existent physical address'
>
> 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:
>
> The point of
>
> > i.clust.2 <- which(sent.clust$cluster == 2)
> > nchar(sent.clust$sent[i.clust.2])
>
> is to try to isolate the problem.  Indeed, the more compact  
> sent.clust$sent[which(sent.clust$cluster == 2)] work when I start R  
> in 32-bit mode.  In 64-bit mode, attempting to display the sentences  
> in cluster 5 also fails, whereas for clusters 1, 3, 4 it succeeds.   
> In 32-bit mode, I have experienced no such problem.
>
> Does anybody have any ideas about what is wrong?
>
> Regards,
> Richard
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list