Bug 16560 - AIX 32 bit R 3.2.2 segfault when reading non-trivial data set
Summary: AIX 32 bit R 3.2.2 segfault when reading non-trivial data set
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Low-level (show other bugs)
Version: R 3.2.2
Hardware: PowerPC AIX
: P5 critical
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2015-10-09 04:02 UTC by vinhdizzo
Modified: 2015-10-09 18:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vinhdizzo 2015-10-09 04:02:30 UTC
Hi,

If R 3.2.2 is compiled as 32 bit on AIX 6 using the standard ./configure && make, the 32 bit R segfaults (sometimes it just gives the message "Error: cannot allocate vector of size 78 Kb").

The exact error message:
> d1 = read.table('baz700mb.txt', header=TRUE, sep='|')

 *** caught segfault ***
address 4, cause 'invalid permissions'

The file size is 1800180607.  It 10,002 columns and 10,000 rows.

This was discovered in the course of debugging the following error:
https://github.com/hadley/haven/issues/113
Comment 1 Martyn Plummer 2015-10-09 17:20:37 UTC
It's no surprise that you have run out of memory. See the section "Memory usage" on the help page for read.table. On Linux, an attempt to read in an equally large file with 32-bit R does not crash, but stops cleanly with the error message "Error: cannot allocate vector of size...". This happens when the memory usage for the R process reaches 4Gb, which is the maximum size of a linear address space for a 32-bit process.

As far as I know, nobody in the core team has access to AIX, so reproducing the crash may be difficult.
Comment 2 vinhdizzo 2015-10-09 18:11:04 UTC
Martyn,

I'm willing to help with debugging (applying patches, recompiling, and reporting the output) if that's necessary.  I was able to compile R 64 bit on AIX, so this isn't a critical issue for me, but I thought it would be good to have it fixed for R.  Thanks.