Menu

#205 Segfault in xprobe_comp when specifying fortran compiler

Developer
closed-fixed
5
2014-11-13
2012-07-08
No

Specifying the fortran complier fails in atlas-3.9.84:

[vbraun@volker-desktop build]$ ../ATLAS/configure -C if gfortran
gcc -I/tmp/atlas/build/../ATLAS//CONFIG/include -g -w -c /tmp/atlas/build/../ATLAS//CONFIG/src/atlconf_misc.c
gcc -I/tmp/atlas/build/../ATLAS//CONFIG/include -g -w -o xconfig /tmp/atlas/build/../ATLAS//CONFIG/src/config.c atlconf_misc.o
./xconfig -d s /tmp/atlas/build/../ATLAS/ -d b /tmp/atlas/build -C if gfortran

OS configured as Linux (1)

Assembly configured as GAS_x8664 (2)

Vector ISA Extension configured as AVX (5,480)

Architecture configured as Corei2 (26)

Clock rate configured as 3501Mhz

Maximum number of threads configured as 8
Parallel make command configured as '$(MAKE) -j 8'
Cannot detect CPU throttling.
gcc -I/tmp/atlas/build/../ATLAS//CONFIG/include -g -w -o xisgcc /tmp/atlas/build/../ATLAS//CONFIG/src/IsGcc.c atlconf_misc.o
gcc -I/tmp/atlas/build/../ATLAS//CONFIG/include -g -w -c /tmp/atlas/build/../ATLAS//CONFIG/src/probe_comp.c
gcc -I/tmp/atlas/build/../ATLAS//CONFIG/include -g -w -o xprobe_comp probe_comp.o atlconf_misc.o
rm -f config1.out
make atlas_run atldir=/tmp/atlas/build exe=xprobe_comp redir=config1.out \ args="-v 0 -o atlconf.txt -O 1 -A 26 -Si nof77 0 -V 480 -C if 'gfortran' -b 64 -d b /tmp/atlas/build"
make[1]: Entering directory `/tmp/atlas/build'
cd /tmp/atlas/build ; ./xprobe_comp -v 0 -o atlconf.txt -O 1 -A 26 -Si nof77 0 -V 480 -C if 'gfortran' -b 64 -d b /tmp/atlas/build > config1.out
*** glibc detected *** ./xprobe_comp: double free or corruption (fasttop): 0x0000000000ccb010 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3a5187c80e]
./xprobe_comp[0x407078]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x3a51821735]
./xprobe_comp[0x400d99]
======= Memory map: ========
00400000-0040e000 r-xp 00000000 08:13 1196042 /tmp/atlas/build/xprobe_comp
0060e000-0060f000 rw-p 0000e000 08:13 1196042 /tmp/atlas/build/xprobe_comp
00ccb000-00cec000 rw-p 00000000 00:00 0 [heap]
3a51400000-3a51420000 r-xp 00000000 08:13 689000 /usr/lib64/ld-2.15.so
3a5161f000-3a51620000 r--p 0001f000 08:13 689000 /usr/lib64/ld-2.15.so
3a51620000-3a51621000 rw-p 00020000 08:13 689000 /usr/lib64/ld-2.15.so
3a51621000-3a51622000 rw-p 00000000 00:00 0
3a51800000-3a519ac000 r-xp 00000000 08:13 689001 /usr/lib64/libc-2.15.so
3a519ac000-3a51bac000 ---p 001ac000 08:13 689001 /usr/lib64/libc-2.15.so
3a51bac000-3a51bb0000 r--p 001ac000 08:13 689001 /usr/lib64/libc-2.15.so
3a51bb0000-3a51bb2000 rw-p 001b0000 08:13 689001 /usr/lib64/libc-2.15.so
3a51bb2000-3a51bb7000 rw-p 00000000 00:00 0
3a55000000-3a55015000 r-xp 00000000 08:13 689007 /usr/lib64/libgcc_s-4.7.0-20120507.so.1
3a55015000-3a55214000 ---p 00015000 08:13 689007 /usr/lib64/libgcc_s-4.7.0-20120507.so.1
3a55214000-3a55215000 rw-p 00014000 08:13 689007 /usr/lib64/libgcc_s-4.7.0-20120507.so.1
7fbfe5b42000-7fbfe5b45000 rw-p 00000000 00:00 0
7fbfe5b63000-7fbfe5b66000 rw-p 00000000 00:00 0
7fff962c1000-7fff962e2000 rw-p 00000000 00:00 0 [stack]
7fff963d4000-7fff963d5000 r-xp 00000000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
/bin/sh: line 1: 29264 Aborted (core dumped) ./xprobe_comp -v 0 -o atlconf.txt -O 1 -A 26 -Si nof77 0 -V 480 -C if 'gfortran' -b 64 -d b /tmp/atlas/build > config1.out
make[1]: *** [atlas_run] Error 134
make[1]: Leaving directory `/tmp/atlas/build'
make: *** [IRun_comp] Error 2
ERROR 512 IN SYSCMND: 'make IRun_comp args="-v 0 -o atlconf.txt -O 1 -A 26 -Si nof77 0 -V 480 -C if 'gfortran' -b 64"'
mkdir src bin tune interfaces
cd src ; mkdir testing auxil blas lapack pthreads threads
cd src/blas ; \ mkdir f77reference reference gemv ger gemm kbmm \ level1 level2 level3 pklevel3
cd src/blas/reference ; mkdir level1 level2 level3
cd src/blas/level2 ; mkdir kernel
cd src/blas/pklevel3 ; mkdir gpmm sprk
cd src/blas/level3 ; mkdir rblas kernel
cd src/pthreads ; mkdir blas misc
cd src/pthreads/blas ; mkdir level1 level2 level3
cd src/threads ; mkdir blas lapack
cd src/threads/blas ; mkdir level3 level2
cd tune ; mkdir blas sysinfo lapack threads
cd tune/blas ; mkdir gemm gemv ger level1 level3
cd interfaces ; mkdir blas lapack
cd interfaces/lapack ; mkdir C F77
cd interfaces/lapack/C ; mkdir src testing
cd interfaces/lapack/F77 ; mkdir src testing
cd interfaces/blas ; mkdir C F77
cd interfaces/blas/C ; mkdir src testing
cd interfaces/blas/F77 ; mkdir src testing
cd interfaces/lapack ; mkdir C2F
cd interfaces/lapack/C2F ; mkdir src
mkdir ARCHS
make -f Make.top startup
make[1]: Entering directory `/tmp/atlas/build'
Make.top:1: Make.inc: No such file or directory
make[1]: *** No rule to make target `Make.inc'. Stop.
make[1]: Leaving directory `/tmp/atlas/build'
make: *** [startup] Error 2
mv: cannot stat `lib/Makefile': No such file or directory
../ATLAS/configure: line 450: lib/Makefile: No such file or directory
../ATLAS/configure: line 451: lib/Makefile: No such file or directory
../ATLAS/configure: line 452: lib/Makefile: No such file or directory
../ATLAS/configure: line 453: lib/Makefile: No such file or directory
../ATLAS/configure: line 509: lib/Makefile: No such file or directory
DONE configure

