| Summary: | gfortran :: compilation memory leak (leading to OOM killer) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Adrian Sevcenco <adrian.sev> | ||||||
| Component: | gcc | Assignee: | Jakub Jelinek <jakub> | ||||||
| Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | urgent | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 15 | CC: | jakub | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2011-06-27 08:36:37 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
|
Description
Adrian Sevcenco
2011-06-26 16:23:21 UTC
a little strange thing is strace totals: adrian@sevdell: TAmpt $ strace -c gfortran -o CMakeFiles/ampt.dir/AMPT/hijing1.383_ampt.f.o -Dampt_EXPORTS -Dlinux -D_MODULE_=\"TAmpt\" -DFORTRAN_GFORTRAN -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -O -g -fPIC -fno-second-underscore -fPIC -fno-f2c -fPIC -I/home/physics-tools/root/root/include -I/home/physics-tools/alice/aliroot/STEER -I/home/physics-tools/alice/aliroot/TAmpt -I/home/physics-tools/alice/aliroot/objdir/include -I/home/physics-tools/alice/aliroot/TAmpt/AMPT -I/home/physics-tools/alice/aliroot/EVGEN -c /home/physics-tools/alice/aliroot/TAmpt/AMPT/hijing1.383_ampt.f gfortran: internal compiler error: Killed (program f951) Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. % time seconds usecs/call calls errors syscall ------ ----------- ----------- --------- --------- ---------------- 99.99 8.723674 8723674 1 wait4 0.01 0.001000 1000 1 unlink 0.00 0.000027 2 17 7 access 0.00 0.000000 0 1 read 0.00 0.000000 0 3 write 0.00 0.000000 0 5 3 open 0.00 0.000000 0 2 close 0.00 0.000000 0 6 2 stat 0.00 0.000000 0 1 fstat 0.00 0.000000 0 6 lstat 0.00 0.000000 0 6 mmap 0.00 0.000000 0 3 mprotect 0.00 0.000000 0 5 brk 0.00 0.000000 0 9 rt_sigaction 0.00 0.000000 0 1 getpid 0.00 0.000000 0 1 vfork 0.00 0.000000 0 1 execve 0.00 0.000000 0 1 arch_prctl ------ ----------- ----------- --------- --------- ---------------- 100.00 8.724701 70 12 total trying to use valgrind give little info: adrian@sevdell: TAmpt $ valgrind --tool=memcheck gfortran -o CMakeFiles/ampt.dir/AMPT/hijing1.383_ampt.f.o -Dampt_EXPORTS -Dlinux -D_MODULE_=\"TAmpt\" -DFORTRAN_GFORTRAN -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -O -g -fPIC -fno-second-underscore -fPIC -fno-f2c -fPIC -I/home/physics-tools/root/root/include -I/home/physics-tools/alice/aliroot/STEER -I/home/physics-tools/alice/aliroot/TAmpt -I/home/physics-tools/alice/aliroot/objdir/include -I/home/physics-tools/alice/aliroot/TAmpt/AMPT -I/home/physics-tools/alice/aliroot/EVGEN -c /home/physics-tools/alice/aliroot/TAmpt/AMPT/hijing1.383_ampt.f ==30819== Memcheck, a memory error detector ==30819== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==30819== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==30819== Command: gfortran -o CMakeFiles/ampt.dir/AMPT/hijing1.383_ampt.f.o -Dampt_EXPORTS -Dlinux -D_MODULE_="TAmpt" -DFORTRAN_GFORTRAN -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -O -g -fPIC -fno-second-underscore -fPIC -fno-f2c -fPIC -I/home/physics-tools/root/root/include -I/home/physics-tools/alice/aliroot/STEER -I/home/physics-tools/alice/aliroot/TAmpt -I/home/physics-tools/alice/aliroot/objdir/include -I/home/physics-tools/alice/aliroot/TAmpt/AMPT -I/home/physics-tools/alice/aliroot/EVGEN -c /home/physics-tools/alice/aliroot/TAmpt/AMPT/hijing1.383_ampt.f ==30819== gfortran: internal compiler error: Killed (program f951) Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. ==30819== ==30819== HEAP SUMMARY: ==30819== in use at exit: 35,679 bytes in 122 blocks ==30819== total heap usage: 190 allocs, 68 frees, 46,047 bytes allocated ==30819== ==30819== LEAK SUMMARY: ==30819== definitely lost: 5,124 bytes in 28 blocks ==30819== indirectly lost: 45 bytes in 3 blocks ==30819== possibly lost: 29 bytes in 2 blocks ==30819== still reachable: 30,481 bytes in 89 blocks ==30819== suppressed: 0 bytes in 0 blocks ==30819== Rerun with --leak-check=full to see details of leaked memory ==30819== ==30819== For counts of detected and suppressed errors, rerun with: -v ==30819== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6) and with --leak-check=full give absolutely no info: adrian@sevdell: TAmpt $ valgrind --tool=memcheck --leak-check=full gfortran -o CMakeFiles/ampt.dir/AMPT/hijing1.383_ampt.f.o -Dampt_EXPORTS -Dlinux -D_MODULE_=\"TAmpt\" -DFORTRAN_GFORTRAN -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -O -g -fPIC -fno-second-underscore -fPIC -fno-f2c -fPIC -I/home/physics-tools/root/root/include -I/home/physics-tools/alice/aliroot/STEER -I/home/physics-tools/alice/aliroot/TAmpt -I/home/physics-tools/alice/aliroot/objdir/include -I/home/physics-tools/alice/aliroot/TAmpt/AMPT -I/home/physics-tools/alice/aliroot/EVGEN -c /home/physics-tools/alice/aliroot/TAmpt/AMPT/hijing1.383_ampt.f ==31834== Memcheck, a memory error detector ==31834== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==31834== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==31834== Command: gfortran -o CMakeFiles/ampt.dir/AMPT/hijing1.383_ampt.f.o -Dampt_EXPORTS -Dlinux -D_MODULE_="TAmpt" -DFORTRAN_GFORTRAN -DCERNLIB_LINUX -DCERNLIB_BLDLIB -DCERNLIB_CZ -O -g -fPIC -fno-second-underscore -fPIC -fno-f2c -fPIC -I/home/physics-tools/root/root/include -I/home/physics-tools/alice/aliroot/STEER -I/home/physics-tools/alice/aliroot/TAmpt -I/home/physics-tools/alice/aliroot/objdir/include -I/home/physics-tools/alice/aliroot/TAmpt/AMPT -I/home/physics-tools/alice/aliroot/EVGEN -c /home/physics-tools/alice/aliroot/TAmpt/AMPT/hijing1.383_ampt.f ==31834== Killed i know the fedora 15 come with cgroups enabled .. is it possible that valgrind is in the same group with gfortran and so OOM killer kills the whole group? How can i debug further this problem? Many thanks! Adrian Created attachment 509998 [details]
valgrind --tool=memcheck --leak-check=full
Created attachment 509999 [details]
kernel log of OOM killer
It is not a memory leak, just the FE expanding the whole initializer (which is admittedly huge). Tracking upstream. It seems that upstream was fixed.. was the patch backported to f15? Thanks It is in gcc-gfortran-4.6.1-3.fc15 and above. Though those exist right now just in koji, pushing it as errata will happen later on when more bugs accumulate. |