Issue 60 in rpostgresql: dbWriteTable segfaults on an admittedly weird data.frame with raw/bytea fields

6 views
Skip to first unread message

rpost...@googlecode.com

unread,
Jan 29, 2014, 4:41:31 PM1/29/14
to rpostgr...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 60 by peter.kh...@gmail.com: dbWriteTable segfaults on an
admittedly weird data.frame with raw/bytea fields
http://code.google.com/p/rpostgresql/issues/detail?id=60

What steps will reproduce the problem?

dbGetQuery(con,"CREATE TABLE byteatable (name text NOT NULL, val bytea,
PRIMARY KEY (name))")
sample.object <- list("one","two");
ser <- serialize(sample.object,NULL,ascii=F);

df <- data.frame(name=c("first","second"),stringsAsFactors=F);
df$val <- list(ser,ser)

dbWriteTable(con,"byteatable",df,append=T,row.names=F)

What is the expected output? What do you see instead?
All this was for a bytea insertion attempt. Instead, this happens:

*** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
1: .Call("RS_PostgreSQL_CopyInDataframe", conId, dataframe, nrow, p,
PACKAGE = .PostgreSQLPkgName)
2: postgresqlCopyInDataframe(new.con, value)
3: postgresqlWriteTable(conn, name, value, ...)
4: is(object, Cl)
5: is(object, Cl)

6: .valueClassTest(standardGeneric("dbWriteTable"), "logical", "dbWriteTable")
7: dbWriteTable(con, "byteatable", df, append = T, row.names = F)

What version of the product are you using? On what operating system?


Please provide any additional information below.
1. Postgres 9.1 (don't know if matters)
> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] 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
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] PKI_0.1-1 base64enc_0.1-1 RPostgreSQL_0.5 DBI_0.2-7

loaded via a namespace (and not attached):
[1] compiler_2.15.3 tools_2.15.3

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

rpost...@googlecode.com

unread,
May 27, 2014, 2:15:51 PM5/27/14
to rpostgr...@googlegroups.com

Comment #1 on issue 60 by madsurge...@gmail.com: dbWriteTable segfaults on
an admittedly weird data.frame with raw/bytea fields
http://code.google.com/p/rpostgresql/issues/detail?id=60

I have exactly the same problem on Ubuntu 14.04 with the newest R packages
from CRAN.
Reply all
Reply to author
Forward
0 new messages