Here is the gdb backtrace:

[vbraun@volker-desktop build]$ gdb ./xprobe_comp
GNU gdb (GDB) Fedora (7.4.50.20120120-49.fc17)
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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/atlas/build/xprobe_comp...done.
(gdb) run -v 0 -o atlconf.txt -O 1 -A 26 -Si nof77 0 -V 480 -C if 'gfortran' -b 64 -d b /tmp/atlas/build
Starting program: /tmp/atlas/build/xprobe_comp -v 0 -o atlconf.txt -O 1 -A 26 -Si nof77 0 -V 480 -C if 'gfortran' -b 64 -d b /tmp/atlas/build
Detaching after fork from child process 31166.
*** glibc detected *** /tmp/atlas/build/xprobe_comp: double free or corruption (fasttop): 0x000000000060f010 ***
======= Backtrace: =========
/lib64/libc.so.6[0x3a5187c80e]
/tmp/atlas/build/xprobe_comp[0x407078]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x3a51821735]
/tmp/atlas/build/xprobe_comp[0x400d99]
======= Memory map: ========
00400000-0040e000 r-xp 00000000 08:13 1196059 /tmp/atlas/build/xprobe_comp
0060e000-0060f000 rw-p 0000e000 08:13 1196059 /tmp/atlas/build/xprobe_comp
0060f000-00630000 rw-p 00000000 00:00 0 [heap]
3a51400000-3a51420000 r-xp 00000000 08:13 689000 /usr/lib64/ld-2.15.so
3a5161f000-3a51620000 r--p 0001f000 08:13 689000 /usr/lib64/ld-2.15.so
3a51620000-3a51621000 rw-p 00020000 08:13 689000 /usr/lib64/ld-2.15.so
3a51621000-3a51622000 rw-p 00000000 00:00 0
3a51800000-3a519ac000 r-xp 00000000 08:13 689001 /usr/lib64/libc-2.15.so
3a519ac000-3a51bac000 ---p 001ac000 08:13 689001 /usr/lib64/libc-2.15.so
3a51bac000-3a51bb0000 r--p 001ac000 08:13 689001 /usr/lib64/libc-2.15.so
3a51bb0000-3a51bb2000 rw-p 001b0000 08:13 689001 /usr/lib64/libc-2.15.so
3a51bb2000-3a51bb7000 rw-p 00000000 00:00 0
3a55000000-3a55015000 r-xp 00000000 08:13 689007 /usr/lib64/libgcc_s-4.7.0-20120507.so.1
3a55015000-3a55214000 ---p 00015000 08:13 689007 /usr/lib64/libgcc_s-4.7.0-20120507.so.1
3a55214000-3a55215000 rw-p 00014000 08:13 689007 /usr/lib64/libgcc_s-4.7.0-20120507.so.1
7ffff7fda000-7ffff7fdd000 rw-p 00000000 00:00 0
7ffff7ffb000-7ffff7ffe000 rw-p 00000000 00:00 0
7ffff7ffe000-7ffff7fff000 r-xp 00000000 00:00 0 [vdso]
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]

