[R] rdbi segmentation fault (fwd)

Rafael A. Irizarry ririzarr at jhsph.edu
Thu Feb 6 17:02:03 CET 2003


one more bit of information about this problem. If I start R as the 
user "postgres" i dont have the segmentation fault.

---------- Forwarded message ----------
Date: Wed, 5 Feb 2003 19:19:39 -0500 (EST)
From: Rafael A. Irizarry <ririzarr at jhsph.edu>
Reply-To: rafa at jhu.edu
To: "R-Help (E-mail)" <r-help at r-project.org>
Subject: rdbi segmentation fault

hi! i am experiencing the same behaviour explained here:

http://finzi.psych.upenn.edu/R/Rhelp02/archive/2482.html 
(i copied the message below)

has anybody found a solution?

here is the code that gives me a segmentation fault
 library(Rdbi)
 library(Rdbi.PgSQL)
 
 conn <- dbConnect(PgSQL(), dbname = "PGA")
 tmp <- "create table test ( expid int, name varchar(128));" 
 result <- dbSendQuery(conn,tmp)
 dbClearResult(result) 

the last line can be substituted by
 dbDisconnect(conn)
and you get a segmentation fault too.
 
The database PGA does exist and the dbSendQuery does create a table (i
checked via psql)

i followed the instructions given by tim (see url or msg below) and im
sending (what think is) the backtrace:
Program received signal SIGSEGV, Segmentation fault.
Rf_getAttrib (vec=0x8b50cd0, name=0x81d19b8) at attrib.c:93
93		if (TAG(s) == name) {
(gdb) backtrace
#0  Rf_getAttrib (vec=0x8b50cd0, name=0x81d19b8) at attrib.c:93
#1  0x080c0a8f in Rf_usemethod (generic=0xbffff0c0 "print", obj=0x8b50cd0, 
    call=0x880c5a0, args=0x81d1b08, rho=0x89dd900, callrho=0x81e6f68, 
    defrho=0x81e6f14, ans=0xbffff0bc) at objects.c:271
#2  0x080c1058 in do_usemethod (call=0x880c5a0, op=0x81e4f80, 
args=0x880c5bc, 
    env=0x89dd900) at objects.c:409
#3  0x0809cd29 in Rf_eval (e=0x880c5a0, rho=0x89dd900) at eval.c:404
#4  0x0809d26d in Rf_applyClosure (call=0x89de354, op=0x880c4c0, 
    arglist=0x89dd874, rho=0x81e6f68, suppliedenv=0x81d1b08) at eval.c:595
#5  0x0809cf1d in Rf_eval (e=0x89de354, rho=0x81e6f68) at eval.c:439
#6  0x080f013c in Rf_PrintValueEnv (s=0x8b50cd0, env=0x81e6f68) at 
print.c:662
#7  0x080b5597 in Rf_ReplIteration (rho=0x81e6f68, savestack=0, 
browselevel=0, 
    state=0xbffff550) at main.c:236
#8  0x080b56ad in R_ReplConsole (rho=0x81e6f68, savestack=0, 
browselevel=0)
    at main.c:280
#9  0x080b5d4b in run_Rmainloop () at main.c:579
#10 0x0811570e in main (ac=1, av=0xbffffa34) at system.c:99
#11 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6


thanks,
rafael

MESSGAGE from archive:

I've not seen this behavior. Try "R -d gdb" and then type "run" at the
gdb prompt. Run your R session until the seg fault and send me the
backtrace. Thanks.

Tim

On Thu, 2002-04-25 at 18:05, Andrew Schuh wrote:
> I can use the Rdbi package to connect to a PostGreSQL server fine but
> when I use the dbDisconnect(), I get a segmentation error and it throws
> me out of R. I'm using RH7.2, R1.4.1, Rdbi 0.1-2, and Rdbi.PgSQL 0.1-2.
>
> Anyone else seen anything like this and have an possible answer?
>
> Andrew Schuh
>
>
> 
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read 
http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> 
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._




More information about the R-help mailing list