This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ICE seg fault



Tobias Burnus wrote:
Hi Florian,

Florian Ladstaedter wrote:
I get the following ICE:
------------------------------------
gfortran -c -J../include AtmoIonoSphere.f90
AtmoIonoSphere.f90:0: internal compiler error: Segmentation fault
------------------------------------
I have no idea where the problem might result from, and since the
module has many dependencies it is hard to post an appropriate test
case. Is there any way to get more information out of this situation?
"Segmentation fault" means that it crashes because an invalid pointer
was accessed thus the compiler itself cannot provide much more
information. But you could run the compiler in a debugger (e.g. gdb) and
do a backtrace or even better in valgrind.

Note: Don't run it as:
   valgrind  gfortran -c -J../include AtmoIonoSphere.f90

as "gfortran" is only a wrapper program. Use "-v" to find the actual
command:
   gfortran -v -c -J../include AtmoIonoSphere.f90

and run it then; e.g, on my computer it looks as follows:

valgrind /projects/tob/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.3.0/f951
AtmoIonoSphere.f90 -quiet -dumpbase AtmoIonoSphere.f90 -mtune=generic
-auxbase AtmoIonoSphere -version -J../include -fintrinsic-modules-path
/projects/tob/gcc-trunk/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/finclude
-o /tmp/ccFMpASd.s



Tobias


ok thanks a lot. I send you the output of valgrind -v and of gdb, in case it already helps you. Although I guess you will need a piece of code as well...? Still not sure how to extract the relevant pieces though.

thanks Florian




------------------------------------------------------------------------
gdb --args /usr/local/libexec/gcc/i686-pc-linux-gnu/4.3.0/f951 AtmoIonoSphere.f90 -quiet -dumpbase AtmoIonoSphere.f90 -mtune=generic -auxbase AtmoIonoSphere -J../include -fintrinsic-modules-path /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/finclude -o /tmp/ccGaibCk.s
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".


(gdb) run
Starting program: /usr/local/libexec/gcc/i686-pc-linux-gnu/4.3.0/f951 AtmoIonoSphere.f90 -quiet -dumpbase AtmoIonoSphere.f90 -mtune=generic -auxbase AtmoIonoSphere -J../include -fintrinsic-modules-path /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/finclude -o /tmp/ccGaibCk.s


Program received signal SIGSEGV, Segmentation fault.
0x08064563 in check_specification_function (e=<value optimized out>) at ../../gcc/gcc/fortran/expr.c:696
696 sym = e->symtree->n.sym;
------------------------------------------------------------------------





