[Neurodebian-users] debruijn malloc error

Yaroslav Halchenko debian at onerussian.com
Tue Jul 2 20:29:19 UTC 2013


Hi Geoffrey,

Thank you for monitoring the mailing list!

Antti kindly shared the neural.txt, so here are the gory details.  Also
worrisome was a flood of valgrind warnings, so if someone could look into those
-- they might even be related to this case.

Moreover, please consider adopting attached patch -- it would allow
building with custom CFLAGS picked up from the environment without
modifying Makefile itself.

$> cat neural.txt 
-1 1 2 1 2
-1 1 2 1 2
-1 1 2 1 2
-1 1 2 1 2
-1 1 2 1 2

$> gdb --args ./debruijn 5 2 5 HRF neural.txt -eval 5000                              
GNU gdb (GDB) 7.4.1-debian                              
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/yoh/deb/gits/pkg-exppsy/debruijn/debruijn...done.
(gdb) r
Starting program: /home/yoh/deb/gits/pkg-exppsy/debruijn/debruijn 5 2 5 HRF neural.txt -eval 5000
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?

Using a Hemodynamic Response Filter as a guide function.
The SOA used here is: 5000



Cycle found:
------------
0,4,4,2,2,3,3,0,3,2,4,1,1,2,1,4,0,2,0,1,3,4,3,1,0
------------
Valid sequence 

debruijn: malloc.c:3616: _int_malloc: Assertion `(unsigned long)(size) >= (unsigned long)(nb)' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6e5c295 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6e5c295 in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6e5f438 in __GI_abort () at abort.c:90
#2  0x00007ffff6ea113a in __malloc_assert (assertion=assertion at entry=0x7ffff6f941c8 "(unsigned long)(size) >= (unsigned long)(nb)", file=file at entry=0x7ffff6f8fc52 "malloc.c", line=line at entry=3616, 
    function=function at entry=0x7ffff6f8ff50 "_int_malloc") at malloc.c:288
#3  0x00007ffff6ea3d96 in _int_malloc (av=av at entry=0x7ffff71ce640, bytes=bytes at entry=272) at malloc.c:3616
#4  0x00007ffff6ea40e1 in _int_memalign (av=av at entry=0x7ffff71ce640, alignment=alignment at entry=32, bytes=bytes at entry=200) at malloc.c:4319
#5  0x00007ffff6ea58ef in __GI___libc_memalign (alignment=alignment at entry=32, bytes=bytes at entry=200) at malloc.c:3026
#6  0x00007ffff7a1549d in fftw_kernel_malloc (n=n at entry=200) at kalloc.c:91
#7  0x00007ffff7a14865 in fftw_malloc_plain (n=n at entry=200) at alloc.c:268
#8  0x00007ffff7a187f9 in fftw_mkstride (n=n at entry=25, s=s at entry=200) at stride.c:29
#9  0x00007ffff7a1ceb3 in mkcldw (ego_=0x639380, r=25, irs=200, ors=<optimized out>, m=100, ms=2, v=1, ivs=0, ovs=0, mstart=0, mcount=100, rio=0x8ecd68, iio=0x8ecd60, plnr=0x6265c0) at dftw-direct.c:283
#10 0x00007ffff7a1c21b in mkplan (plnr=0x6265c0, p_=0x626280, ego_=0x639380) at ct.c:146
#11 mkplan (ego_=0x639380, p_=0x626280, plnr=0x6265c0) at ct.c:119
#12 0x00007ffff7a17096 in invoke_solver (nflags=0x7ffffffed9f0, s=<optimized out>, p=0x626280, ego=0x6265c0) at planner.c:486
#13 mkplan (ego=0x6265c0, p=0x626280) at planner.c:686
#14 0x00007ffff7adbe2c in mkplan (plnr=0x6265c0, flags=64, prb=0x626280, hash_info=1) at apiplan.c:48
#15 0x00007ffff7adc025 in fftw_mkapiplan (sign=sign at entry=1, flags=<optimized out>, flags at entry=64, prb=0x626280) at apiplan.c:133
#16 0x00007ffff7ae07f0 in fftw_plan_many_dft (rank=rank at entry=1, n=n at entry=0x7ffffffedc1c, howmany=howmany at entry=1, in=<optimized out>, inembed=inembed at entry=0x0, istride=istride at entry=1, idist=idist at entry=1, 
    out=0x8ecd60, onembed=onembed at entry=0x0, ostride=ostride at entry=1, odist=odist at entry=1, sign=1, flags=64) at plan-many-dft.c:40
#17 0x00007ffff7adfa99 in fftw_plan_dft (rank=rank at entry=1, n=n at entry=0x7ffffffedc1c, in=<optimized out>, out=<optimized out>, sign=<optimized out>, flags=<optimized out>) at plan-dft.c:26
#18 0x00007ffff7adf843 in fftw_plan_dft_1d (n=2500, in=<optimized out>, out=<optimized out>, sign=<optimized out>, flags=<optimized out>) at plan-dft-1d.c:26
#19 0x000000000040886c in eval_mode(int, int, DBSeq*) () at debruijn.cpp:1254
#20 0x000000000040a9ea in start(int, int, DBSeq*) () at debruijn.cpp:1686
#21 0x000000000040a6a8 in main () at debruijn.cpp:1623



On Tue, 02 Jul 2013, Geoffrey K Aguirre wrote:

> Antti -- I can't speak to the troubles with the debruijn code in debian, but we do have a compiled version of the software available for Mac OS X

> 	https://cfn.upenn.edu/aguirre/wiki/public:de_bruijn_software

> Geoff


> On Jul 2, 2013, at 9:06 AM, Antti Korvenoja <antti.korvenoja at helsinki.fi> wrote:

> > Dear developers,

> > I'm trying to run debruijn on jessie. Using a guide function leads to
> > output below.

> > debruijn 5 2 5 HRF neural.txt -eval 5000

> > Using a Hemodynamic Response Filter as a guide function.
> > The SOA used here is: 5000



> > Cycle found:
> > ------------
> > 0,2,4,1,1,4,3,2,0,4,4,0,1,2,1,0,3,4,2,2,3,3,1,3,0
> > ------------
> > Valid sequence 

> > debruijn: malloc.c:3616: _int_malloc: Assertion `(unsigned long)(size)
> >> = (unsigned long)(nb)' failed.
> > Aborted

> > debruijn 5 2 runs without error as well as e.g. debruijn 5 3 5 HRF
> > neural.txt -eval 5000.

> > Thank you for your help,

> > Antti



> > _______________________________________________
> > Neurodebian-users mailing list
> > Neurodebian-users at lists.alioth.debian.org
> > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/neurodebian-users
-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate,     Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        
-------------- next part --------------
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
 CC = g++
 
 #CFLAGS	=	-g -Wall 
-CFLAGS	=	-O3 -Wall
+CFLAGS	?=	-O3 -Wall
 
 LIBFLAGS = 	-lm -lfftw3
 
@@ -29,7 +29,8 @@ INCFILES = debruijn.h
 
 ALLOBJS = $(OBJS)
 
-$(ALLOBJS): $(INCFILES)
+%.o: %.cpp $(INCFILES)
+	$(CC) $(CFLAGS) -c -o $@ $<
 
 debruijn:  $(ALLOBJS)
 	$(CC) $(CFLAGS) $(ALLOBJS) -o debruijn $(LIBFLAGS)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/neurodebian-users/attachments/20130702/33f25397/attachment.sig>


More information about the Neurodebian-users mailing list