RODBC - address 0x407, cause 'memory not mapped'

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

RODBC - address 0x407, cause 'memory not mapped'

marcos.takahashi
Hi guys,

I am running a simple R script using RODBC that follows:

----

library(RODBC)
ch <- odbcConnect("con")

cust<- sqlQuery(ch, "select
    id_customer,
    first_name
from
    customers
limit 100")

sales<- sqlQuery(ch, "select
    id_order,
    revenue
from
    sales
limit 100")

-----

And it returns the following error:

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

Traceback:
 1: .Call(C_RODBCQuery, attr(channel, "handle_ptr"), as.character(query),     as.integer(rows_at_time))
 2: odbcQuery(channel, query, rows_at_time)
 3: sqlQuery(ch, "select\n    id_order,\n    revenue\nfrom\n    sales\nlimit 100")

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

------

Does somebody have any idea about this issue?
Reply | Threaded
Open this post in threaded view
|

Re: RODBC - address 0x407, cause 'memory not mapped'

Jeff Newmiller
"con" is probably not a valid ODBC DSN. You need to study how ODBC works independently of R... we cannot tell you what you should be putting there instead.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

On June 6, 2014 5:56:12 AM PDT, "marcos.takahashi" <[hidden email]> wrote:

>Hi guys,
>
>I am running a simple R script using RODBC that follows:
>
>----
>
>library(RODBC)
>ch <- odbcConnect("con")
>
>cust<- sqlQuery(ch, "select
>    id_customer,
>    first_name
>from
>    customers
>limit 100")
>
>sales<- sqlQuery(ch, "select
>    id_order,
>    revenue
>from
>    sales
>limit 100")
>
>-----
>
>And it returns the following error:
>
> *** caught segfault ***
>address 0x407, cause 'memory not mapped'
>
>Traceback:
>1: .Call(C_RODBCQuery, attr(channel, "handle_ptr"),
>as.character(query),    
>as.integer(rows_at_time))
> 2: odbcQuery(channel, query, rows_at_time)
>3: sqlQuery(ch, "select\n    id_order,\n    revenue\nfrom\n  
>sales\nlimit
>100")
>
>Possible actions:
>1: abort (with core dump, if enabled)
>2: normal R exit
>3: exit R without saving workspace
>4: exit R saving workspace
>
>------
>
>Does somebody have any idea about this issue?
>
>
>
>--
>View this message in context:
>http://r.789695.n4.nabble.com/RODBC-address-0x407-cause-memory-not-mapped-tp4691806.html
>Sent from the R help mailing list archive at Nabble.com.
>
>______________________________________________
>[hidden email] mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: RODBC - address 0x407, cause 'memory not mapped'

marcos.takahashi
In reply to this post by marcos.takahashi
Oh, forgot telling the specifications:

R version 3.0.2 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)
Database: Mysql
ODBC Connector: libmyodbc

I've configured ODBC Connection using this hot-to: https://help.ubuntu.com/community/ODBC
Reply | Threaded
Open this post in threaded view
|

Re: RODBC - address 0x407, cause 'memory not mapped'

David Winsemius
In reply to this post by Jeff Newmiller

On Jun 6, 2014, at 8:45 AM, Jeff Newmiller wrote:

> "con" is probably not a valid ODBC DSN. You need to study how ODBC works independently of R... we cannot tell you what you should be putting there instead.

But what ever would be the correct answer, it should not segfault. I'm reasonable sure the maintainer will see this:

> maintainer("RODBC")
[1] "Brian Ripley <[hidden email]>"

It might assist in the debugging process if results of sessionInfo() were included in any followup.

--
David.

> ---------------------------------------------------------------------------
> Jeff Newmiller                        The     .....       .....  Go Live...
> DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
>                                      Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
>
> On June 6, 2014 5:56:12 AM PDT, "marcos.takahashi" <[hidden email]> wrote:
>> Hi guys,
>>
>> I am running a simple R script using RODBC that follows:
>>
>> ----
>>
>> library(RODBC)
>> ch <- odbcConnect("con")
>>
>> cust<- sqlQuery(ch, "select
>>   id_customer,
>>   first_name
>> from
>>   customers
>> limit 100")
>>
>> sales<- sqlQuery(ch, "select
>>   id_order,
>>   revenue
>> from
>>   sales
>> limit 100")
>>
>> -----
>>
>> And it returns the following error:
>>
>> *** caught segfault ***
>> address 0x407, cause 'memory not mapped'
>>
>> Traceback:
>> 1: .Call(C_RODBCQuery, attr(channel, "handle_ptr"),
>> as.character(query),    
>> as.integer(rows_at_time))
>> 2: odbcQuery(channel, query, rows_at_time)
>> 3: sqlQuery(ch, "select\n    id_order,\n    revenue\nfrom\n  
>> sales\nlimit
>> 100")
>>
>> Possible actions:
>> 1: abort (with core dump, if enabled)
>> 2: normal R exit
>> 3: exit R without saving workspace
>> 4: exit R saving workspace
>>
>> ------
>>
>> Does somebody have any idea about this issue?
>>
>


David Winsemius
Alameda, CA, USA

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.