------------------------------------------------------------------------
valgrind -v /usr/local/libexec/gcc/i686-pc-linux-gnu/4.3.0/f951 AtmoIonoSphere.f90 -quiet -dumpbase AtmoIonoSphere.f90 -mtune=generic -auxbase AtmoIonoSphere -version -J../include -fintrinsic-modules-path /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/finclude -o /tmp/ccGaibCk.s
==12878== Memcheck, a memory error detector.
==12878== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==12878== Using LibVEX rev 1732, a library for dynamic binary translation.
==12878== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==12878== Using valgrind-3.2.3-Debian, a dynamic binary instrumentation framework.
==12878== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==12878==
--12878-- Command line
--12878-- /usr/local/libexec/gcc/i686-pc-linux-gnu/4.3.0/f951
--12878-- AtmoIonoSphere.f90
--12878-- -quiet
--12878-- -dumpbase
--12878-- AtmoIonoSphere.f90
--12878-- -mtune=generic
--12878-- -auxbase
--12878-- AtmoIonoSphere
--12878-- -version
--12878-- -J../include
--12878-- -fintrinsic-modules-path
--12878-- /usr/local/lib/gcc/i686-pc-linux-gnu/4.3.0/finclude
--12878-- -o
--12878-- /tmp/ccGaibCk.s
--12878-- Startup, with flags:
--12878-- -v
--12878-- Contents of /proc/version:
--12878-- Linux version 2.6.21-2-686 (Debian 2.6.21-6) (waldi@debian.org) (gcc version 4.1.3 20070629 (prerelease) (Debian 4.1.2-13)) #1 SMP Wed Jul 11 03:53:02 UTC 2007
--12878-- Arch and hwcaps: X86, x86-sse1-sse2
--12878-- Page sizes: currently 4096, max supported 4096
--12878-- Valgrind library directory: /usr/lib/valgrind
--12878-- Reading syms from /lib/ld-2.6.so (0x4000000)
--12878-- Reading debug info from /lib/ld-2.6.so...
--12878-- ... CRC mismatch (computed 06705149 wanted 0E29FBB5)
--12878-- object doesn't have a symbol table
--12878-- Reading syms from /usr/local/libexec/gcc/i686-pc-linux-gnu/4.3.0/f951 (0x8048000)
--12878-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0x38000000)
--12878-- object doesn't have a dynamic symbol table
--12878-- Reading suppressions file: /usr/lib/valgrind/default.supp
--12878-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so (0x4020000)
--12878-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x4022000)
--12878-- Reading syms from /usr/lib/libmpfr.so.1.0.1 (0x4035000)
--12878-- object doesn't have a symbol table
--12878-- Reading syms from /usr/lib/libgmp.so.3.4.1 (0x406A000)
--12878-- object doesn't have a symbol table
--12878-- Reading syms from /lib/i686/cmov/libc-2.6.so (0x40AE000)
--12878-- Reading debug info from /lib/i686/cmov/libc-2.6.so...
--12878-- ... CRC mismatch (computed 48D44E1E wanted 38B159D6)
--12878-- object doesn't have a symbol table
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B44C: (within /lib/ld-2.6.so)
==12878== by 0x40040DC: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B14A: (within /lib/ld-2.6.so)
==12878== by 0x40040DC: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B8DF: (within /lib/ld-2.6.so)
==12878== by 0x40040DC: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B00B: (within /lib/ld-2.6.so)
==12878== by 0x4003F87: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B013: (within /lib/ld-2.6.so)
==12878== by 0x4003F87: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B14A: (within /lib/ld-2.6.so)
==12878== by 0x4003F87: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
--12878-- REDIR: 0x411E2B0 (rindex) redirected to 0x4025090 (rindex)
--12878-- REDIR: 0x411DF00 (strlen) redirected to 0x4025240 (strlen)
--12878-- REDIR: 0x411D9A0 (strcmp) redirected to 0x4025310 (strcmp)
--12878-- REDIR: 0x411E100 (strncmp) redirected to 0x40252A0 (strncmp)
--12878-- REDIR: 0x411D830 (index) redirected to 0x4025180 (index)
--12878-- REDIR: 0x4120010 (strchrnul) redirected to 0x4025630 (strchrnul)
--12878-- REDIR: 0x41198D0 (malloc) redirected to 0x402442B (malloc)
--12878-- REDIR: 0x411F1F0 (mempcpy) redirected to 0x4025AA0 (mempcpy)
--12878-- REDIR: 0x411F680 (memcpy) redirected to 0x4026000 (memcpy)
--12878-- REDIR: 0x411AE30 (free) redirected to 0x4024045 (free)
--12878-- REDIR: 0x411F380 (stpcpy) redirected to 0x4025770 (stpcpy)
--12878-- REDIR: 0x411DFB0 (strnlen) redirected to 0x4025210 (strnlen)
--12878-- REDIR: 0x411DA10 (strcpy) redirected to 0x4026270 (strcpy)
--12878-- REDIR: 0x411EC90 (memchr) redirected to 0x4025430 (memchr)
--12878-- REDIR: 0x411B020 (realloc) redirected to 0x40244DA (realloc)
--12878-- REDIR: 0x411FF40 (rawmemchr) redirected to 0x4025660 (rawmemchr)
--12878-- REDIR: 0x41195D0 (calloc) redirected to 0x4023758 (calloc)
--12878-- REDIR: 0x411F190 (memset) redirected to 0x4025590 (memset)
GNU F95 version 4.3.0 20070730 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 4.3.0 20070730 (experimental), GMP version 4.2.1, MPFR version 2.2.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
--12878-- REDIR: 0x411F120 (memmove) redirected to 0x40255C0 (memmove)
--12878-- REDIR: 0x411D680 (strcat) redirected to 0x4026350 (strcat)
==12878==
==12878== Invalid read of size 4
==12878== at 0x8064563: check_specification_function (expr.c:696)
==12878== Address 0x14 is not stack'd, malloc'd or (recently) free'd
AtmoIonoSphere.f90:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
==12878==
==12878== ERROR SUMMARY: 16 errors from 7 contexts (suppressed: 0 from 0)
==12878==
==12878== 1 errors in context 1 of 7:
==12878== Invalid read of size 4
==12878== at 0x8064563: check_specification_function (expr.c:696)
==12878== Address 0x14 is not stack'd, malloc'd or (recently) free'd
==12878==
==12878== 1 errors in context 2 of 7:
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B14A: (within /lib/ld-2.6.so)
==12878== by 0x4003F87: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== 1 errors in context 3 of 7:
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B013: (within /lib/ld-2.6.so)
==12878== by 0x4003F87: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== 1 errors in context 4 of 7:
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B00B: (within /lib/ld-2.6.so)
==12878== by 0x4003F87: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== 2 errors in context 5 of 7:
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B8DF: (within /lib/ld-2.6.so)
==12878== by 0x40040DC: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== 4 errors in context 6 of 7:
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B14A: (within /lib/ld-2.6.so)
==12878== by 0x40040DC: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878==
==12878== 6 errors in context 7 of 7:
==12878== Conditional jump or move depends on uninitialised value(s)
==12878== at 0x400B44C: (within /lib/ld-2.6.so)
==12878== by 0x40040DC: (within /lib/ld-2.6.so)
==12878== by 0x4014E9A: (within /lib/ld-2.6.so)
==12878== by 0x4000C42: (within /lib/ld-2.6.so)
==12878== by 0x4000816: (within /lib/ld-2.6.so)
==12878== IN SUMMARY: 16 errors from 7 contexts (suppressed: 0 from 0)
==12878==
==12878== malloc/free: in use at exit: 2,192,017 bytes in 21,407 blocks.
==12878== malloc/free: 178,584 allocs, 157,177 frees, 8,786,111 bytes allocated.
==12878==
==12878== searching for pointers to 21,407 not-freed blocks.
==12878== checked 4,450,284 bytes.
==12878==
==12878== LEAK SUMMARY:
==12878== definitely lost: 16 bytes in 2 blocks.
==12878== possibly lost: 1,924 bytes in 159 blocks.
==12878== still reachable: 2,190,077 bytes in 21,246 blocks.
==12878== suppressed: 0 bytes in 0 blocks.
==12878== Rerun with --leak-check=full to see details of leaked memory.
--12878-- memcheck: sanity checks: 1662 cheap, 67 expensive
--12878-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use
--12878-- memcheck: auxmaps: 0 searches, 0 comparisons
--12878-- memcheck: SMs: n_issued = 273 (4368k, 4M)
--12878-- memcheck: SMs: n_deissued = 0 (0k, 0M)
--12878-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M)
--12878-- memcheck: SMs: max_undefined = 0 (0k, 0M)
--12878-- memcheck: SMs: max_defined = 190 (3040k, 2M)
--12878-- memcheck: SMs: max_non_DSM = 273 (4368k, 4M)
--12878-- memcheck: max sec V bit nodes: 0 (0k, 0M)
--12878-- memcheck: set_sec_vbits8 calls: 0 (new: 0, updates: 0)
--12878-- memcheck: max shadow mem size: 4672k, 4M
--12878-- translate: fast SP updates identified: 20,716 ( 82.8%)
--12878-- translate: generic_known SP updates identified: 3,994 ( 15.9%)
--12878-- translate: generic_unknown SP updates identified: 304 ( 1.2%)
--12878-- tt/tc: 798,660 tt lookups requiring 814,143 probes
--12878-- tt/tc: 798,660 fast-cache updates, 2 flushes
--12878-- transtab: new 16,643 (462,899 -> 6,129,412; ratio 132:10) [0 scs]
--12878-- transtab: dumped 0 (0 -> ??)
--12878-- transtab: discarded 0 (0 -> ??)
--12878-- scheduler: 166,225,092 jumps (bb entries).
--12878-- scheduler: 1,662/1,651,036 major/minor sched events.
--12878-- sanity: 1663 cheap, 67 expensive checks.
--12878-- exectx: 30,011 lists, 3,744 contexts (avg 0 per list)
--12878-- exectx: 335,777 searches, 334,390 full compares (995 per 1000)
--12878-- exectx: 0 cmp2, 34 cmp4, 0 cmpAll
------------------------------------------------------------------------




















Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]