Program received signal SIGABRT, Aborted.
0x0000003a51835965 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
(gdb) bt
#0 0x0000003a51835965 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x0000003a51837118 in __GI_abort () at abort.c:91
#2 0x0000003a5187568b in __libc_message (do_abort=do_abort@entry=2,
fmt=fmt@entry=0x3a51978bc8 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:198
#3 0x0000003a5187c80e in malloc_printerr (ptr=0x60f010, str=0x3a51978bf8 "double free or corruption (fasttop)", action=3)
at malloc.c:5027
#4 _int_free (av=0x3a51bb0720, p=0x60f000, have_lock=0) at malloc.c:3948
#5 0x0000000000407078 in main (nargs=22, args=0x7fffffffdff8) at /tmp/atlas/build/../ATLAS//CONFIG/src/probe_comp.c:1940
(gdb) frame 5
#5 0x0000000000407078 in main (nargs=22, args=0x7fffffffdff8) at /tmp/atlas/build/../ATLAS//CONFIG/src/probe_comp.c:1940
1940 free(sp);
(gdb) l
1935 {
1936 if (usrcomps[i])
1937 {
1938 char *sp = usrcomps[i];
1939 usrcomps[i] = FindNamedComp(OS, mach, verb, targ, sp);
1940 free(sp);
1941 }
1942 }
1943 if (verb > 1)
1944 {

Discussion

  • R. Clint Whaley

    R. Clint Whaley - 2012-07-09

    This is a confirmed bug, working on a fix.

     
  • R. Clint Whaley

    R. Clint Whaley - 2012-07-09
    • assigned_to: nobody --> rwhaley
    • milestone: 148063 -->
    • labels: 320139 -->
    • status: open --> open-accepted
     
  • R. Clint Whaley

    R. Clint Whaley - 2012-07-09
    • milestone: --> Developer
    • labels: --> Install problem
     
  • R. Clint Whaley

    R. Clint Whaley - 2012-07-09
    • status: open-accepted --> open-fixed
     
  • R. Clint Whaley

    R. Clint Whaley - 2012-07-09

    OK, I have fixed this bug in the basefiles, should be fixed for .85.

    FYI: you shouldn't throw this flag this way. config will autosearch for the correct version of gfortran, one that is interopable with the C compilers, and this flag will short-circuit that to take the first one in you path, which may not be compatible. In general, if you really need to specify the compiler, specify the full paths, and be sure they all interoperate.

    Thanks for the bug report!
    Clint

     
  • Volker Braun

    Volker Braun - 2012-07-09

    Thanks for the quick reply!

    Sage has its own mechanism to specify the Fortran compiler, and we would like to make sure that we compile everything with the same compiler. We also set the paths such that the compiler (called sage_fortran) is first.

    I'll make sure to test atlas-3.9.85 when it is ready!

     
  • Volker Braun

    Volker Braun - 2012-07-13

    I can confirm that this is fixed in atlas-3.10.0

     
  • R. Clint Whaley

    R. Clint Whaley - 2013-10-03
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.