[BioC] segfault ReadAffy cause 'memory not mapped'

Brian D. Peyser PhD brian.peyser at nih.gov
Thu Aug 22 03:07:58 CEST 2013


On Wed, 2013-08-21 at 16:21 -0700, Ben Bolstad wrote:
> Well, internally  read_abatch is using allocMatrix() to actually allocate
> the main block of memory that will be used to store the probe intensities.
>  However, there are a lot of places where "int" is used as the indexing
> variable. Probably if I had had better foresight when I wrote this code 10
> years ago, I'd have used something a bit more specific (eg int64_t). I'm
> guessing it is one of these sorts of things that is causing the crash.
> I'll try to get around to refactoring the code at some point.
> 
> If you'd like you could send me the gdb backtrace at the point of the
> segfault and I could investigate further.
> 
> Best,
> 
> Ben
> 
Thanks for the info, Ben!

With a little help from Google I ran R under gdb:

$ R -d gdb
(gdb) run --vanilla
> library(affy)
> data <- read.affybatch(filenames=list.files(pattern="\\.CEL$", ignore.case=TRUE))

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2849c46 in read_binarycel_file_intensities (filename=<optimized out>, intensity=0x7ff67b3fc048, chip_num=1848, rows=<optimized out>, 
    cols=<optimized out>, chip_dim_rows=<optimized out>) at read_abatch.c:2862
2862	read_abatch.c: No such file or directory.
(gdb) set logging on
Copying output to gdb.txt.
(gdb) bt
#0  0x00007ffff2849c46 in read_binarycel_file_intensities (filename=<optimized out>, intensity=0x7ff67b3fc048, chip_num=1848, rows=<optimized out>, 
    cols=<optimized out>, chip_dim_rows=<optimized out>) at read_abatch.c:2862
#1  0x00007ffff285062c in read_abatch (filenames=0x298eb40, rm_mask=0x1ffcb68, rm_outliers=0x1ffcb98, rm_extra=0x1ffcbc8, ref_cdfName=<optimized out>, 
    ref_dim=<optimized out>, verbose=0x1ffcbf8) at read_abatch.c:3959
#2  0x00007ffff79310c2 in do_dotcall (call=0x1d88d00, op=<optimized out>, args=<optimized out>, env=0x1d793b0) at dotcode.c:600
#3  0x00007ffff797146e in Rf_eval (e=0x1d88d00, rho=0x1d793b0) at eval.c:635
#4  0x00007ffff7972da0 in do_set (call=0x1d88be8, op=0x610458, args=0x1d88c20, rho=0x1d793b0) at eval.c:1871
#5  0x00007ffff7971277 in Rf_eval (e=0x1d88be8, rho=0x1d793b0) at eval.c:607
#6  0x00007ffff7972f90 in do_begin (call=0x1dc8c40, op=0x610260, args=0x1d88bb0, rho=0x1d793b0) at eval.c:1557
#7  0x00007ffff7971277 in Rf_eval (e=0x1dc8c40, rho=0x1d793b0) at eval.c:607
#8  0x00007ffff797448d in Rf_applyClosure (call=0x1dcc0a8, op=0x1dcb648, arglist=<optimized out>, rho=0x6348b8, suppliedenv=<optimized out>) at eval.c:1003
#9  0x00007ffff7970fcf in Rf_eval (e=0x1dcc0a8, rho=0x6348b8) at eval.c:654
#10 0x00007ffff7972da0 in do_set (call=0x1dcb370, op=0x610458, args=0x1dcc118, rho=0x6348b8) at eval.c:1871
#11 0x00007ffff7971277 in Rf_eval (e=0x1dcb370, rho=0x6348b8) at eval.c:607
#12 0x00007ffff799911d in Rf_ReplIteration (rho=0x6348b8, savestack=<optimized out>, browselevel=<optimized out>, state=0x7fffffffd340) at main.c:258
#13 0x00007ffff79993c0 in R_ReplConsole (rho=0x6348b8, savestack=0, browselevel=0) at main.c:307
#14 0x00007ffff7999450 in run_Rmainloop () at main.c:986
#15 0x000000000040078b in main (ac=<optimized out>, av=<optimized out>) at Rmain.c:32
#16 0x00007ffff72dc76d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#17 0x00000000004007bd in _start ()
(gdb) 

(gdb log attached as gdb.txt)

Hope that helps!

-Brian
-- 
Brian D. Peyser PhD
Special Assistant to the Associate Director
Office of the Associate Director
Developmental Therapeutics Program
Division of Cancer Treatment and Diagnosis
National Cancer Institute
National Institutes of Health
301-524-5587 (mobile)
-------------- next part --------------
#0  0x00007ffff2849c46 in read_binarycel_file_intensities (filename=<optimized out>, intensity=0x7ff67b3fc048, chip_num=1848, rows=<optimized out>, 
    cols=<optimized out>, chip_dim_rows=<optimized out>) at read_abatch.c:2862
#1  0x00007ffff285062c in read_abatch (filenames=0x298eb40, rm_mask=0x1ffcb68, rm_outliers=0x1ffcb98, rm_extra=0x1ffcbc8, ref_cdfName=<optimized out>, 
    ref_dim=<optimized out>, verbose=0x1ffcbf8) at read_abatch.c:3959
#2  0x00007ffff79310c2 in do_dotcall (call=0x1d88d00, op=<optimized out>, args=<optimized out>, env=0x1d793b0) at dotcode.c:600
#3  0x00007ffff797146e in Rf_eval (e=0x1d88d00, rho=0x1d793b0) at eval.c:635
#4  0x00007ffff7972da0 in do_set (call=0x1d88be8, op=0x610458, args=0x1d88c20, rho=0x1d793b0) at eval.c:1871
#5  0x00007ffff7971277 in Rf_eval (e=0x1d88be8, rho=0x1d793b0) at eval.c:607
#6  0x00007ffff7972f90 in do_begin (call=0x1dc8c40, op=0x610260, args=0x1d88bb0, rho=0x1d793b0) at eval.c:1557
#7  0x00007ffff7971277 in Rf_eval (e=0x1dc8c40, rho=0x1d793b0) at eval.c:607
#8  0x00007ffff797448d in Rf_applyClosure (call=0x1dcc0a8, op=0x1dcb648, arglist=<optimized out>, rho=0x6348b8, suppliedenv=<optimized out>) at eval.c:1003
#9  0x00007ffff7970fcf in Rf_eval (e=0x1dcc0a8, rho=0x6348b8) at eval.c:654
#10 0x00007ffff7972da0 in do_set (call=0x1dcb370, op=0x610458, args=0x1dcc118, rho=0x6348b8) at eval.c:1871
#11 0x00007ffff7971277 in Rf_eval (e=0x1dcb370, rho=0x6348b8) at eval.c:607
#12 0x00007ffff799911d in Rf_ReplIteration (rho=0x6348b8, savestack=<optimized out>, browselevel=<optimized out>, state=0x7fffffffd340) at main.c:258
#13 0x00007ffff79993c0 in R_ReplConsole (rho=0x6348b8, savestack=0, browselevel=0) at main.c:307
#14 0x00007ffff7999450 in run_Rmainloop () at main.c:986
#15 0x000000000040078b in main (ac=<optimized out>, av=<optimized out>) at Rmain.c:32
#16 0x00007ffff72dc76d in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#17 0x00000000004007bd in _start ()


More information about the Bioconductor mailing list