[R-sig-DB] calloc error issued by sqlQuery

Seth Falcon @eth @end|ng |rom u@erpr|m@ry@net
Sun Jun 3 17:32:40 CEST 2012


On Sun, Jun 3, 2012 at 6:54 AM, Dirk Eddelbuettel <edd using debian.org> wrote:
>
> On 3 June 2012 at 12:04, Idit Buch wrote:
> | Hi,
> |
> | I'm using R version 2.14.1 on Linux (Centos) and trying to issue a "select * from ..." query using sqlQuery(...).
> | I then receive the following error:
> | Error in odbcQuery(channel, query, rows_at_time) :
> |   Calloc could not allocate memory (18446744073709551616 of 22816 bytes)
>
> [...]
>
> | Any idea ?
>
> Yes. Your query appears to generate a result set which would be
>
>     18446744073709551616
>
> bytes large.  So I suggest you change your query with suitable 'where ...' or
> 'limit N' clauses.

That's a rather unlikely root cause as it suggests that answering the
query requires an allocation of 16,384 petabytes. It seems more likely
to me that something has triggered an allocation with uninitialized
memory. Running the query with R under gdb should help.


-- 
Seth Falcon | @sfalcon | http://userprimary.net/




More information about the R-sig-DB mailing list