[R] RMySQL_0.7-4 core dumped on dbWriteTable
Jay Castino
jjc at jjceng.com
Wed Mar 10 02:52:07 CET 2010
Good Afternoon:
Have an R script that uses RMySQL package.
Everything works great within 32 bit ubuntu linux environment
(/usr/sbin/mysqld: ELF 32-bit LSB shared object, Intel 80386, version
1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15,
stripped).
> mysqlClientLibraryVersions()
5.1.41 5.1.37
50141 50137
Now testing on 64 bit ubuntu linux environment (/usr/sbin/mysqld:ELF
64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked
(uses shared libs), for GNU/Linux 2.6.15, stripped).
> mysqlClientLibraryVersions()
5.0.75 5.0.75
50075 50075
Followed instructions for RMySQL installation (specifying MySQL
headers and library directories)
export PKG_CPPFLAGS="-I/usr/include/mysql"
export PKG_LIBS="-L/usr/lib/ -lmysqlclient" (This is where the
'/usr/lib64/mysql' symbolic link ends up).
Made sure I could successfully query and write to the database
otherwise (with RODBC).
So far, can successfully connect and disconnect using RMySQL
Also, am able to execute dbGetQuery command.
However, upon executing the dbWriteTable command (see partial .RHistory below),
R crashes with "***buffer overflow detected***:
/usr/lib64/R/bin/exec/R terminated"
How can I fix this?
Appreciate your help.
Sincerely,
Jay James Castino, PE
Principal
JJCENG.COM, PC
www.jjceng.com
+1 (541) 633-7990
1560 NE 1st ST. #14
Bend, OR USA 97701
###### partial .RHistory #######
>sessionInfo()
R version 2.10.1 (2009-12-14)
x86_64-pc-linux-gnu
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=C LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 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
> library(RMySQL)
Loading required package: DBI
> con<- dbConnect(dbDriver("MySQL"), dbname = "knottlf_local",user="mysql", password="xxxxxx", host="localhost")
> ch4dd<-data.frame(6,"2010-03-06")
> names(ch4dd)<-c("scada_terminal_id","timestamp_on")
> ch4dd
scada_terminal_id timestamp_on
1 6 2010-03-06
> dbGetQuery(con, "SELECT LAST_INSERT_ID() FROM `knottlf_local`.`R_ch4_concentrations`")
data frame with 0 columns and 0 rows
> dbWriteTable(con, name = "R_ch4_concentrations",ch4dd, append = TRUE, row.names = FALSE)
*** buffer overflow detected ***: /usr/lib64/R/bin/exec/R terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7fb4375292c7]
/lib/libc.so.6[0x7fb437527170]
/lib/libc.so.6[0x7fb437526519]
/lib/libc.so.6(_IO_default_xsputn+0x96)[0x7fb4374a0426]
/lib/libc.so.6(_IO_vfprintf+0x348d)[0x7fb437472e2d]
/lib/libc.so.6(__vsprintf_chk+0x99)[0x7fb4375265b9]
/lib/libc.so.6(__sprintf_chk+0x80)[0x7fb437526500]
/home/jbiztino/R/x86_64-pc-linux-gnu-library/2.10/RMySQL/libs/RMySQL.so(RS_MySQL_exec+0x1be)[0x7fb4348630de]
/usr/lib64/R/lib/libR.so[0x7fb437847ace]
/usr/lib64/R/lib/libR.so(Rf_eval+0x6b6)[0x7fb437877ed6]
/usr/lib64/R/lib/libR.so[0x7fb43787a0e0]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
/usr/lib64/R/lib/libR.so[0x7fb43787a1ce]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
/usr/lib64/R/lib/libR.so(Rf_applyClosure+0x2d3)[0x7fb43787ba93]
/usr/lib64/R/lib/libR.so(Rf_eval+0x3c3)[0x7fb437877be3]
/usr/lib64/R/lib/libR.so[0x7fb43787b39c]
/usr/lib64/R/lib/libR.so(R_execMethod+0x241)[0x7fb43787b6d1]
/usr/lib64/R/library/methods/libs/methods.so[0x7fb435259655]
/usr/lib64/R/lib/libR.so[0x7fb4378c205c]
/usr/lib64/R/lib/libR.so(Rf_eval+0x5dc)[0x7fb437877dfc]
/usr/lib64/R/lib/libR.so[0x7fb43787802f]
/usr/lib64/R/lib/libR.so(Rf_eval+0x26d)[0x7fb437877a8d]
/usr/lib64/R/lib/libR.so(Rf_eval+0x64b)[0x7fb437877e6b]
/usr/lib64/R/lib/libR.so[0x7fb43787802f]
/usr/lib64/R/lib/libR.so(Rf_eval+0x26d)[0x7fb437877a8d]
/usr/lib64/R/lib/libR.so(Rf_eval+0x64b)[0x7fb437877e6b]
/usr/lib64/R/lib/libR.so[0x7fb437878f7d]
/usr/lib64/R/lib/libR.so(Rf_eval+0x58e)[0x7fb437877dae]
/usr/lib64/R/lib/libR.so[0x7fb43787a0e0]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
/usr/lib64/R/lib/libR.so[0x7fb43787a1ce]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
/usr/lib64/R/lib/libR.so(Rf_applyClosure+0x2d3)[0x7fb43787ba93]
/usr/lib64/R/lib/libR.so(Rf_eval+0x3c3)[0x7fb437877be3]
/usr/lib64/R/lib/libR.so[0x7fb43787ae41]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
/usr/lib64/R/lib/libR.so[0x7fb43787a7e6]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
/usr/lib64/R/lib/libR.so[0x7fb43787a1ce]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
/usr/lib64/R/lib/libR.so[0x7fb43787a1ce]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
/usr/lib64/R/lib/libR.so(Rf_applyClosure+0x2d3)[0x7fb43787ba93]
/usr/lib64/R/lib/libR.so(Rf_eval+0x3c3)[0x7fb437877be3]
/usr/lib64/R/lib/libR.so(Rf_applyClosure+0x2d3)[0x7fb43787ba93]
/usr/lib64/R/lib/libR.so(Rf_eval+0x3c3)[0x7fb437877be3]
/usr/lib64/R/lib/libR.so[0x7fb43787802f]
/usr/lib64/R/lib/libR.so(Rf_eval+0x26d)[0x7fb437877a8d]
/usr/lib64/R/lib/libR.so(Rf_eval+0x64b)[0x7fb437877e6b]
/usr/lib64/R/lib/libR.so[0x7fb43787802f]
/usr/lib64/R/lib/libR.so(Rf_eval+0x26d)[0x7fb437877a8d]
/usr/lib64/R/lib/libR.so(Rf_eval+0x64b)[0x7fb437877e6b]
/usr/lib64/R/lib/libR.so[0x7fb43787802f]
/usr/lib64/R/lib/libR.so(Rf_eval+0x26d)[0x7fb437877a8d]
/usr/lib64/R/lib/libR.so(Rf_eval+0x64b)[0x7fb437877e6b]
/usr/lib64/R/lib/libR.so[0x7fb43787802f]
/usr/lib64/R/lib/libR.so(Rf_eval+0x26d)[0x7fb437877a8d]
/usr/lib64/R/lib/libR.so(Rf_eval+0x64b)[0x7fb437877e6b]
/usr/lib64/R/lib/libR.so[0x7fb437878bc5]
/usr/lib64/R/lib/libR.so[0x7fb437878d63]
/usr/lib64/R/lib/libR.so(Rf_eval+0x46e)[0x7fb437877c8e]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fc:00 5693955
/usr/lib/R/bin/exec/R
00600000-00601000 r--p 00000000 fc:00 5693955
/usr/lib/R/bin/exec/R
00601000-00602000 rw-p 00001000 fc:00 5693955
/usr/lib/R/bin/exec/R
01c83000-033c1000 rw-p 01c83000 00:00 0 [heap]
7fb434008000-7fb434011000 r-xp 00000000 fc:00 7069897
/lib/libcrypt-2.9.so
7fb434011000-7fb434210000 ---p 00009000 fc:00 7069897
/lib/libcrypt-2.9.so
7fb434210000-7fb434211000 r--p 00008000 fc:00 7069897
/lib/libcrypt-2.9.so
7fb434211000-7fb434212000 rw-p 00009000 fc:00 7069897
/lib/libcrypt-2.9.so
7fb434212000-7fb434240000 rw-p 7fb434212000 00:00 0
7fb434240000-7fb434257000 r-xp 00000000 fc:00 7069915
/lib/libpthread-2.9.so
7fb434257000-7fb434456000 ---p 00017000 fc:00 7069915
/lib/libpthread-2.9.so
7fb434456000-7fb434457000 r--p 00016000 fc:00 7069915
/lib/libpthread-2.9.so
7fb434457000-7fb434458000 rw-p 00017000 fc:00 7069915
/lib/libpthread-2.9.so
7fb434458000-7fb43445c000 rw-p 7fb434458000 00:00 0
7fb43445c000-7fb434611000 r-xp 00000000 fc:00 4699043
/usr/lib/libmysqlclient.so.15.0.0
7fb434611000-7fb434810000 ---p 001b5000 fc:00 4699043
/usr/lib/libmysqlclient.so.15.0.0
7fb434810000-7fb434815000 r--p 001b4000 fc:00 4699043
/usr/lib/libmysqlclient.so.15.0.0
7fb434815000-7fb434859000 rw-p 001b9000 fc:00 4699043
/usr/lib/libmysqlclient.so.15.0.0
7fb434859000-7fb43485b000 rw-p 7fb434859000 00:00 0
7fb43485b000-7fb434866000 r-xp 00000000 fc:00 6750241
/home/jbiztino/R/x86_64-pc-linux-gnu-library/2.10/RMySQL/libs/RMySQL.so
7fb434866000-7fb434a65000 ---p 0000b000 fc:00 6750241
/home/jbiztino/R/x86_64-pc-linux-gnu-library/2.10/RMySQL/libs/RMySQL.so
7fb434a65000-7fb434a66000 r--p 0000a000 fc:00 6750241
/home/jbiztino/R/x86_64-pc-linux-gnu-library/2.10/RMySQL/libs/RMySQL.so
7fb434a66000-7fb434a67000 rw-p 0000b000 fc:00 6750241
/home/jbiztino/R/x86_64-pc-linux-gnu-library/2.10/RMySQL/libs/RMySQL.so
7fb434a67000-7fb434aef000 r-xp 00000000 fc:00 5694532
/usr/lib/R/library/stats/libs/stats.so
7fb434aef000-7fb434cee000 ---p 00088000 fc:00 5694532
/usr/lib/R/library/stats/libs/stats.so
7fb434cee000-7fb434cf0000 r--p 00087000 fc:00 5694532
/usr/lib/R/library/stats/libs/stats.so
7fb434cf0000-7fb434cf2000 rw-p 00089000 fc:00 5694532
/usr/lib/R/library/stats/libs/stats.so
7fb434cf2000-7fb434d16000 r-xp 00000000 fc:00 5694379
/usr/lib/R/library/grDevices/libs/grDevices.so
7fb434d16000-7fb434f16000 ---p 00024000 fc:00 5694379
/usr/lib/R/library/grDevices/libs/grDevices.so
7fb434f16000-7fb434f17000 r--p 00024000 fc:00 5694379
/usr/lib/R/library/grDevices/libs/grDevices.so
7fb434f17000-7fb434f18000 rw-p 00025000 fc:00 5694379
/usr/lib/R/library/grDevices/libs/grDevices.so
7fb434fe0000-7fb434fe2000 r-xp 00000000 fc:00 4700210
/usr/lib/gconv/ISO8859-1.so
7fb434fe2000-7fb4351e1000 ---p 00002000 fc:00 4700210
/usr/lib/gconv/ISO8859-1.so
7fb4351e1000-7fb4351e2000 r--p 00001000 fc:00 4700210
/usr/lib/gconv/ISO8859-1.so
7fb4351e2000-7fb4351e3000 rw-p 00002000 fc:00 4700210
/usr/lib/gconv/ISO8859-1.so
7fb4351e3000-7fb435255000 rw-p 7fb4351e3000 00:00 0
7fb435255000-7fb43525c000 r-xp 00000000 fc:00 5694776
/usr/lib/R/library/methods/libs/methods.so
7fb43525c000-7fb43545b000 ---p 00007000 fc:00 5694776
/usr/lib/R/library/methods/libs/methods.so
7fb43545b000-7fb43545c000 r--p 00006000 fc:00 5694776
/usr/lib/R/library/methods/libs/methods.so
7fb43545c000-7fb43545d000 rw-p 00007000 fc:00 5694776
/usr/lib/R/library/methods/libs/methods.so
7fb43545d000-7fb43548d000 rw-p 7fb43545d000 00:00 0
7fb43548d000-7fb435499000 r-xp 00000000 fc:00 7069909
/lib/libnss_files-2.9.so
7fb435499000-7fb435698000 ---p 0000c000 fc:00 7069909
/lib/libnss_files-2.9.so
7fb435698000-7fb435699000 r--p 0000b000 fc:00 7069909
/lib/libnss_files-2.9.so
7fb435699000-7fb43569a000 rw-p 0000c000 fc:00 7069909
/lib/libnss_files-2.9.so
7fb43569a000-7fb4356a4000 r-xp 00000000 fc:00 7069911
/lib/libnss_nis-2.9.so
7fb4356a4000-7fb4358a3000 ---p 0000a000 fc:00 7069911
/lib/libnss_nis-2.9.so
7fb4358a3000-7fb4358a4000 r--p 00009000 fc:00 7069911
/lib/libnss_nis-2.9.so
7fb4358a4000-7fb4358a5000 rw-p 0000a000 fc:00 7069911
/lib/libnss_nis-2.9.so
7fb4358a5000-7fb4358bb000 r-xp 00000000 fc:00 7069905
/lib/libnsl-2.9.so
7fb4358bb000-7fb43Aborted (core dumped)
More information about the R-help
mailing list